Coder Social home page Coder Social logo

bancaditalia / itcoin-fbft Goto Github PK

View Code? Open in Web Editor NEW
5.0 5.0 0.0 7.45 MB

Certified Byzantine Fault Tolerance with Schnorr signature aggregation

Home Page: https://bancaditalia.github.io/itcoin

License: GNU Affero General Public License v3.0

CMake 2.58% Prolog 23.31% Shell 2.01% Python 26.00% C++ 46.11%
byzantine-fault-tolerance bft-protocols consensus distributed-systems dlt

itcoin-fbft's Introduction

Frosted Byzantine Fault Tolerance (FBFT)

tests

This repository contains the implementation of an itcoin "consensus node", which implements the Frosted Byzantine Fault Tolerance (FBFT) Proof-of-Authority consensus algorithm for the itcoin blockchain. You can find more information about itcoin at the project web page.

Please note that this software is solely intended for testing and experimentation purposes, and is not ready for use in a production environment: In its current form, it misses features โ€” such as support for dynamic federations โ€” that are crucial for any real-world deployment.

๐Ÿ‘‡๐Ÿ‘‡๐Ÿ‘‡ Hereafter you find the instructions to get started with FBFT. ๐Ÿ‘‡๐Ÿ‘‡๐Ÿ‘‡

Quick start on Ubuntu 22.04 LTS

  1. Install build and dev dependencies with apt (system-wide):
sudo apt install --no-install-recommends -y \
    autoconf \
    automake \
    bsdextrautils \
    ca-certificates \
    cmake \
    g++ \
    gcc \
    git \
    jq \
    libtool \
    make \
    openssh-client \
    pkg-config \
    python3 \
    tmux \
    xxd \
    zlib1g-dev

sudo apt install --no-install-recommends -y \
    libargtable2-dev \
    libboost-filesystem1.74-dev \
    libboost-log1.74-dev \
    libboost-program-options1.74-dev \
    libboost-test1.74-dev \
    libboost-thread1.74-dev \
    libcurl4-openssl-dev \
    libdb5.3++-dev \
    libevent-dev \
    libsqlite3-dev \
    libssl-dev \
    libzmq3-dev \
    swi-prolog
  1. Clone the repository itcoin-core
cd ~
git clone https://github.com/bancaditalia/itcoin-core.git
  1. Clone the repository bancaditalia/itcoin-fbft, at the same level of itcoin-core:
cd ~
git clone https://github.com/bancaditalia/itcoin-fbft.git
  1. Build the project
cd ~/itcoin-fbft
mkdir build
cd build
cmake -DITCOIN_CORE_SRC_DIR=../../itcoin-core ..
make -j$(nproc --ignore=1)
  1. Reset and start 4 mining network bridge nodes.

This will setup a 4-nodes infrastructure with 10 seconds target block time.

cd ~/itcoin-fbft
./infra/reset-infra.sh 10
./infra/start-infra.sh

The above command will spawn 4 itcoin-core daemon nodes that are used for testing. You can query the state of the mining nodes using the command line. After a reset, all nodes should have 0 blocks.

cd ~/itcoin-fbft
./infra/bitcoin-cli.sh 0 getblockchaininfo
./infra/bitcoin-cli.sh 1 getblockchaininfo
./infra/bitcoin-cli.sh 2 getblockchaininfo
./infra/bitcoin-cli.sh 3 getblockchaininfo
  1. Start the miner consensus nodes

We suggest that you run the four nodes in different terminals:

cd ~/itcoin-fbft
build/src/main -datadir=infra/node00
build/src/main -datadir=infra/node01
build/src/main -datadir=infra/node02
build/src/main -datadir=infra/node03

Run the tests

Ensure that the 4 mining network bridge nodes are up and running. Then launch:

cd ~/itcoin-fbft/build
make test

itcoin-fbft's People

Contributors

mabene-bi avatar sgiammy-rta avatar

Stargazers

 avatar  avatar  avatar  avatar  avatar

Watchers

 avatar  avatar  avatar  avatar  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.