Skip to content

gabrielmfh/Streamlet-Blockchain

Repository files navigation

Streamlet Blockchain Implementation in Python

Authors:

  • Guilherme Sousa (fc58170)
  • Gabriel Henriques (fc58182)
  • Pedro Cascão (fc58232)

Grade: 18/20

Introduction

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. "

Technologies Used

  • Python
  • Sockets for networking
  • JSON for data serialization
  • Multithreading for concurrent operations

Requirements

  • Python 3.x

Usage

To run the project, follow these steps:

  1. Clone the repository.

  2. Navigate to the project directory.

  3. 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.

  4. 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.

Example

python start_protocol.py 42 2

About

Python implementation of the Streamlet Blockchain Protocol developed during Distributed Fault Tolerance course.

Resources

License

Stars

Watchers

Forks

Releases

No releases published

Packages

 
 
 

Contributors

Languages