This repository is an implementation of the Giskard Consensus Protocol. The Giskard consensus protocol is used to validate transactions and computations in the PlatON network and tolerates Byzantine failures among participating nodes. This implementation integrates the protocol into the blockchain-framework Hyperledger Sawtooth, for testing its safety and liveness property.
- In earlier work from 2020, Giskard was specified informally
- as well as formally in the Coq proof assistant.
- The Coq formalization is described in a technical report.
- Hyperledger Sawtooth framework
!Warning! The project is still in a cleanup phase, installation might not work yet without problems, and testing is still partially manually instrumented!
This library is developed on and intended for systems running:
- Ubuntu 18.04 (Bionic) installation guide
- Python version 3.6.9 installation guide
If you do not want to install Ubuntu onto your computer, consider installing a virtual machine
- Install Sawtooth Hyperledger and choose the steps with PoET as the consensus protocol
- Download this repository, and replace the files in the respective packages of sawtooth, in the folder /usr/lib/python3/dist-packages/ with the files from this repo
- folder in question "sawtooth_poet_engine", "sawtooth_poet_tests"
- Install python dependencies by calling: pip install -r requirements.txt
Go to the folder /usr/lib/python3/dist-packages/ and run the desired tests with the command:
sudo nose2-3 -c sawtooth_poet_tests/nose2.cfg -v -s sawtooth_poet_tests/ test_giskard_network.TestGiskardNetwork.test_giskard_network > /sawtooth_poet_tests/text.txt 2>&1
This will store the logs from all nodes and the test into a text file. Replace test_giskard_network.TestGiskardNetwork.test_giskard_network with the desired test. You can find the tests in the file test_giskard_network.py in the folder tests/sawtooth_poet_tests/