Giter VIP home page Giter VIP logo

consensus-workbench's Introduction

Consensus workbench

Proof of concept Rust implementations for various distributed systems protocols.

Each sub-directory contains an implementation of a key/value store with specific replication or consensus strategies.

  1. Single node server
  2. Primary/backup server
  3. Two-phase commit (TODO)
  4. Lock-commit
  5. Raft (TODO)
  6. Proof of work blockchain
  7. Streamlet (TODO)
  8. Tendermint (TODO)
  9. HotStuff (TODO)
  10. Narwhal+Tusk (TODO)
  11. Narwhal+Bullshark (TODO)

Example usage

# run a single-node server
cargo run --bin single_node

# on a separate shell, send key/value commands to the server
cargo run --bin client -- set v1 hello
cargo run --bin client -- get v1

The default log level is INFO, to change it set the RUST_LOG environment variable before running. Possible values are OFF, ERROR, WARN, INFO, DEBUG and TRACE.

See the specific implementation directories for details on how to run each of them.

Suggested reads

This project is intended to be used as learning and training material for an introduction to conensus in distributed systems. For those new to these topics, we suggest checking the following background material before jumping into the code:

  1. Chapter 12 of Real-world cryptography: Crypto as in cryptocurrency provides a great introduction to the replication problem in distributed systems and goes from classical to blockchain solutions, including details about DiemBFT one of the most advanced consensus algorithms available.
  2. This raft vizualization shows one of the most popular algorithms in action.
    • As a complement the [raft paper], as well as the algorithm itself, is the best example of a consensus algorithm as found in popular distributed systems as etcd.
  3. The tendermint 2014 whitepaper is a short read that shows how consensus algorithms are used in the context of blockchain, and offers an alternative to Bitcoin's onerous proof-of-work mining.
    • This longer 2016 thesis extends the material providing a lot of useful historical context that helps briding the classical distributed systems research with the modern blockchain-related efforts.
  4. The Tokio tutorial is a good introduction to the async Rust techniques used in this project.

Additionally, we suggest reading the reference articles mentioned in each implementation's README.

Acknowledgments

  • The network and store modules of this projects were originally copied from asonnino/hotstuff and are under the Apache license.
  • The ledger module in the blockchain implementation was originally based on this tutorial.
  • Some of the algorithms were based on guides from the Decentralized Thoughts blog.

consensus-workbench's People

Contributors

elfantasma avatar facundoolano avatar franfiuba avatar igamigo avatar jrchatruc avatar unbalancedparentheses avatar

Stargazers

 avatar  avatar  avatar

Watchers

 avatar  avatar  avatar  avatar  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.