This project demonstrates the fundamentals of blockchain architecture by implementing a simple blockchain in Python from scratch β no frameworks, just logic.
- π§± Custom Blockchain with block structure, hashes, and chaining logic.
- βοΈ Proof-of-Work algorithm to simulate mining difficulty and validation.
- π Transaction System with support for sender, receiver, and balances.
- π§ Smart State Logic that maintains user balances and prevents double-spending.
- π Chain Validation and block integrity check on each new addition.
- π Simple CLI Interface to simulate block creation and network behavior.
python3 blockchain.pyπ οΈ Tech Stack
- Language: Python 3
- Hashing: SHA-256 (hashlib)
- Logic: Pure OOP and Functional Design
- Blockchain fundamentals
- Hashing with SHA-256
- Proof-of-Work difficulty
- Merkle chain and block linking
- Transaction verification
- Final state & ledger maintenance
New Block Received; Checking... Block accepted. Chain length: 8 Final State: {'Alice': 76, 'Bob': 24}