Skip to content

HackerNews-lsd2017/block-chain

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

83 Commits
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 

Repository files navigation

Blockchain Project

README required for the final hand in

Requirements:

  • Docker
  • Docker -compose
  • Java
  • Maven

To run the project with only one command - unix systems:

  1. Navigate to the project directory
  2. Run: ./run.sh

To run the project manually

  1. mvn clean package (necessary if you had only images built)
  2. mvn dockerfile:build -U (Forces a check for missing releases and updated snapshots or remote repositories)
  3. docker-compose up

Snapshots of a running blockchain in the network of 4 nodes

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.

Zoom in if the text on the picture is unreadable, screenshots have high resolution.

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

alt text

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

alt text

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

alt text

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

alt text

Resources:

About

No description, website, or topics provided.

Resources

Stars

0 stars

Watchers

2 watching

Forks

Packages

 
 
 

Contributors