ThunderCore Chain
PaLa is a byzantine fault tolerant consensus protocol invented by T-H. Hubert Chan, Rafael Pass, and Elaine Shi. It can achieve low latency and high throughput in a partially synchronous network setting. PaLa allows support seamless proposer switch with no delay in normal operation. When there is a network partition, the protocol switches proposers with little delay (say 6s) to keep liveness as long as there are at least one honest proposer and 2/3 voters in a single partition. All honest nodes maintain consistency no matter how the network is partitioned.
Distributed Consensus in Practice
To fill the gap between the academic paper and a working product, our developers discussed the details of PaLa with Prof. Elaine Shi and came up with the pseudocode. The pseudocode is the reference for this project and is a good starting point for understanding this beautiful consensus protocol.
Development Environment Setup
Compile with local go(recommand version 1.16)
$ make pala
Run all tests
$ make test
Localchain
You need Docker
Please refer to https://docs.docker.com/install/ for Docker installation
Start or Stop localchain
$ cd ./scripts
$ python3 ./chain.py start
$ python3 ./chain.py stop
$ python3 ./chain.py start --help # for more options
Single Process Pala
clear the datadir and launch the single process
$ ./scripts/test/pala-dev -c
$ ./scripts/test/pala-dev
Contributing
Feel free to fork and make PRs. We are glad to see feedback from the community and make the implementation and tests more complete.
Supporting Documents
- Doubly Pipelined PaLa pseudocode: understand how the consensus protocol is implemented in practice.
- Terminology and data flow: understand how PaLa works via examples of different scenarios.
- Software architecture: understand the architecture and how objects interact.
- Goroutines and Channels: understand the concurrency design.
- Slides for PaLa talk: Slides for a talk on PaLa and PaLa software architecture given by Chia-Hao Lo @ COSCUP 2019. A recording of the talk itself given in Mandarin is available here.
License
MIT Copyright (C) 2017-2023 Thunder Token Inc.