Giter VIP home page Giter VIP logo

linera-protocol's Introduction

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

Linera

This repository is dedicated to developing the Linera protocol. For an overview of how the Linera protocol functions refer to the whitepaper.

Repository Structure

The Linera protocol repository is broken down into the following crates and subdirectories: (from low-level to high-level in the dependency graph)

  1. linera-base Base definitions, including cryptography.

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

  3. linera-execution Persistent data and the corresponding logics for runtime and execution of smart contracts / applications.

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

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

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

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

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

  9. linera-sdk The library to develop Linera applications written in Rust for the Wasm virtual machine.

  10. examples Examples of Linera applications written in Rust.

Quickstart with the Linera service CLI

# Make sure to compile the Linera binaries and add them in the $PATH.
# cargo build -p linera-service --bins
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 0 extra user wallets.
# This will set environment variables LINERA_{WALLET,STORAGE}_0 referenced by -w0 below.
linera_spawn_and_read_wallet_variables linera net up --extra-wallets 0

# Print the set of validators.
linera -w0 query-validators

# Query some of the chains created at genesis
CHAIN1="e476187f6ddfeb9d588c7b45d3df334d5501d6499b3f9ad5595cae86cce16a65"
CHAIN2="256e1dbc00482ddd619c293cc0df94d366afe7980022bb22d99e33036fd465dd"
linera -w0 query-balance "$CHAIN1"
linera -w0 query-balance "$CHAIN2"

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

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

linera-protocol's People

Contributors

jvff avatar ma2bd avatar afck avatar christos-h avatar mathieudutsik avatar andresilva91 avatar twey avatar maxtori avatar firedpeanut avatar harnen avatar laurentmazare avatar ashu26jha avatar duguorong009 avatar martinkong1990 avatar fakefraud avatar

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    ๐Ÿ–– Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. ๐Ÿ“Š๐Ÿ“ˆ๐ŸŽ‰

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google โค๏ธ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.