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