Always run the following after any code modification:
cargo +nightly-2026-04-02 fmt
cargo clippy --workspace --all-targets --all-features -- -D warningsFormatting requires the nightly .circleci/config.yml pins as fmt_nightly --
.rustfmt.toml uses nightly-only options, and plain cargo fmt drops them
silently rather than refusing.
Comments must describe the state of the code today -- not a previous state or an alternative state.
Exception: Comments may describe an alternative possible state of the code, if they are documenting a hazard that a future developer may otherwise walk into.
Comments must not describe the rationale for a change.
Rationale may appear in: the commit message and the pull request. You may self-comment on your own github pull request at select positions in the code to aide reviewers.
Comments must help someone who has never heard of this change you are making.
Comments must not state the obvious. Comments that explain what attributes do or how language constructs work are unhelpful.
When making changes to BFT-related code (anything under node/bft/), run the following checks in order:
cargo test -p snarkos-node-bft --libThe CI scripts invoke snarkos by name, so the binary must be on PATH. Build it with the
test_network feature and prepend the output directory to PATH:
cargo build --features test_network
export PATH="$PWD/target/debug:$PATH".ci/test_devnet.shAsk the user whether they want to run the following tests before merging. These cannot run concurrently and take significant time in total, so they are not always run on every change.
.ci/test_partial_upgrade.sh
.ci/test_full_upgrade.sh
.ci/test_restart_majority.sh
.ci/test_reset_minority.sh
.ci/test_restart_all.sh