GithubHelp home page GithubHelp logo

night-mk / ditto Goto Github PK

View Code? Open in Web Editor NEW

This project forked from danielxiangzl/ditto

0.0 0.0 0.0 3.2 MB

Implementation of the 2-chain HotStuff with asynchronous fallback (Ditto) protocol.

License: Apache License 2.0

Python 27.32% Rust 72.68%

ditto's Introduction

Note to readers: The Ditto protocol implemented in this repo is currently under developement and will soon be published. In the meantime, you may be interested in the 2-chain HotStuff and 3-chain HotStuff that implements the classic HotStuff protocol.

Ditto

build status test status rustc license

This repo provides a minimal implementation of the Ditto protocol, which is 2-chain HotStuff with asynchronous fallback. The codebase has been designed to be small, efficient, and easy to benchmark and modify. It has not been designed to run in production but uses real cryptography (dalek), networking (tokio), and storage (rocksdb). More details about the protocol can be found in our paper Jolteon and Ditto: Network-Adaptive Efficient Consensus with Asynchronous Fallback.

Quick Start

Ditto is written in Rust, but all benchmarking scripts are written in Python and run with Fabric. To deploy and benchmark a testbed of 4 nodes on your local machine, clone the repo and install the python dependencies:

$ git clone https://github.com/danielxiangzl/hotstuff.git
$ cd hotstuff/benchmark
$ pip install -r requirements.txt

You also need to install Clang (required by rocksdb) and tmux (which runs all nodes and clients in the background). Finally, run a local benchmark using fabric:

$ fab local

This command may take a long time the first time you run it (compiling rust code in release mode may be slow) and you can customize a number of benchmark parameters in fabfile.py. When the benchmark terminates, it displays a summary of the execution similarly to the one below.

-----------------------------------------
 SUMMARY:
-----------------------------------------
 + CONFIG:
 Committee size: 4 nodes
 Input rate: 1,000 tx/s
 Transaction size: 512 B
 Faults: 0 nodes
 Execution time: 20 s

 Consensus max payloads size: 500 B
 Consensus min block delay: 0 ms
 Mempool max payloads size: 15,000 B
 Mempool min block delay: 0 ms

 + RESULTS:
 Consensus TPS: 966 tx/s
 Consensus BPS: 494,627 B/s
 Consensus latency: 1 ms

 End-to-end TPS: 966 tx/s
 End-to-end BPS: 494,576 B/s
 End-to-end latency: 4 ms
-----------------------------------------

Next Steps

The wiki documents the codebase, explains its architecture and how to read benchmarks' results, and provides a step-by-step tutorial to run benchmarks on Amazon Web Services accross multiple data centers (WAN).

License

This software is licensed as Apache 2.0.

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.