A blockchain prototype implementation in Rust, featuring a very minimal web interface for easy interaction. This project demonstrates the core concepts of blockchain technology while maintaining a clean and modular architecture.
-
Blockchain Core
- Block creation and validation
- Chain integrity verification
- Proof of existence through SHA-256 hashing
- Genesis block initialization
-
Web Interface
- Real-time block visualization
- Manual block creation
- Peer management interface
- RESTful API endpoints
-
Peer Network (Work in Progress)
- Basic peer connection management
- Groundwork laid for P2P communication
- Chain synchronization (planned)
- Backend: Rust
- Web Server: Rouille
- Cryptography: SHA-256
- Concurrency: Parking Lot
- Serialization: Serde
- Frontend: HTML, JavaScript
- Rust (latest stable version)
- Cargo package manager
- Clone the repository
git clone [email protected]:Gwen-M/rustblock.git
cd rustblock
- Build the project
cargo build
- Run the server
cargo run
- Open your browser and navigate to
http://localhost:8000
GET /blocks
- Retrieve all blocks in the chainPOST /mintBlock
- Create a new blockGET /peers
- List all connected peersPOST /addPeer
- Connect to a new peer
This project is a prototype and some features are still under development. The peer-to-peer networking functionality is partially implemented, with the groundwork laid for future development of complete node synchronization and block propagation.
- Complete P2P network implementation
- Block propagation across nodes
- Consensus mechanism
- Network resilience and fault tolerance
- Advanced block validation rules
All rights reserved
Contributions are welcome! Feel free to submit a Pull Request.
This is an educational project meant to demonstrate blockchain concepts. It is not intended for production use.