diff --git a/bin/dfx-sns-demo-mksns-parallel b/bin/dfx-sns-demo-mksns-parallel index 2436135c..36b545cd 100755 --- a/bin/dfx-sns-demo-mksns-parallel +++ b/bin/dfx-sns-demo-mksns-parallel @@ -73,10 +73,14 @@ create_all_sns() { PROCESSES=() echo "I am $$" for ((i = 0; i < NUM_SNS_TO_MAKE; i++)); do + # Creating wallet canisters in parallel started occasionally failing with + # 0.24.1. When creating 10 in parallel, almost always at least 1 would fail. + # So we create the users outside the background process. + DEMO_USER="snsdemo_$i" + make_user "$DEMO_USER" ( echo "Starting $BASHPID" DEMO_USER="snsdemo_$i" - make_user "$DEMO_USER" become_user "$DEMO_USER" ./bin/dfx-sns-demo-mksns-config --config_index $((CONFIG_INDEX_OFFSET + i)) --unique_logo "$UNIQUE_LOGO" diff --git a/bin/dfx-sns-import-by-proposal b/bin/dfx-sns-import-by-proposal index fb1a9e57..9c325b80 100755 --- a/bin/dfx-sns-import-by-proposal +++ b/bin/dfx-sns-import-by-proposal @@ -64,13 +64,6 @@ for ((try = 20; try > 0; try--)); do sleep 2 done -list_root_canister_id() { - dfx canister call nns-sns-wasm list_deployed_snses '(record{})' | idl2json | jq -r '.instances[] | .root_canister_id[0]' -} - -echo "Current $(list_root_canister_id | wc -l) existing SNS root canister Ids:" -list_root_canister_id - if [[ "$SUCCESS" = "false" ]]; then echo "Failed to import SNS canisters for proposal $PROPOSAL_ID" >&2 exit 1 diff --git a/bin/dfx-stock-deploy b/bin/dfx-stock-deploy index 7a5b6fb2..5a099f27 100755 --- a/bin/dfx-stock-deploy +++ b/bin/dfx-stock-deploy @@ -49,6 +49,13 @@ if [ "${PARALLEL_SNS_COUNT:-0}" -gt 0 ]; then dfx-sns-demo-mksns-parallel --network "$DFX_NETWORK" --num_sns "$PARALLEL_SNS_COUNT" --majority snsdemo8 --config_index_offset 2 --unique_logo "$UNIQUE_LOGO" fi +SNS_COUNT="$(dfx canister call nns-sns-wasm list_deployed_snses '(record{})' | idl2json | jq -r '.instances | length')" +EXPECTED_SNS_COUNT="$((2 + PARALLEL_SNS_COUNT))" +if [[ "$SNS_COUNT" != "$EXPECTED_SNS_COUNT" ]]; then + echo "❌ Expected $EXPECTED_SNS_COUNT SNSes. Found $SNS_COUNT" + exit 1 +fi + : Set up ckbtc canisters dfx-ckbtc-import --prefix ckbtc_ dfx-ckbtc-deploy --prefix ckbtc_ --network "$DFX_NETWORK" --yes