Skip to content
/ kofta Public

An experimental Python implementation of the IBFT consensus protocol

Notifications You must be signed in to change notification settings

adiasg/kofta

Repository files navigation

kofta

An ❗ experimental & WIP ❗ implementation of the IBFT consensus protocol, written in Python.

This implementation is based on the Istanbul BFT Consensus Algorithm.

Requirements

  • Python3
    • Run make deps to install all the required Python packages
  • RabbitMQ Server
    • Installing on Ubuntu:
        sudo apt-get install rabbitmq-server

Examples

  • Even number consensus

    • The base Consensus class attempts to form consensus on some even number
    • To launch a testnet of the base Consensus class, run ./start_network.sh NUM_NODES ROUND_DURATION BYZ_QUORUM RC_THRESHOLD, where:
      • NUM_NODES is the number of nodes in the network
      • ROUND_DURATION is the duration (in seconds) of the IBFT protocol round
      • BYZ_QUORUM is the number of nodes corresponding to a Byzantine quorum
      • RC_THRESHOLD is the number of nodes corresponding to a round change threshold
  • 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_DURATION is the duration (in seconds) of the IBFT protocol round
      • DRAND_ROUND is 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:
    • 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_API is the Ligthouse HTTP endpoint for fetching data
      • ETH2_SLOT is the Eth2 slot for which consensus will be formed on the corresponding block in the fork choice of the Lighthouse client

About

An experimental Python implementation of the IBFT consensus protocol

Topics

Resources

Stars

Watchers

Forks

Releases

No releases published

Packages

No packages published