Overview of the linera-execution module
mainlinera-execution module is responsible for managing the execution of both system applications and user applications within a Linera chain.repository·main·Indexed 12 days ago
https://github.com/linera-io/linera-protocolA decentralized blockchain infrastructure utilizing a microchain architecture for scalable, secure, and low-latency Web3 applications. The protocol includes base definitions for cryptography and supports advanced implementations such as an LLM-powered Linera Agent, an Automated Market Maker (AMM) for DeFi liquidity and swaps, and an EVM-Linera Bridge for cross-chain token transfers between EVM chains and Linera.
linera-execution module is responsible for managing the execution of both system applications and user applications within a Linera chain.The linera-indexer library is designed to process blockchain data by connecting to a node service and applying plugins to the block stream. It consists of four primary components:
service.rs).indexer.rs).plugin.rs).runner.rs).linera-wallet-json is a persistent wallet implementation designed for the Linera protocol. It provides the mechanism for storing and managing wallet data using a JSON-based persistence layer.@linera/client WASM package, which handles Client instantiation, ChainClient creation, synchronization with validators, and querying the application's GraphQL service.The linera command-line tool provides a comprehensive interface for interacting with the Linera protocol. It includes subcommands for managing wallets, chains, applications, validators, storage, and network operations.
Key functional areas include:
linera wallet (init, show, request-chain, etc.)linera chain, linera open-chain, linera close-chainlinera create-application, linera publish-module, linera describe-applicationlinera validator (add, list, query, sync, etc.)linera storage (list-namespaces, list-chain-ids, etc.)linera net, linera faucet, linera benchmarklinera project (new, test, publish-and-create)linera-exporter is a block exporter designed for the Linera protocol. It is used to export block data from the Linera network for external consumption or analysis.The Linera repository is organized into several core crates that build upon each other. Understanding this hierarchy helps in identifying where to find specific logic for development:
linera-base: Foundational definitions and cryptography.linera-version: Version management for binaries and services.linera-views: Mapping complex data structures to key-value stores (includes linera-views-derive macros).linera-execution: Logic for runtime and execution of Linera applications.linera-chain: Logic for blocks, certificates, and cross-chain messaging.linera-storage: Storage abstractions built on top of linera-chain.linera-core: The core protocol, including client/server logic and node synchronization.linera-rpc: Data types and schemas for RPC messages (client $\leftrightarrow$ proxy $\leftrightarrow$ chain interactions).linera-client: Library for writing clients (used by CLI, node services, and web clients).linera-service: Executable for clients (CLI wallets), proxies (validator frontends), and servers.linera-sdk: The primary library for developing Rust-based Linera applications for the Wasm VM (includes linera-sdk-derive macros).examples: Reference implementations of Linera applications.linera-service module provides the necessary executables to operate a Linera service. This includes a placeholder wallet that functions as a GraphQL service, which can be used to power user interfaces.Linera provides a Web client library that allows developers to interact with Linera applications using a JavaScript API directly within web pages. This library enables building interactive frontends that leverage Linera's push notifications to implement real-time reactivity.
To build a frontend, you typically need a deployed Linera application and its corresponding Application ID.
linera-rpc module provides the core network abstractions and data schemas required for performing Remote Procedure Calls (RPCs) within the Linera protocol. Developers building components that require network communication or need to adhere to the protocol's RPC data formats should use this module.linera-chain module is responsible for managing the state of a Linera chain. This includes handling the core chain state and facilitating cross-chain communication protocols.The linera-storage-service module provides a shared key-value store server. It is built using two primary storage backends:
linera-views.To interact with this service, use the corresponding client which implements the KeyValueStore and KeyValueDatabase traits.