This is an implementation of core blockchain features in Python, built from scratch. The project aims to demonstrate the fundamental concepts of blockchain technology including blocks, hashing, proof of work, and decentralized consensus.
Blockchain technology has gained significant attention for its potential to revolutionize industries by providing transparent, secure, and decentralized data management solutions. This project serves as an educational tool to understand how blockchain works through practical implementation.
- Block Structure: Each block contains an index, timestamp, data, previous hash, and a nonce.
- Hashing: Blocks are linked using cryptographic hashing (SHA-256).
- Proof of Work: Implements a basic proof of work algorithm for block mining.
- Web Interface: Includes a Flask-based web interface to interact with the blockchain (mine new blocks, view the chain).
-
Clone the repository:
git clone https://github.com/chinnanj666/blockchain-project.git cd blockchain-python
-
Install dependencies:
Ensure you have Python 3 installed. Install Flask if not already installed:
pip install flask
-
Run the blockchain: Start the Flask server to run the blockchain: python3 your_python_filename.py, in mycase app.py
python app.py
The server will start on http://127.0.0.1:5000/mine.
-
Mining a New Block: Open a web browser and navigate to http://127.0.0.1:5000/mine to mine a new block.
-
Viewing the Blockchain:
Navigate to http://127.0.0.1:5000/chain to view the current state of the blockchain.
Contributions are welcome! Please fork the repository and create a pull request with your improvements. For major changes, please open an issue first to discuss what you would like to change.
This project is licensed under the MIT License - see the LICENSE file for details.