Skip to content

About

in this code i write the main block chain code where POW, Mining, Processing, Creating Block

Resources

Security policy

Stars

0 stars

Watchers

1 watching

Forks

Latest commit

 

History

10 Commits

Folders and files

NameName
Last commit message
Last commit date
 
 
 
 
 
 
 
 
 
 

Repository files navigation

Blockchain Implementation Using Python

This project is a Python implementation of a simple blockchain with core functionalities like Proof of Work (POW), mining, and block validation.

Features

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

Requirements

  • Python 3.x
  • FastAPI
  • Uvicorn

How to Run

1.Clone the repository:

  git clone https://github.com/MONGSING/BlockChain

2.Install dependencies:

  pip install fastapi uvicorn

3.Run the blockchain:

  python Main.py

Blockchain Structure

Each 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.

License

This project is licensed under the MIT License.

About

in this code i write the main block chain code where POW, Mining, Processing, Creating Block

Resources

Security policy

Stars

0 stars

Watchers

1 watching

Forks

Releases

Packages

Used by

Contributors

Languages