This project is a Python implementation of a simple blockchain with core functionalities like Proof of Work (POW), mining, and block validation.
- Block Creation: Generates blocks with index, timestamp, data, proof, and previous hash.
- Mining: Implements Proof of Work by finding a valid hash starting with four leading zeros.
- Blockchain Validation: Verifies the integrity of the blockchain.
- Tamper Detection: Detects modifications to the blockchain.
- Python 3.x
- FastAPI
- Uvicorn
1.Clone the repository:
git clone https://github.com/MONGSING/BlockChain2.Install dependencies:
pip install fastapi uvicorn3.Run the blockchain:
python Main.pyEach block contains the following:
- Index: Position in the chain.
- Timestamp: Time of block creation.
- Data: Information stored in the block.
- Proof: Proof of Work for the block.
- Previous Hash: Hash of the previous block.
This project is licensed under the MIT License.