Skip to content

xygdys/Dory-BFT-Consensus

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

21 Commits
 
 
 
 
 
 

Repository files navigation

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

About

Implementation of two BFT consensus protocols

Resources

Stars

Watchers

Forks

Releases

No releases published

Packages

No packages published

Languages