An ❗ experimental & WIP ❗ implementation of the IBFT consensus protocol, written in Python.
This implementation is based on the Istanbul BFT Consensus Algorithm.
- Python3
- Run
make depsto install all the required Python packages
- Run
- RabbitMQ Server
- Installing on Ubuntu:
sudo apt-get install rabbitmq-server
- Installing on Ubuntu:
-
Even number consensus
- The base
Consensusclass attempts to form consensus on some even number - To launch a testnet of the base
Consensusclass, run./start_network.sh NUM_NODES ROUND_DURATION BYZ_QUORUM RC_THRESHOLD, where:NUM_NODESis the number of nodes in the networkROUND_DURATIONis the duration (in seconds) of the IBFT protocol roundBYZ_QUORUMis the number of nodes corresponding to a Byzantine quorumRC_THRESHOLDis the number of nodes corresponding to a round change threshold
- The base
-
drand consensus
- The IBFT protocol will form consensus over drand randomness for a given drand round number
- To launch a 4-node testnet, run
./start_drand_network.sh ROUND_DURATION DRAND_ROUND, where:ROUND_DURATIONis the duration (in seconds) of the IBFT protocol roundDRAND_ROUNDis the drand round number on whose output consensus will be formed
- There are 4 public HTTP endpoints to access drand randomness. The leader uses the first, and the other 3 nodes each use one of the rest:
- (Cloudflare) https://drand.cloudflare.com
- (Protocol Labs) https://api.drand.sh
- (Protocol Labs) https://api2.drand.sh
- (Protocol Labs) https://api3.drand.sh
- Learn more about drand at https://drand.love/
-
Lighthouse Eth2 data consensus
- The IBFT protocol will form consensus over Eth2 data fetched from a Lighthouse client
- To launch a testnet, run
./start_lighthouse_network.sh NUM_NODES ROUND_DURATION BYZ_QUORUM RC_THRESHOLD LIGHTHOUSE_API ETH2_SLOT, where:LIGHTHOUSE_APIis the Ligthouse HTTP endpoint for fetching dataETH2_SLOTis the Eth2 slot for which consensus will be formed on the corresponding block in the fork choice of the Lighthouse client