We developed & incorporated blockchain from scratch in python to track food through various stages of supply chain and bring transparency to data with integrity and validity(incorruptible data).
The main logic of blockchain is in blockchain.py
We made an API with various functionalities for blockchain as mentioned in blockchain.py. The API is built using Flask and you can test the API requests using Postman.
To run and test it:
-
download this repo locally
-
run winCoin.py in terminal (host= '0.0.0.0', port= 5000)
-
run winCoin1.py in separate terminal (host= '0.0.0.0', port= 5001)
-
run winCoin2.py in separate terminal (host= '0.0.0.0', port= 5002)
-
& so on for as many nodes as you want
-
now open Postman
-
make requests accordingly from blockchain.py file
the POST request format for adding nodes is in nodes.json & for adding transactions is in transaction.json
NOTE : It is a college project, for further information refer Project Report