README required for the final hand in
- Docker
- Docker -compose
- Java
- Maven
- Navigate to the project directory
- Run: ./run.sh
- mvn clean package (necessary if you had only images built)
- mvn dockerfile:build -U (Forces a check for missing releases and updated snapshots or remote repositories)
- docker-compose up
We have decided to use screenshots rather than a screencast as we have a bot creating transactions and broadcasting the transactions to each node. This would make it very hard to follow what is going on.
If you want to broadcast a transaction manually you can run the nodes and using Postman send a node a JSON of the transaction object. Sending a transaction to one node automatically sends it to all other nodes.
- URL: http://192.168.99.100:8080/broadcast/transaction
- JSON:
{"giver":"Adam", "amount":5, "receiver":"Paul"}
Zoom in if the text on the picture is unreadable, screenshots have high resolution.
- This is a picture of the docker compose command being run and all 4 nodes starting up their own servers. The nodes run a Spring server each which will mine blocks from received transactions and then keep all block chains up to date.
- Here you can see that the nodes are mining the first transactions. The first node to have mined the transactions is then broadcasting the block to all other nodes which are then affirming that they recieved a valid block (each node verifies if the block received is valid) and then adding that block to their block chain.
- This image shows the continuation of mining from the nodes. It is visible, although a little hard to see, that the blockchains are the same for each node. The reason for it being hard to see is that the nodes mine asynchronously and the output is a jumbled up.
- Here the process of random transactions being pushed to the nodes is ending after 25 seconds. The process then ends and the test scenario is done running.
Resources:



