Skip to content

Ahmed-anwar/blockchain-network

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

35 Commits
 
 
 
 
 
 
 
 
 
 

Repository files navigation

BlockChain Network

We simulate a multi-user network for a cryptocurrency as Bitcoin. Once a transaction is made, the user randomly picks some of his peers to notify who in turn notify others. Once a user accumulates n transactions, it strives to form a block by doing a computationally expensive task and announce it afterwards. Users who receive the announced block, add it to their version of blockchain (ledger) and if a majority consent is reached for the current ledger version, users of different versions throw them away and adopt the new one.

Running the tests

  1. Compile all files.
  2. Run the Main.java file in the src/main folder.
  3. Call test2() for a longer chain substitution scenario, or test1() for an almost random scenario.

Built With

  • Java 😍
  • Java SE Security

Authors

✨ صايبر الرباعي

About

No description, website, or topics provided.

Resources

Stars

Watchers

Forks

Releases

No releases published

Packages

No packages published

Contributors 3

  •  
  •  
  •  

Languages