Dark Mode

Skip to content

Navigation Menu

Sign in
Appearance settings

Search code, repositories, users, issues, pull requests...

Provide feedback

We read every piece of feedback, and take your input very seriously.

Saved searches

Use saved searches to filter your results more quickly

Sign up
Appearance settings

Testnet #4098

New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking "Sign up for GitHub", you agree to our terms of service and privacy statement. We'll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Draft
vicsn wants to merge 222 commits into mainnet
base: mainnet
Choose a base branch
Loading
from testnet
Draft

Testnet #4098

Show file tree
Hide file tree
Changes from 8 commits
Commits
Show all changes
222 commits
Select commit Hold shift + click to select a range
7b9c19c
Disallow unknown peers as validator
vicsn Nov 3, 2025
5bda671
Revive test
vicsn Nov 4, 2025
8192ddc
Fix tests
vicsn Nov 4, 2025
e2e545e
Implement reporting unit test timings in CI
meddle0x53 Nov 4, 2025
3057912
Merge branch 'staging' into staging
meddle0x53 Nov 5, 2025
63cdf06
Extend devnet_ci.sh timeouts
vicsn Nov 5, 2025
a7f3a6b
Fix tests
vicsn Nov 5, 2025
a524946
Merge pull request #3997 from ProvableHQ/prerelease-v4.4.8
vicsn Nov 6, 2025
8490314
Merge branch 'staging' into staging
meddle0x53 Nov 6, 2025
bd2f270
Ignore IP-banning if we're in dev mode
vicsn Nov 6, 2025
3539ec7
Disable peer banning
vicsn Nov 6, 2025
7f346cf
Remove timed out peers
vicsn Nov 6, 2025
e9fc022
Comment out ban-related tests
vicsn Nov 6, 2025
9dff2b8
Merge pull request #3994 from meddle0x53/staging
vicsn Nov 6, 2025
ad01a30
Merge pull request #4001 from ProvableHQ/prerelease-v4.4.9
vicsn Nov 7, 2025
7a0afa2
refactor(node/bft): adjust to the sequential processing changes in sn...
ljedrz Oct 22, 2025
0f7d2f9
Merge pull request #3964 from ljedrz/feat/replace_vm_locks_with_channel
vicsn Nov 8, 2025
6b01242
log(node/bft): show detailed errors in BFT
kaimast Nov 10, 2025
545738e
fix(node): use array for handshake commit hashes
kaimast Nov 10, 2025
ce05b19
Updated README.md to explain how to enable optional CUDA features
mikenike360 Nov 11, 2025
f58e7ae
Updated README.md to explain how to enable optional CUDA features
mikenike360 Nov 11, 2025
547470f
Updated README.md to explain how to enable optional CUDA features
mikenike360 Nov 11, 2025
3344448
Merge pull request #4005 from ProvableHQ/log/bft-errors
kaimast Nov 12, 2025
de5dd90
Merge pull request #4006 from ProvableHQ/fix/sha-length
kaimast Nov 12, 2025
a43b19a
refactor(bft): update sequential ops drop logic
kaimast Nov 10, 2025
ee85894
ci: increase timeout for installing snarkOS
kaimast Nov 10, 2025
f8d4731
Merge pull request #4009 from mikenike360/staging
vicsn Nov 12, 2025
fca0631
Merge pull request #3989 from ProvableHQ/disallow_unknown_peers_as_va...
vicsn Nov 12, 2025
8a5cf8d
Comment out PR template intro
vicsn Nov 12, 2025
b327259
Merge pull request #4007 from ProvableHQ/refactor/sequential-ops-drops
kaimast Nov 12, 2025
f16a4f8
Merge pull request #4010 from ProvableHQ/comment_pr_template_intro
kaimast Nov 12, 2025
56050c3
log(node/bft): downgrade duplicate signature warning to a debug message
kaimast Oct 29, 2025
fcf0346
log(node/bft): avoid certificate already in storage warnings
kaimast Oct 30, 2025
e361ac3
refactor(node): use block caching feature in snarkVM
kaimast Nov 11, 2025
d2e3d09
Merge pull request #3981 from ProvableHQ/fix/duplicate-signature
kaimast Nov 13, 2025
45dee2e
Merge pull request #3923 from ProvableHQ/perf/block-caching
vicsn Nov 15, 2025
7ef5520
Improve logging: log stake of unconnected validators
vicsn Nov 17, 2025
94754d3
log(node/bft): avoid `transaction/solution already exists` warnings
kaimast Nov 17, 2025
1f5bfdd
ci: add get-latest-block benchmark
kaimast Sep 22, 2025
3161ec2
chore: fix formatting
kaimast Nov 19, 2025
9b4fc76
Merge pull request #3876 from ProvableHQ/ci/bench-get-recent-block
kaimast Nov 19, 2025
d443d76
logs(node/consensus): avoid warning at beginning of epoch
kaimast Nov 19, 2025
af89636
misc(node/bft): minor code cleanups
kaimast Nov 19, 2025
d127d93
build: fix the scope of the 'serial' feature
ljedrz Nov 20, 2025
31c37a4
Merge pull request #4019 from ljedrz/fix/full_serial_feature
kaimast Nov 20, 2025
2c7a4bb
build: add audit exception for unmaintained number_prefix crate
kaimast Nov 20, 2025
387469e
hotfix: disable cleanup test for validators
kaimast Nov 21, 2025
0dfa537
Merge pull request #4015 from ProvableHQ/log/duplicate-deployment
vicsn Nov 21, 2025
3f83044
Merge pull request #4020 from ProvableHQ/build/cargo_audit_number_prefix
vicsn Nov 21, 2025
05b32d5
Merge branch 'staging' into log_unconnected_stake
vicsn Nov 21, 2025
03ad0c7
fix: a quick fix for Drop issues
ljedrz Nov 21, 2025
95d4f5f
tests: adjust to the API change
ljedrz Nov 21, 2025
a385bfc
feat(node): add unknown disconnect reason for forward compatibility
kaimast Nov 20, 2025
4027d70
misc: use Display for printing DisconnectReason
kaimast Nov 20, 2025
e691d03
misc(node): apply reviewer suggestions for disconnect improvements
kaimast Nov 24, 2025
1bb6592
Merge pull request #4021 from ljedrz/fix/drop_node_on_shutdown
kaimast Nov 24, 2025
e77278c
Merge pull request #4014 from ProvableHQ/log_unconnected_stake
kaimast Nov 24, 2025
8b7f213
fix(cli): ensure `dev execute` works with a v1 API
kaimast Nov 4, 2025
7eb5f99
fix(cli): never append an endpoint version
kaimast Nov 19, 2025
5174bb0
test(node/bft): add tests for committing multiple leader certificates
kaimast Nov 25, 2025
6eb4f11
misc(cli): determine API version from response
kaimast Nov 19, 2025
d8d6d49
misc(node): fix doc comment typos
kaimast Nov 26, 2025
e5b1311
Merge pull request #4024 from ProvableHQ/test/commit-via-link
kaimast Nov 26, 2025
bad54df
misc(cli): update comment
kaimast Nov 26, 2025
5934989
Merge pull request #4018 from ProvableHQ/feat/disconnect-reason
kaimast Nov 27, 2025
1848cee
Merge pull request #3996 from ProvableHQ/fix/query-v1-api
vicsn Nov 27, 2025
f22a261
Merge remote-tracking branch 'origin/staging' into postrelease-merge-...
vicsn Nov 27, 2025
dc6ab50
fix: avoid duplicate Disconnect executions using a new AtomicBool
ljedrz Nov 27, 2025
7d89f29
fix: stop reading on fatal channel errors in Reading::handle_new_conn...
ljedrz Nov 27, 2025
b23fa7e
Merge pull request #4028 from ljedrz/fix/tcp_edge_cases
vicsn Nov 28, 2025
2fbf565
fix(cli): handle invalid accounts correctly
kaimast Nov 7, 2025
e599190
Merge pull request #4003 from ProvableHQ/fix/nocredits
vicsn Dec 1, 2025
62de7c3
Remove unused dependency
vicsn Dec 1, 2025
44ceb32
Merge pull request #4027 from ProvableHQ/postrelease-merge-mainnet
kaimast Dec 1, 2025
05c5773
Log validator height
vicsn Oct 24, 2025
eecf300
perf(node/sync): advance block sync before sending new requests
kaimast Aug 28, 2025
72284c5
Revert "Merge pull request #3847 from ProvableHQ/fix/revert-pending-b...
kaimast Sep 17, 2025
04aa233
feat(node/bft): log panics in sync block advancement
kaimast Oct 2, 2025
857a80b
fix(node): handle case where validators connect through router port
kaimast Nov 21, 2025
1df6706
logs(node/bft): add more messages to debug block sync
kaimast Nov 24, 2025
180d239
fix(node/sync): correct rangify_heights for single values
kaimast Nov 26, 2025
4195e23
logs(node/bft): improve logging in BFT
kaimast Nov 21, 2025
0f80ab5
log(node/bft): don't show an error if block already exist in ledger
kaimast Nov 28, 2025
5946355
misc(node/bft): lock pending blocks before syncing certificates
kaimast Nov 28, 2025
561f9ff
Merge pull request #3968 from ProvableHQ/log_validator_height
kaimast Dec 1, 2025
84c82c9
feat: shut down gracefully
kaimast Nov 19, 2025
320b8a6
misc(node/utils): apply reviewer comments for shutdown handling
kaimast Nov 24, 2025
543db61
misc(node/cdn): use SignalHandler directly instead of Stoppable
kaimast Dec 1, 2025
aa6ddfc
build(node): add locktick feature where needed
kaimast Dec 1, 2025
9ff2e58
fix(node/network): allow handshake with peers that do not send commit...
kaimast Dec 1, 2025
c941a47
test(node/bft): fix commit_chain test
kaimast Dec 2, 2025
4cd95b4
test(node/bft): fix test failing due to blocking tasks
kaimast Dec 2, 2025
6bf5062
Merge pull request #4031 from ProvableHQ/fix/missing-sha
kaimast Dec 2, 2025
6ad7d71
misc(cli): apply more reviewer feedback for shutdown handling
kaimast Dec 2, 2025
c9267f9
misc(node/bft): do not print error about missing validator quorum in ...
kaimast Dec 3, 2025
a3606d1
ci: ensure devnet does not generate errors
kaimast Dec 3, 2025
b36506d
misc(node/bft): address reviewer comments
kaimast Dec 4, 2025
83757e8
fix(cli/developer): fetch edition for each import
vicsn Nov 6, 2025
c74b12d
docs(cli/developer): improve documentation for endpoint argument
vicsn Nov 6, 2025
7ba6481
fix(cli/developer): fix default explorer endpoint
kaimast Dec 4, 2025
2db8047
feat(cli/developer): add flag to skip funds check for testing
kaimast Dec 4, 2025
5749be2
Merge branch 'staging' into fix/developer_execute_recursive
vicsn Dec 5, 2025
c1dd501
Merge pull request #4035 from ProvableHQ/test/no-devnet-warnings
vicsn Dec 5, 2025
226f3ac
Merge pull request #3915 from ProvableHQ/feat/signal-handling
vicsn Dec 5, 2025
446d435
Merge branch 'staging' into fix/revert-revert-pending-blocks
kaimast Dec 5, 2025
36af76c
Merge pull request #4037 from ProvableHQ/fix/developer_execute_recursive
kaimast Dec 5, 2025
9e15763
log(cli): do not show debug logs on lowest verbosity level
kaimast Dec 3, 2025
ea7b6cf
doc(node/bft): add more documentation for availability threshold testing
kaimast Dec 5, 2025
1da74d8
docs(node/bft): fix / clean up code comments
kaimast Dec 5, 2025
8bac283
Merge pull request #3871 from ProvableHQ/fix/revert-revert-pending-bl...
vicsn Dec 5, 2025
0b95d05
ci: ensure that the devnet always uses IPv4
kaimast Dec 5, 2025
1e115a4
Merge pull request #4040 from ProvableHQ/fix/devnet-ipv6
kaimast Dec 8, 2025
78b5a13
Merge pull request #4034 from ProvableHQ/log/low-verbosity
vicsn Dec 9, 2025
c5c738f
feat: add better devnett peering and `--dev-num-clients` flag
kaimast Dec 12, 2025
c1280fc
ci: correctly test for failed nodes
kaimast Dec 16, 2025
70f7302
chore: resolve remaining shellcheck warnings in .ci
kaimast Dec 16, 2025
3638c79
ci: run shellcheck for all .ci scripts
kaimast Dec 16, 2025
4f9aece
ci: pick correct version for cargo-nextest
kaimast Dec 16, 2025
240f9f9
fix(cli): bind development node to 0.0.0.0, not localhost
kaimast Dec 17, 2025
e031930
ci: remove duplicate check for consensus version
kaimast Dec 17, 2025
b0d3828
Add metric for total connected stake
vicsn Dec 17, 2025
05fe710
fix(cli): make --peers and --dev-num-validators conflict
kaimast Dec 17, 2025
d830b35
fix(scripts): correct devnet script
kaimast Dec 17, 2025
b7a8012
Merge pull request #4043 from ProvableHQ/fix/scripts
vicsn Dec 18, 2025
49cd96a
ci: cleanup benchmarks
kaimast Dec 18, 2025
a51e77b
Merge pull request #4046 from ProvableHQ/fix/scripts
kaimast Dec 18, 2025
350ecf7
Merge pull request #4045 from ProvableHQ/expose_metric_for_total_conn...
vicsn Dec 19, 2025
fd20546
Update snarkVM rev
vicsn Dec 19, 2025
ce1bbba
Introduce CheckBlockError
vicsn Dec 19, 2025
6939c5f
feat(cli): rework node configuration directory
kaimast Dec 2, 2025
c49f2fa
ci: bump `cargo audit` version
kaimast Dec 23, 2025
743f6df
feat(cli): add auto migration feature
kaimast Dec 24, 2025
e66b945
feat: introduce a dynamic validator whitelist
ljedrz Dec 26, 2025
71bc68f
refactor: use save_best_peers to store the validator whitelist
ljedrz Dec 26, 2025
dfaa25f
Merge pull request #4054 from ljedrz/validator_whitelist
vicsn Dec 26, 2025
e44e94b
Merge branch 'staging' into update_snarkvm_rev
vicsn Jan 1, 2026
c8f5891
Merge remote-tracking branch 'origin/staging' into feat/filesystem-reorg
kaimast Jan 2, 2026
8465a7b
misc: update .gitignore
kaimast Jan 2, 2026
03c797e
misc: fix misspellings of 'gateway'
kaimast Jan 2, 2026
5b40729
misc(utils): remove dev field from 'NodeDataDir'
kaimast Jan 2, 2026
761134e
misc: rename all remaining instances of 'node-config' to 'node-data'
kaimast Jan 2, 2026
6b59e62
misc(util): simplify development mode for NodeDataDir
kaimast Jan 2, 2026
57a2c97
Merge pull request #4051 from ProvableHQ/update_snarkvm_rev
vicsn Jan 5, 2026
cee7ae0
Check missing previous certificates when syncing with batch header
vicsn Jan 5, 2026
51c67a4
Turn check_missing_previous_certificates into a const generic
vicsn Jan 5, 2026
3cf26dd
Make CDN error reporting more readable
vicsn Jan 6, 2026
a024b52
Pretty print error when CDN is unavailable
vicsn Jan 6, 2026
015a099
Update node/bft/src/gateway.rs
vicsn Jan 7, 2026
c4f0521
Fix prover solution submissions for tests
vicsn Jan 7, 2026
61e1440
Merge pull request #4060 from ProvableHQ/remove_strict_dev_requirement
kaimast Jan 7, 2026
9cdfdeb
ci: update cargo audit version
kaimast Jan 7, 2026
f3e5002
chore: update ratatui to 0.30
kaimast Jan 7, 2026
be1ff0e
chore: add exception for unmaintained bincode to cargo.audit
kaimast Jan 7, 2026
d47055b
Upgrade nodes in CI tests
meddle0x53 Jan 8, 2026
93dee73
Merge pull request #4058 from ProvableHQ/fix_cdn_error_reporting
vicsn Jan 8, 2026
3e43ecb
Fix cargo-audit in relation with bincode
meddle0x53 Jan 8, 2026
45fb2e7
Fix cargo-audit, related to LRU
meddle0x53 Jan 8, 2026
bd38b69
Merge branch 'staging' into staging
meddle0x53 Jan 8, 2026
cfdf32c
Add the canary, testnet and mainnet branches
meddle0x53 Jan 8, 2026
f9bd768
Merge pull request #4061 from ProvableHQ/ci/cargo-audit
vicsn Jan 8, 2026
52a73a4
Merge branch 'staging' into staging
meddle0x53 Jan 8, 2026
8b4d677
Merge pull request #4029 from meddle0x53/staging
vicsn Jan 8, 2026
eb66901
Merge branch 'staging' into add_previous_certificates_check
vicsn Jan 8, 2026
9502000
misc(cli): deny validator start if custom path is set for ledger but ...
kaimast Jan 8, 2026
3e2c045
refactor(cli): rename node-data to node-data-storage and storage to l...
kaimast Jan 9, 2026
e08e483
misc(cli): minor documentation fixes
kaimast Jan 9, 2026
c067ad5
misc(cli): use jwt_secret_file in jwt_secret_path
kaimast Jan 9, 2026
8780b8d
Merge remote-tracking branch 'origin/staging' into feat/filesystem-reorg
kaimast Jan 9, 2026
d23be76
Merge pull request #4033 from ProvableHQ/feat/filesystem-reorg
vicsn Jan 9, 2026
405ce26
Merge pull request #4057 from ProvableHQ/add_previous_certificates_check
vicsn Jan 9, 2026
74ad06f
Fix the upgrade test with --auto-migrate-node-data
meddle0x53 Jan 12, 2026
9510c90
Add a TODO to remove the migrate storage flag
meddle0x53 Jan 12, 2026
b1080b2
Update snarkVM rev
vicsn Jan 12, 2026
fe8a142
Merge pull request #4063 from meddle0x53/staging
vicsn Jan 12, 2026
eb831d2
Fix link to README banner
raychu86 Jan 12, 2026
bd86e5e
Merge pull request #4064 from ProvableHQ/fix/readme-banner
vicsn Jan 12, 2026
8b996f7
deduplicate peers when storing to a file
14MR Jan 14, 2026
e6fb7e0
run cargo fmt
14MR Jan 14, 2026
e272632
Update Cargo.lock
vicsn Jan 15, 2026
8938a33
Print explorer committee endpoint response
vicsn Jan 15, 2026
207486f
Fix explorer call
vicsn Jan 15, 2026
6941c08
Fix explorer call
vicsn Jan 16, 2026
77716da
Merge pull request #4073 from ProvableHQ/print_bootstrap_get_response
vicsn Jan 16, 2026
4ec22a3
Merge pull request #4072 from 14MR/fix/duplicated_validator_ips
vicsn Jan 16, 2026
04ba0a3
feat(node/sync): introduce `InsertBlockResponseError`
kaimast Jan 16, 2026
e76e6da
Merge pull request #4074 from ProvableHQ/fix/peer-consensus-version
vicsn Jan 22, 2026
d521646
Fix: appropriately set and document ConsensusVersion::V13 message ver...
vicsn Jan 22, 2026
4990c19
Bump snarkVM rev
vicsn Jan 30, 2026
dcda0d4
logs: print detailed errors in block sync and CDN sync
kaimast Jan 30, 2026
eff3f75
Merge pull request #4090 from ProvableHQ/fix/block-sync-logs
vicsn Jan 30, 2026
8cdbed7
Update snarkVM rev
vicsn Feb 2, 2026
7cdc93d
fix(node): ban peers with invalid consensus version
kaimast Jan 28, 2026
3302f29
ci: fix db test and log ci-runner output
kaimast Jan 22, 2026
d2129ba
ci: add partial node upgrade test
kaimast Jan 29, 2026
3974db6
fix(node/router): fix unit test for messages
kaimast Jan 29, 2026
c66e839
ci: run partial upgrade test
kaimast Jan 31, 2026
13fc228
ci: fix test_full_upgrade.sh
kaimast Feb 2, 2026
28c7bca
fix(node/cdn): correct Cargo.toml so tests build
kaimast Feb 2, 2026
6235986
ci: ignore benign sync error in devnet test
kaimast Feb 2, 2026
5480d99
Merge pull request #4087 from ProvableHQ/ci/upgrade-network
vicsn Feb 3, 2026
cc490e2
Update snarkVM rev
vicsn Feb 6, 2026
83760fd
Update snarkVM rev
vicsn Feb 6, 2026
ae67ecb
Bump Message::VERSIONS
vicsn Feb 6, 2026
76115a2
Update snarkVM rev
vicsn Feb 6, 2026
c0b9a20
Update release version
vicsn Feb 6, 2026
e97b948
Update snarkVM rev
vicsn Feb 15, 2026
95f3c07
Update snarkOS version
vicsn Feb 17, 2026
e942fa8
Update CI
vicsn Feb 17, 2026
7e17fc0
feat(cli): add `snarkos clean --keep-node-data`
kaimast Jan 22, 2026
8f04d7c
chore: update dependencies with a security warning
kaimast Feb 19, 2026
2e6d18e
fix(node/bft): update DAG when committing pending blocks
kaimast Feb 19, 2026
463d754
logs(node/bft): print more information about fetching transmissions
kaimast Feb 20, 2026
debbdbf
ci: do not use bft peers API in canary
kaimast Feb 20, 2026
2eeed3c
ci: do not use bft peers API in canary
kaimast Feb 20, 2026
cb8a841
Do not remove ledger of a quorum majority of validators
vicsn Feb 19, 2026
480d490
Rename test_reset_majority.sh to test_restart_majority.sh
vicsn Feb 19, 2026
5e469ea
Run tests on ci/log-ci-runner-canary
vicsn Feb 20, 2026
a495441
Commit delay-network.sh
vicsn Feb 20, 2026
e24cdaf
Merge pull request #4123 from ProvableHQ/ci/log-ci-runner-canary
vicsn Feb 20, 2026
dd4a039
Merge pull request #4125 from ProvableHQ/fix/sync-round-advancement-c...
vicsn Feb 20, 2026
c86e416
Update snarkVM rev
vicsn Feb 20, 2026
75e2c7c
Merge remote-tracking branch 'origin/canary' into testnet
vicsn Mar 1, 2026
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
20 changes: 11 additions & 9 deletions .ci/db_backup_ci.sh
View file
Open in desktop
Original file line number Diff line number Diff line change
Expand Up @@ -40,7 +40,8 @@ for ((validator_index = 0; validator_index < total_validators; validator_index++

log_file="$log_dir/validator-$validator_index.log"
snarkos start --nodisplay --network $network_id --dev $validator_index --dev-num-validators $total_validators \
--validator --jwt-secret $jwt_secret --jwt-timestamp $jwt_ts --verbosity $log_verbosity "--logfile=$log_file" &
--validator --jwt-secret $jwt_secret --jwt-timestamp $jwt_ts --verbosity $log_verbosity "--logfile=$log_file" \
"--node-data-storage=/tmp/node_data_$validator_index" "--ledger-storage=/tmp/ledger_$validator_index" &
PIDS[validator_index]=$!
log "Started validator $validator_index with PID ${PIDS[$validator_index]}"
# Add 1-second delay between starting nodes to avoid hitting rate limits
Expand Down Expand Up @@ -95,15 +96,16 @@ while (( total_wait < 600 )); do # 10 minutes max
wait

for ((validator_index = 0; validator_index < total_validators; validator_index++)); do
# Remove the original ledger
if (( num_checkpoints == 1 )); then
snarkos clean "--network=$network_id" "--dev=$validator_index"
# Remove the ledger storage. The node data is not backed up yet and will be kept.
if (( num_checkpoints == 1 )); then
# Remove the original ledger
snarkos clean "--network=$network_id" "--dev=$validator_index" --keep-node-data \
"--ledger-storage=/tmp/ledger_$validator_index"
else
# Remove the checkpoint
suffix="${validator_index}_$((num_checkpoints-2))"
# only remove ledger, until node-data is backed up properly.
rm -rf "/tmp/checkpoint_$suffix"
#snarkos clean "--network=$network_id" "--dev=validator_index" \
# "--node-data-storage=/tmp/node_data" "--ledger-storage=/tmp/checkpoint_$suffix"
snarkos clean "--network=$network_id" "--dev=$validator_index" --keep-node-data \
"--ledger-storage=/tmp/ledger_checkpoint_$suffix"
fi
# Wait until the cleanup concludes
sleep 1
Expand All @@ -113,7 +115,7 @@ while (( total_wait < 600 )); do # 10 minutes max
log_file="$log_dir/validator-$validator_index.log"
snarkos start --nodisplay "--network=$network_id" "--dev=$validator_index" "--dev-num-validators=$total_validators" \
--validator "--jwt-secret=$jwt_secret" "--jwt-timestamp=$jwt_ts" --verbosity $log_verbosity "--logfile=$log_file" \
"--node-data-storage=/tmp/node_data" "--ledger-storage=/tmp/checkpoint_$suffix" &
"--node-data-storage=/tmp/node_data_$validator_index" "--ledger-storage=/tmp/ledger_checkpoint_$suffix" &
PIDS[validator_index]=$!
log "Restarted validator $validator_index with PID ${PIDS[$validator_index]}"
# Add 1-second delay between starting nodes to avoid hitting rate limits
Expand Down
5 changes: 0 additions & 5 deletions .ci/test_reset_majority.sh - .ci/test_restart_majority.sh
View file
Open in desktop
Original file line number Diff line number Diff line change
Expand Up @@ -82,11 +82,6 @@ for iter in $(seq 1 "$num_resets"); do
mapfile -t target_indices < <(generate_random_indices "$majority" $(( ${#PIDS[@]} - 1 )))
stop_some_nodes "${target_indices[@]}"

for target_index in "${target_indices[@]}"; do
# Remove the original ledger
snarkos clean "--network=$network_id" "--dev=$target_index"
done

# wait for a non-trivial amount of time
sleep 30

Expand Down
27 changes: 2 additions & 25 deletions .ci/utils.sh
View file
Open in desktop
Original file line number Diff line number Diff line change
Expand Up @@ -394,31 +394,8 @@ function wait_for_peers() {

# Succeeds if the node with the given index has the specified number of BFT connections (or greater)
function wait_for_bft_connections() {
local node_index=$1
local min_peers=$2
local network_name=$3

local max_wait=300
local poll_interval=1
local port=$((3030 + node_index))

while (( total_wait < max_wait )); do
result=$(curl -s "http://$localhost:$port/v2/$network_name/connections/bft/count")

if ! (is_integer "$result"); then
log "Failed to get number of BFT connections for node #${node_index} (port=$port). Will retry..."
elif (( result < min_peers )); then
log "Node #${node_index} (port=$port) has $result BFT connections, expected at least $min_peers. Will wait and retry..."
else
return 0
fi

# Continue waiting
sleep $poll_interval
done

log " BFT connections did not reach $min_peers within 5 minutes."
return 1
# Not implemented on canary
return 0
}

# Blocks until the node with the given index has at least one peer to sync from (or times out).
Expand Down
16 changes: 8 additions & 8 deletions .circleci/config.yml
View file
Open in desktop
Original file line number Diff line number Diff line change
Expand Up @@ -607,7 +607,7 @@ jobs:
steps:
- checkout
- setup_environment:
cache_key: v4.2.0-rust-1.88.0-chaotic-majority-reset-test-cache
cache_key: v4.2.0-rust-1.88.0-chaotic-majority-restart-test-cache
- install_rust
- install_snarkos
- run:
Expand All @@ -616,12 +616,12 @@ jobs:
command: |
sudo ./scripts/delay-network.sh spikes 5000-5100
- run:
name: "Run Reset Majority Devnet Test"
timeout: 20m # Allow 20 minutes total
name: "Run Restart Majority Devnet Test"
no_output_timeout: 5m
command: |
./.ci/test_reset_majority.sh 7 0 20 250 3
./.ci/test_restart_majority.sh 7 0 20 250 3
- clear_environment:
cache_key: v4.2.0-rust-1.88.0-chaotic-majority-reset-test-cache
cache_key: v4.2.0-rust-1.88.0-chaotic-majority-restart-test-cache

upgrade-test:
executor: rust-docker
Expand Down Expand Up @@ -788,7 +788,7 @@ workflows:
filters:
branches:
only:
- ci/updated_network_delay_test
- ci/log-ci-runner-canary
- canary
- testnet
- mainnet
Expand All @@ -798,7 +798,7 @@ workflows:
filters:
branches:
only:
- ci/updated_network_delay_test
- ci/log-ci-runner-canary
- canary
- testnet
- mainnet
Expand All @@ -810,7 +810,7 @@ workflows:
filters:
branches:
only:
- ci/devnet-fixes
- ci/log-ci-runner-canary
- canary
- testnet
- mainnet
Expand Down
24 changes: 12 additions & 12 deletions Cargo.lock
View file
Open in desktop

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

12 changes: 9 additions & 3 deletions cli/src/commands/clean.rs
View file
Open in desktop
Original file line number Diff line number Diff line change
Expand Up @@ -40,17 +40,23 @@ pub struct Clean {
#[clap(long, alias = "path")]
pub ledger_storage: Option,

/// Keep the node data directory (disabled by default).
#[clap(long)]
pub keep_node_data: bool,

/// Sets a custom path for the node configuration. Overrides the default path (also for dev).
#[clap(long, alias = "node-data-path")]
#[clap(long, alias = "node-data-path", conflicts_with = "keep_node_data")]
pub node_data_storage: Option,
}

impl Clean {
/// Cleans the snarkOS node storage.
pub fn parse(self) -> Result {
// Remove the specified node configuration from storage.
let node_data_dir = parse_node_data_dir(&self.node_data_storage, self.network, self.dev)?;
println!("{}", Self::remove_node_data(&node_data_dir)?);
if !self.keep_node_data {
let node_data_dir = parse_node_data_dir(&self.node_data_storage, self.network, self.dev)?;
println!("{}", Self::remove_node_data(&node_data_dir)?);
}

// Remove the specified ledger from storage.
let storage_mode = match self.ledger_storage {
Expand Down
Loading