Skip to content

PoulomiNandy/ComputerNetwork-Blockchain

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

1 Commit
 
 
 
 
 
 
 
 
 
 
 
 

Repository files navigation

2020-net-h

Blockchain peer-to-peer network basic implementation.

To implement, the following codes should be run in order -

1. Tracker.py

2. Peer1.py

3. Peer2.py

4. Peer3.py

Process

1. As soon as the peer files and tracker file are run, the connection to the tracker is established automatically.

2. Then a GUI window appears for each peer as shown below -

3. Click on "peer list" box in all the peer GUIs to request for the list of peers from the tracker.Showing only peer1 as other two are similar to peer1

  • Peer1 Output console

4. Then, click on "connect peers" box in all GUIs to get the connection between all peers.

  • Peer1 Output Console

  • Peer2 Output Console

  • Peer3 Output Console

5. Now, all the peers are interconnected to each other.

  • Peer1 Output Console after interconnection

  • Peer2 Output Console after interconnection

  • Peer3 Output Console after interconnection

6. There is a box with title "create transaction" in every peer GUI. Using this we can generate random transactions and send it to all the other peers. Then, every peer tries to mine using the transaction and whichever peer mines first will get a reward.

  • Peer1 has created transaction and its displayed in peer1.py output console

  • Peer2 has received transaction and its displayed in peer2.py output console

  • Peer3 has received transaction and its displayed in peer3.py output console

7. The message will be shown in terminal as "cheese mined" and broadcasted to all peers.

  • This shows new cheese is added in other peers

  • This shows new cheese is minied in this peer

  • This shows new cheese is added in other peers

8. The existing cheeseblock can anytime be requested by clicking on "show cheese stack" box.

  • Cheese Stack is shown in all the peers. We have taken only one cheese stack output here

9. Note - All the results are displayed in the terminal of corresponding peer code. This feature has not been added in the GUI.

References:

About

No description, website, or topics provided.

Resources

Stars

Watchers

Forks

Releases

No releases published

Packages

No packages published

Languages