Retour au classement

linera-io/linera-protocol

Rust

Main repository for the Linera protocol

blockchainrustwasm
Croissance des étoiles
Étoiles
32.2k
Forks
2.4k
Croissance hebdomadaire
Issues
518
10k20k30k
avr. 2023mai 2024juin 2025juil. 2026
Artefactscrates.iocargo add linera-protocol
README

License Build Status for Docker Build Status for Rust Build Status for Documentation Twitter Discord

Linera is a decentralized blockchain infrastructure designed for highly scalable, secure, low-latency Web3 applications.

Documentation

Visit our developer page and read our whitepaper to learn more about the Linera protocol.

Repository Structure

The main crates and directories of this repository can be summarized as follows: (listed from low to high levels in the dependency graph)

  • linera-base Base definitions, including cryptography.

  • linera-version A library to manage version info in binaries and services.

  • linera-views A library mapping complex data structures onto a key-value store. The corresponding procedural macros are implemented in linera-views-derive.

  • linera-execution Persistent data and the corresponding logic for runtime and execution of Linera applications.

  • linera-chain Persistent data and the corresponding logic for chains of blocks, certificates, and cross-chain messaging.

  • linera-storage Defines the storage abstractions for the protocol on top of linera-chain.

  • linera-core The core Linera protocol, including client and server logic, node synchronization, etc.

  • linera-rpc Defines the data-type for RPC messages (currently all client ↔ proxy ↔ chain ↔ chain interactions), and track the corresponding data schemas.

  • linera-client Library for writing Linera clients. Used for the command-line client and the node service in linera-service, as well as the Web client in linera-web.

  • linera-service Executable for clients (aka CLI wallets), proxy (aka validator frontend) and servers.

  • linera-sdk The library to develop Linera applications written in Rust for the Wasm virtual machine. The corresponding procedural macros are implemented in linera-sdk-derive.

  • examples Examples of Linera applications written in Rust.

Prerequisites

See INSTALL.md for software requirements to develop in this repo.

Quickstart with the Linera CLI tool

The following commands set up a local test network and run some transfers between the microchains owned by a single wallet.

# Make sure to compile the Linera binaries and add them in the $PATH.
# cargo build -p linera-storage-service -p linera-service --bins
export PATH="$PWD/target/debug:$PATH"

# Import the optional helper function `linera_spawn`.
source /dev/stdin <<<"$(linera net helper 2>/dev/null)"

# Run a local test network with the default parameters and a number of microchains
# owned by the default wallet. This also defines `LINERA_TMP_DIR`.
linera_spawn \
linera net up --with-faucet --faucet-port 8080

# Remember the URL of the faucet.
FAUCET_URL=http://localhost:8080

# If you're using a testnet, start here and run this instead:
#   LINERA_TMP_DIR=$(mktemp -d)
#   FAUCET_URL=https://faucet.testnet-XXX.linera.net  # for some value XXX

Enable logs for user applications:

export LINERA_APPLICATION_LOGS=true

Set the path of the future wallet:

export LINERA_WALLET="$LINERA_TMP_DIR/wallet.json"
export LINERA_KEYSTORE="$LINERA_TMP_DIR/keystore.json"
export LINERA_STORAGE="rocksdb:$LINERA_TMP_DIR/client.db"

# Initialize a new user wallet.
linera wallet init --faucet $FAUCET_URL

# Request chains.
INFO1=($(linera wallet request-chain --faucet $FAUCET_URL))
INFO2=($(linera wallet request-chain --faucet $FAUCET_URL))
CHAIN1="${INFO1[0]}"
ACCOUNT1="${INFO1[1]}"
CHAIN2="${INFO2[0]}"
ACCOUNT2="${INFO2[1]}"

# Show the different chains tracked by the wallet.
linera wallet show

# Query the chain balance of some of the chains.
linera query-balance "$CHAIN1"
linera query-balance "$CHAIN2"

# Transfer 10 units then 5 back.
linera transfer 10 --from "$CHAIN1" --to "$CHAIN2"
linera transfer 5 --from "$CHAIN2" --to "$CHAIN1"

# Query balances again.
linera query-balance "$CHAIN1"
linera query-balance "$CHAIN2"

# Now let's fund the user balances.
linera transfer 5 --from "$CHAIN1" --to "$ACCOUNT1@$CHAIN1"
linera transfer 2 --from "$ACCOUNT1@$CHAIN1" --to "$ACCOUNT2@$CHAIN2"

# Query user balances again.
linera query-balance "$ACCOUNT1@$CHAIN1"
linera query-balance "$ACCOUNT2@$CHAIN2"

More complex examples may be found in our developer manual as well as the example applications in this repository.

Contributing

We welcome contributions from the community! If you'd like to contribute to the Linera protocol:

  1. Fork the repository
  2. Create a feature branch (git checkout -b feature/amazing-feature)
  3. Commit your changes (git commit -m 'Add some amazing feature')
  4. Push to the branch (git push origin feature/amazing-feature)
  5. Open a Pull Request

For detailed guidelines, see our contribution guide.

Dépôts similaires
unionlabs/union

The trust-minimized, zero-knowledge bridging protocol, designed for censorship resistance, extremely high security, and usage in decentralized finance.

Rustcrates.ioApache License 2.0blockchaincosmos
union.build
73.9k3.9k
FuelLabs/fuel-core

Rust full node implementation of the Fuel v2 protocol.

Rustcrates.ioOtherblockchainfuel
57k2.9k
ethereum/go-ethereum

Go implementation of the Ethereum protocol

GoGo ModulesGNU Lesser General Public License v3.0goblockchain
geth.ethereum.org
51.2k22k
anoma/anoma

Reference implementation of Anoma

ElixirMIT Licensecryptographyblockchain
anoma.net
33.7k4.1k
shardeum/shardeum

Shardeum is an EVM based autoscaling blockchain

TypeScriptnpmMIT Licenseblockchaindapp
shardeum.org
31.3k703
slymnoyann/hey-1

Hey is a decentralized and permissionless social media app built with Lens Protocol 🌿

TypeScriptnpmGNU General Public License v3.0web3blockchain
hey.xyz
29.4k1.8k
argotorg/solidity

Solidity, the Smart Contract Programming Language

C++GNU General Public License v3.0cppethereum
soliditylang.org
25.7k6.1k
bitcoinbook/bitcoinbook

Mastering Bitcoin 3rd Edition - Programming the Open Blockchain

HTMLOtherbitcoinbitcoin-api
aantonop.com/books
25.3k6.2k
zama-ai/fhevm

FHEVM, a full-stack framework for integrating Fully Homomorphic Encryption (FHE) with blockchain applications

Rustcrates.ioOtherblockchainfhe
25.2k2k
heyverse/hey

Hey is a decentralized and permissionless social media app built with Lens Protocol 🌿

TypeScriptnpmGNU Affero General Public License v3.0web3blockchain
hey.xyz
25k1.6k
ethereum/solidity

Solidity, the Smart Contract Programming Language

C++GNU General Public License v3.0cppethereum
soliditylang.org
24k6k
heyxyz/hey

Hey is a decentralized and permissionless social media app built with Lens Protocol 🌿

TypeScriptnpmweb3blockchain
hey.xyz
23.9k1.6k