Code Monkey home page Code Monkey logo

dory-bft-consensus's Introduction

Dory BFT Consensus

Implementation of two asynchronous BFT consensus protocols: Dory and sDumbo.

In the following, we take Dory as an example to show how to run the code.

cd Dory

Run the code Locally

You can launch a demo easily through the go test command:

go test -timeout 30s -run ^TestMainProgress$ Dory/internal/aab

By default, the above command will run a demo where N=4, F=1 for 2 epochs. You can adjust the parameters by editing Dory/internal/aab/dory_test.go.

Depoly the Amazon EC2 experiment

  1. Before depolying the code on the Amazon EC2 instances, you need to manually start the EC2 instances and record their IP addresses and port numbers. Then, configure the information of your instances in Dory/config.yaml. You can find an example in this file.
  • N means the total number of parties;
  • F means the tolerance, usually N=3F+1 in the experiments;
  • IPList means the IP list of the instances;
  • PortList means the port list of the instances;
  • PrepareTime means the preparation time before starting the experiment;
  • WaitTime means the waiting time after finishing the experiment.
  1. Generate the keys. We provide a docker script to atomatically generate keys and configuration files for each instance:
docker compose up config_build

After that, you can find N configuration files with encoded keys in Dory/configs.

  1. Compile and create an executable file. Run the following command and find the executable file start in Dory/build.
docker compose up main_build
  1. Upload the executable file and the configuration file to the corresponding Amazon EC2 instance. For example, rename config_0.yaml to config.yaml, and upload it with start to the first EC2 instance.

  2. Run the executable files on EC2 instances. To start an experiment with the batch size 10000, run the following command simultaneously on the EC2 instances,

cd /home/ubuntu && nohup ./start 10000 > /dev/null 2>log &

You can do this through AWS SDK (such as boto3). After the experiment ends, find the reports on your EC2 instances.

LICENSE

dory-bft-consensus's People

Contributors

xygdys avatar

Stargazers

 avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar

Watchers

 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.