/BlockchainSimulation

A blockchain simulation that visually emphasizes key concepts, like Proof-of-Work.

Primary LanguagePython

Description

These files simulate a blockchain. Notably this demo shows a simplification of some of the harder to understand details in order to shed light. Key elements that can be seen here:

  1. How Ethereum prevents double spending
  2. How the proof-of-work algorithm creates blocks
  3. How blocks are chained together
  4. How accounts update state

Quick Use

  1. clone and cd into folder

  2. type python3 BlockchainDemo.py

  3. mine first block -> choose '8' from option menu

  4. add account -> choose '1' or '2'

  5. bradcast txn -> choose '3' (follow prompts)

  6. view txns -> choose '5' (txn should appear)

  7. mine block -> choose '8'

  8. view txns -> choose '5' (txn should be empty)