Project Details
Blockchain is a basic implementation of a blockchain using Python that demonstrates the fundamentals of blockchain technology for secure and decentralized systems.
Blockchain
Blockchain demonstrates key concepts, including genesis block creation, adding new blocks, and validating the integrity of the chain in a simple, educational Python implementation.
Blockchain illustrates the core principles of a blockchain, including block creation, hashing, and linking blocks in a secure chain. Each block is immutable and secured using SHA-256 hashes. The program includes a Genesis block, supports adding new blocks, and validates the chain's integrity.
Create a simple, educational blockchain that demonstrates how blocks are linked, hashed, and validated, while ensuring the code remains reliable, secure, well-structured, and maintainable.
I implemented a Python blockchain with a Block class containing index, timestamp, data, and SHA-256 hashes. The Blockchain class manages the chain, creates the Genesis block, adds new blocks, and validates the chain's integrity. Test scripts using Pytest ensure the correct behaviour of the code.
Key Features
- Genesis block creation
- Adding new blocks
- Blockchain validation
- SHA-256 hashing
- Immutable block attributes
- Unit tests with Pytest