Skip to content

Latest commit

 

History

History
39 lines (30 loc) · 1.21 KB

File metadata and controls

39 lines (30 loc) · 1.21 KB

Simple Blockchain System In (Python)

This project demonstrates the fundamentals of blockchain architecture by implementing a simple blockchain in Python from scratch — no frameworks, just logic.

🚀 Features

  • 🧱 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.

How to Run

python3 blockchain.py

🛠️ Tech Stack

  • Language: Python 3
  • Hashing: SHA-256 (hashlib)
  • Logic: Pure OOP and Functional Design

🧠 Concepts Covered

  • Blockchain fundamentals
  • Hashing with SHA-256
  • Proof-of-Work difficulty
  • Merkle chain and block linking
  • Transaction verification
  • Final state & ledger maintenance

Sample Output

New Block Received; Checking... Block accepted. Chain length: 8 Final State: {'Alice': 76, 'Bob': 24}

Author

Aerospace