File tree Expand file tree Collapse file tree
Expand file tree Collapse file tree Original file line number Diff line number Diff line change 1+ # Agent Guidelines
2+
3+ ## Formatting and Lints
4+
5+ Always run the following after any code modification:
6+
7+ ``` bash
8+ cargo +nightly fmt
9+ cargo clippy --workspace --all-targets --all-features -- -D warnings
10+ ```
11+
12+ ## Modifying BFT Code
13+
14+ When making changes to BFT-related code (anything under ` node/bft/ ` ), run the following checks in order:
15+
16+ ### 1. Unit tests
17+
18+ ``` bash
19+ cargo test -p snarkos-node-bft --lib
20+ ```
21+
22+ ### 2. Build with test features
23+
24+ The CI scripts invoke ` snarkos ` by name, so the binary must be on PATH. Build it with the
25+ ` test_network ` feature and prepend the output directory to PATH:
26+
27+ ``` bash
28+ cargo build --features test_network
29+ export PATH=" $PWD /target/debug:$PATH "
30+ ```
31+
32+ ### 3. Devnet test
33+
34+ ``` bash
35+ .ci/test_devnet.sh
36+ ```
37+
38+ ### 4. Additional CI tests
39+
40+ Ask the user whether they want to run the following tests before merging. These cannot run
41+ concurrently and take significant time in total, so they are not always run on every change.
42+
43+ ``` bash
44+ .ci/test_partial_upgrade.sh
45+ .ci/test_full_upgrade.sh
46+ .ci/test_restart_majority.sh
47+ .ci/test_reset_minority.sh
48+ .ci/test_restart_all.sh
49+ ```
You can’t perform that action at this time.
0 commit comments