This is a simple blockchain implementation in Python. It includes functionalities such as adding users, adding transactions, mining blocks, verifying the chain's integrity, exploring the blockchain, and exiting the program through a menu-driven command-line interface (CLI).
- Add User: Add a new user to the blockchain with an initial balance.
- Add Transaction: Perform a transaction between users, transferring tokens from one user to another.
- Mine Block: Validate pending transactions, create a new block, and reward the miner with tokens.
- Verify Chain: Check if the blockchain is valid and has not been tampered with.
- Explore Blockchain: View all blocks in the blockchain and the current pending transactions.
- Exit: Quit the program.
- Python
- hashlib
- json
- time
-
Clone the repository to your local machine:
git clone https://github.com/Vikranth3140/BlockChain.git
-
Navigate to the project directory:
cd BlockChain
-
Install the requred dependancies:
pip install -r requirements.txt
-
Run the BlockChain program:
python main.py
-
Follow the on-screen instructions to interact with the blockchain:
- Add users with initial balances.
- Add transactions between users.
- Mine blocks to validate transactions and earn mining rewards.
- Verify the integrity of the blockchain.
- Explore the blockchain to view blocks and transactions.
- Exit the program.
This project is licensed under the MIT License.