Authors:
- Guilherme Sousa (fc58170)
- Gabriel Henriques (fc58182)
- Pedro Cascão (fc58232)
Grade: 18/20
This project was developed during the Distributed Fault Tolerance course, it implements the Streamlet blockchain protocol for crash faults in Python, based on Section 5 of the paper "Benjamin Y. Chan and Elaine Shi. Diego. Streamlet: Textbook Streamlined Blockchains. Proc. of the 2nd ACM Conference on Advances in Financial Technologies (AFT ’20). 2020. "
- Python
- Sockets for networking
- JSON for data serialization
- Multithreading for concurrent operations
- Python 3.x
To run the project, follow these steps:
-
Clone the repository.
-
Navigate to the project directory.
-
If on Windows, run the following command to start the protocol with a given seed and delta duration:
python start_protocol.py <seed> <delta>
This will start 5 nodes in separate terminals with the given seed, delta duration, and the default config file. It will also create a start_timestamp.txt file which contains the timestamp that all the nodes will start at.
-
If on other OS's, run the following command for each node:
python run_node.py <node_id> <seed> <delta> <config file (JSON)> <start_timestamp file>
If the start_timestamp.txt file does not exist, it will create one with the current time + 30 seconds.
python start_protocol.py 42 2