This is an implementation of the Practical Byzantine Fault Tolerance (PBFT) consensus protocol for CSE535.
- Linear PBFT consensus protocol implementation using collector same as primary
- Pre-prepare, Prepare, and Commit phases
- View change mechanism
- Basic client-replica communication
-
Threshold Signatures
- Used for signature aggregation in consensus phases like sending collected prepare and collected commit
- Implemented using BLS signature scheme via Herumi BLS library
-
Checkpointing
- Periodic state synchronization mechanism
- State recovery functionality
-
Optimistic Phase Reduction
- Reduced commit consensus phases in fault-free scenarios i.e. full quorum (3f+1)
- Fallback to standard PBFT when needed
client.cpp: Client implementationnode.cpp: Replica node implementationorchestrator.cpp: System orchestratormessages.proto: Protocol buffer message definitionsbls_helper.h: BLS signature utilitieslogger.h: Logging functionalitythreadpool.h: Thread pool implementationresettable_timer.h: Timer implementation
mkdir build
cd build
cmake ..cmake --build . --target run_orchestrator # inside build directory- CMake (>= 3.10)
- gRPC/Protocol Buffers
- BLS Signature Library
- C++17 compiler
- ChatGPT : Used chatGPT to discuss design scenarios, optimise data structure usage and to debug code errors.
- https://github.com/herumi/bls : For sample CPP bls usage and structure identification
- Co-pilot : For formatting the readme file.