Thanks for your interest in contributing to Morph Reth! This document provides guidelines and information for contributors.
- Fork the repository on GitHub
- Clone your fork locally:
git clone https://github.com/<your-username>/morph-reth.git cd morph-reth
- Add the upstream remote:
git remote add upstream https://github.com/morph-l2/morph-reth.git
- Create a new branch for your work:
git checkout -b feat/my-feature
- Rust 1.88 or later
- Cargo
cargo build --release# Run all tests
cargo test --all
# Run tests for a specific crate
cargo test -p morph-consensusBefore submitting a pull request, ensure all checks pass:
# Format code
cargo fmt --all
# Run clippy lints
cargo clippy --all --all-targets -- -D warnings
# Run doc tests
cargo test --doc --all --verbose- Ensure your branch is up to date with
main:git fetch upstream git rebase upstream/main
- Write clear, concise commit messages following Conventional Commits:
feat:for new featuresfix:for bug fixesrefactor:for code refactoringdocs:for documentation changestest:for adding or updating testschore:for maintenance tasks
- Include tests for new functionality
- Update documentation if your changes affect public APIs
- Open a pull request against
mainwith a clear description of the changes
See README.md for an overview of the crate structure.
- Follow standard Rust conventions and idioms
- Use
cargo fmtformatting (stable toolchain) - All public items should have documentation comments
- Avoid
unsafecode unless absolutely necessary and well-documented
- Use GitHub Issues to report bugs or request features
- Include steps to reproduce for bug reports
- Provide relevant logs, error messages, and environment details
By contributing to Morph Reth, you agree that your contributions will be licensed under the MIT License or Apache License 2.0, at your option.