The repository contains an implementation of a distributed ledger platform and its client using Python.
This ledger has the following features:
- Possibility of adding multiple nodes to the ledger
- Proof of Work (PoW)
- Conflict resolution between nodes
- Transactions with RSA encryption
- Identification by JWT
- Independent database per node
The blockchain client has the following features:
- Wallets generation using Public/Private key encryption (based on RSA algorithm)
- Generation of transactions with RSA encryption
- User identification by the Public/Private key
The respository also includes a Postman test collection and environment created in order to test the endpoint.
This code takes as its starting point the source code proposed by Adil Moujahid
- Python 3.7
- Pipfile contains all the dependencies for the code to run
-
To start a blockchain node, go to blockchain folder and execute the command below:
python server_api.py -p 5000
You can add a new node to blockchain by executing the same command and specifying a port that is not already used. For example,
python server_api.py -p 5001
NOTE: We recommend running 3 blockchain nodes and a client simultaneously.
-
To start the blockchain client, go to blockchain_client folder and execute the command below:
python client_app.py -p 8080
-
To start with a created ledger execute the command below:
python initialize.py