Welcome to Building_my_own_blockchain! 🚀
This repository is dedicated to exploring blockchain technology by building a simple blockchain from scratch using Python.
It’s perfect for anyone looking to understand the core concepts behind blockchains, including blocks, hashes, mining, and decentralized ledgers.
- Basic Blockchain Implementation: Learn how blocks are linked using hashes.
- Proof-of-Work: Simple mining algorithm to secure the blockchain.
- Transaction Model: Add and verify transactions within blocks.
- Consensus Mechanism: Understand how distributed agreement is achieved.
- Extensible Design: Easily expand with new features or integrate with front-end apps.
- Python 3.7+
- (Optional) pipenv or virtualenv for environment management
-
Clone the repository:
git clone https://github.com/Ankit12212/Building_my_own_blockchain.git cd Building_my_own_blockchain -
(Optional) Create a virtual environment:
python -m venv venv source venv/bin/activate # On Windows use `venv\Scripts\activate`
-
Install dependencies:
pip install -r requirements.txt
python blockchain.py(Replace blockchain.py with the main file name if different)
- Add transactions
- Mine new blocks
- View the current blockchain
- Experiment with different consensus rules
Building_my_own_blockchain/
├── blockchain.py # Main blockchain logic
├── block.py # Block data structure
├── transaction.py # Transaction model
├── requirements.txt # Dependencies
└── README.md # Project documentation
Contributions are welcome!
Feel free to open issues, submit pull requests, or suggest improvements.