Welcome to the Rust implementation of the Marvin Blockchain. This project is part of a comparative study on building the same blockchain in both Go and Rust. Follow along as we explore the development process, performance, and features of a blockchain built in Rust.
Marvin Blockchain is a distributed ledger and EVM Compatible inspired by Bitcoin and Ethereum, implemented in Rust. This project aims to provide a robust and scalable blockchain solution while comparing the nuances of building the same system in Go.
Crafting a Blockchain in Go and Rust: A Comparative Journey - Series
- Proof of Work (PoW) Consensus Mechanism (Subject to Change)
- Peer-to-Peer (P2P) Networking
- Storage and Persistence
- Transaction and Block Validation
- Smart Contract Support via EVM Compatibility
- JSON-RPC API
- Comprehensive Unit Tests and Benchmarks
- Rust 1.80 or higher
- Git
-
Clone the repository:
git clone https://github.com/joaoh82/marvin-blockchain-rust.git cd marvin-blockchain-rust
-
Build the project:
cargo build --release
To start a node on the Marvin Blockchain:
./target/release/marvin-blockchain
To run the unit tests:
cargo test
- Add CLI support for ease of interaction
- Implemented key pair creation, sign and verify
- Create key pair with mnemonic seed
- Add address command to CLI
- Basic transaction and block data structures and validation
- Add better error handling
- Add protobuf encoding/decoding
- Implement the basic blockchain data structure
- Added basic application logging with slog crate
- Peer-to-Peer (P2P) networking implementation (transport layer)
- Proof of Work (PoW) consensus mechanism
- Peer-to-Peer (P2P) networking implementation (transport layer)
- Storage and persistence for blockchain data
- EVM integration for smart contract support
- JSON-RPC API implementation
- Advanced transaction handling and validation
- Enhanced security measures and best practices
- Performance benchmarking and optimization
- Comprehensive documentation and examples
- Implement wallet functionalities
- Improve EVM compatibility and support
- Add more consensus mechanisms (e.g., PoS)
- Implement light client support
- Improve network protocol for better scalability
- Develop a robust test suite for security and performance
- Integration with Ethereum development tools
- Develop a block explorer
- Implement governance mechanisms
- Cross-chain interoperability solutions
- Improve documentation and developer guides
The project is structured as follows:
src/
: Contains the source code for the blockchain implementation.docs/
: Contains the documentation and guides for the project.src/cli/
: Contains the CLI implementation for the blockchain.src/core/
: Contains the core blockchain data structures and logic.src/network/
: Contains the networking implementation.src/transactions/
: Contains transaction handling and validation.src/wallet/
: Contains the wallet implementation.src/utils/
: Contains the utility functions and helpers.src/main.rs
: Contains the entry point for the blockchain application.tests/
: Contains the unit tests for the blockchain implementation.
Pull requests are warmly welcome!!!
For major changes, please open an issue first and let's talk about it. We are all ears!
If you'd like to contribute, please fork the repository and make changes as you'd like and shoot a Pull Request our way!
Please make sure to update tests as appropriate.
If you feel like you need it go check the GitHub documentation on creating a pull request.
Contribution to the project is organized under the terms of the Contributor Covenant, the maintainer of Marvin Blockchain, @joaoh82, promises to intervene to uphold that code of conduct.
This project is licensed under the MIT License. See the LICENSE file for more information.
For any inquiries or support, please open an issue on Github or contact me at Joao Henrique Machado Silva [email protected].