skale-consensus
skale-consensus copied to clipboard
Running the very core of SKL network, SKALE BFT consensus is universal, modern, modular, high-performance, asynchronous, provably-secure, agent-based Proof-of-Stake blockchain consensus engine in C++...
SKALE Consensus: a BFT Consensus engine in C++
SKALE consensus utilizes multiple block proposers. Block proposers distribute proposals to nodes and collect a BLS-signature based data availability proofs. An Asynchronous Binary Byzantine Agreement is then executed for each block proposal to reach consensus on whether it is data-available. If multiple block proposals are known to be data-available, a BLS-based common coin is used to select the winning proposal that is committed to the chain.
SKALE Consensus uses an Asynchronous Binary Byzantine Agreement (ABBA) protocol. The current implementation uses ABBA from Mostefaoui et al. In general, any ABBA protocol can be used so long as it has the following properties:
- Network model: protocol assumes asynchronous network messaging model.
- Byzantine nodes: protocol assumes less than 1/3 of nodes are Byzantine.
- Initial vote: protocol assumes each node makes an initial yes or no vote.
- Consensus vote: protocol terminates with consensus vote of either yes or no. Where consensus vote is yes, it is guaranteed that at least one honest node voted yes.
An important note about production readiness:
The SKALE consensus is still in active development and contains bugs. This software should be regarded as alpha software. Development is still subject to competing the specification, security hardening, further testing, and breaking changes. This consensus engine has not yet been reviewed or audited for security. Please see SECURITY.md for reporting policies.
Installation Requirements
SKALE consensus has been built and tested on Ubuntu 18.04 and later.
The preferred build environment is currenty Ubuntu 22.04.
Ensure that the required packages are installed by executing:
sudo add-apt-repository ppa:ubuntu-toolchain-r/test
sudo apt update
sudo apt install -yq libprocps-dev gcc-9 g++-9 valgrind gawk sed libffi-dev ccache \
libgoogle-perftools-dev flex bison yasm texinfo autotools-dev automake \
python3 python3-pip cmake libtool build-essential pkg-config autoconf wget \
git libargtable2-dev libmicrohttpd-dev libhiredis-dev redis-server openssl \
libssl-dev doxygen libgcrypt20-dev
Building from source on Ubuntu (Development)
Steps to build from source:
# clone repo
git clone --recurse-submodules https://github.com/skalenetwork/skale-consensus.git
# build dependencies
cd scripts && ./build_deps.sh
# Configure the Cmake build.
cd .. && cmake . -Bbuild
# now run hunter bug workaround
mkdir -p "${HOME}"/.hunter/_Base/Download/crc32c/1.0.5/dc7fa8c/ && wget -O "${HOME}"/.hunter/_Base/Download/crc32c/1.0.5/dc7fa8c/hunter-1.0.5.tar.gz https://github.com/hunter-packages/crc32c/archive/refs/tags/hunter-1.0.5.tar.gz
# now build all targets using all available CPU cores
cmake --build build -- -j$(nproc)
Running tests
Navigate to the testing directories and run ./consensusd .
Libraries
- libBLS by SKALE Labs
Contributing
If you have any questions please ask our development community on Discord.
License
Copyright (C) 2018-present SKALE Labs