Skip to content
List modeled as a self-stabilizing replicated state machine based on failure detectors.
Branch: master
Clone or download
Fetching latest commit…
Cannot retrieve the latest commit at this time.
Permalink
Type Name Latest commit message Commit time
Failed to load latest commit information.
api
communication
conf
metrics
modules
resolve
scripts
tests
.gitignore
.loki.yml
.travis.yml
LICENSE
README.md
main.py
requirements.txt
setup.cfg

README.md

BFTList

Build status

This repository contains code for a list modeled as a BFT replicated state machine based on failure detectors, hence the clever name BFTList. This application is part of our Master's thesis at Chalmers University of Technology, with the task of validating the algorithm proposed in Self-Stabilizing Byzantine Tolerant Replicated State Machine Based on Failure Detectors written by Shlomi Dolev, Chryssis Georgiou, Ioannis Marcoullis and Elad M. Schiller.

Set up

First, make sure that you have Python 3.7 installed. Then, follow the commands below.

git clone https://github.com/sspbft/BFTList.git && cd BFTList
python3.7 -m venv env
source ./env/bin/activate
pip install --upgrade pip
pip install -r requirements.txt
chmod +x ./scripts/*

Instructions for how to run this application without using Thor (which you should not, since Thor was built for this exact use case) will be added later.

Linting

The code base is linted using flake8 with pydocstyle, so make sure to lint the code by running flake8 before pushing any code.

Testing

unittest is setup so add appropriate unit tests in the tests/unit_tests folder (make sure the file starts with test_) and appropriate integration tests in the tests/integration_tests folder. Tests can run as seen below.

./scripts/test              # runs all tests
./scripts/test unit         # runs only unit tests
./scripts/test it           # runs only integration tests
./scripts/test <pattern>    # runs all test files with a filename matching pattern

Travis integration

Both linting and testing is setup to be run for all Pull Requests and on each push to master by Travis.

System description

Ports

Each running node uses three ports: one for the API (default to 400{node_id}), one for the self-stabilizing communication channel with other nodes (500{node_id}) and one for exposing metrics to the Prometheus scraper (300{node_id}). Node with id 1 would therefore be using ports 3001, 4001 and 5001 for example.

Port number Service
300{ID} Prometheus metrics endpoint
400{ID} REST API
500{ID} Inter-node communication
You can’t perform that action at this time.