Skip to content

MathieuDutSik/linera-protocol_second

This branch is 4 commits ahead of, 61 commits behind linera-io/linera-protocol:main.

Folders and files

NameName
Last commit message
Last commit date

Latest commit

d5da4ef · Dec 6, 2024
May 5, 2024
Dec 6, 2024
Oct 21, 2024
Nov 28, 2024
Dec 2, 2024
Oct 22, 2024
Nov 28, 2024
Dec 6, 2024
Dec 5, 2024
Dec 6, 2024
Nov 19, 2024
Nov 28, 2024
Nov 26, 2024
Dec 2, 2024
Dec 5, 2024
May 12, 2024
Dec 5, 2024
Dec 6, 2024
Dec 5, 2024
Nov 30, 2024
Nov 26, 2024
Nov 26, 2024
Nov 19, 2024
Oct 4, 2024
Dec 6, 2024
Nov 9, 2024
Nov 19, 2024
Nov 11, 2024
Sep 19, 2024
Nov 1, 2023
Oct 30, 2023
Oct 27, 2023
Sep 2, 2023
Apr 1, 2024
Mar 31, 2024
Nov 26, 2024
Nov 14, 2024
Nov 28, 2024
Dec 6, 2024
Apr 25, 2024
Jan 18, 2022
Oct 27, 2024
Jul 18, 2024
Oct 4, 2024
Sep 6, 2024
Oct 31, 2024
Jan 23, 2024
Jul 5, 2024
Sep 19, 2024
Aug 28, 2024
Oct 27, 2023

Repository files navigation

License Build Status for Rust Build Status for Documentation Build Status for DynamoDB

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

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 infos 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 logics for runtime and execution of Linera applications.

  • linera-chain Persistent data and the corresponding logics 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.

Quickstart with the Linera service CLI

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 --features storage-service
export PATH="$PWD/target/debug:$PATH"

# Import the optional helper function `linera_spawn_and_read_wallet_variables`.
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. (The helper function `linera_spawn_and_read_wallet_variables`
# is used to set the two environment variables LINERA_{WALLET,STORAGE}.)
linera_spawn_and_read_wallet_variables \
linera net up

# Print the set of validators.
linera query-validators

# Query the chain balance of some of the chains.
CHAIN1="e476187f6ddfeb9d588c7b45d3df334d5501d6499b3f9ad5595cae86cce16a65"
CHAIN2="69705f85ac4c9fef6c02b4d83426aaaf05154c645ec1c61665f8e450f0468bc0"
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"

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

About

Secondary fork of the linera-protocol repository

Resources

License

Stars

Watchers

Forks

Releases

No releases published

Packages

No packages published

Languages

  • Rust 98.2%
  • Vue 0.8%
  • TypeScript 0.4%
  • Shell 0.4%
  • Dockerfile 0.1%
  • Nix 0.1%