Thank you for your interest in contributing to the Norn Protocol. This document provides guidelines and information to help you get started.
- Fork the repository on GitHub.
- Clone your fork locally:
git clone https://github.com/<your-username>/norn-protocol.git cd norn-protocol
- Create a branch for your work:
git checkout -b feat/your-feature-name
- Make your changes, commit, and push to your fork.
- Open a Pull Request against the
mainbranch.
- Rust (stable toolchain)
The repository includes a rust-toolchain.toml that pins the stable channel with clippy and rustfmt components.
cargo build --workspacecargo test --workspacecargo clippy --workspace -- -D warnings
cargo fmt --checkAll three commands must pass before submitting a pull request.
Use descriptive branch names with a type prefix:
feat/description-- New featurefix/description-- Bug fixrefactor/description-- Code refactoringdocs/description-- Documentation changestest/description-- Test additions or fixes
This project follows Conventional Commits:
<type>[optional scope]: <description>
[optional body]
[optional footer(s)]
Common types: feat, fix, docs, style, refactor, perf, test, chore.
Examples:
feat: add batch transfer support to Thread enginefix: resolve overflow in fee calculationtest: add regression tests for Merkle proof verification
Include in your pull request description:
- What the change does
- Why the change is needed
- How to test it
- Any breaking changes or migration notes
- Run
cargo fmtbefore committing. The project uses defaultrustfmtsettings. - Run
cargo clippy --workspace -- -D warningsand resolve all warnings. - Do not use
unsafecode unless strictly necessary and clearly justified in comments. - Use
thiserrorfor error enums. Follow the existing error patterns in each crate. - Use
borshfor serialization of protocol types.
- All new code must include tests.
cargo test --workspacemust pass with no failures.- Add regression tests for any bug fix.
- End-to-end tests go in the relevant crate's
tests/directory.
Use GitHub Issues to report bugs or request features. When reporting a bug, include:
- Steps to reproduce
- Expected behavior
- Actual behavior
- Rust version (
rustc --version) - Operating system
This project follows the Contributor Covenant Code of Conduct. By participating, you are expected to uphold this code.