From e8dc469f3a52908ea5dcf178644e6eeb4c885ff2 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Rafa=C5=82=20Chabowski?= Date: Thu, 22 Aug 2024 17:25:16 +0200 Subject: [PATCH 01/10] Updates for `client.sh' test --- sh/scenarios/chainspecs/client.chainspec.toml.override | 2 ++ sh/scenarios/client.sh | 2 +- 2 files changed, 3 insertions(+), 1 deletion(-) create mode 100644 sh/scenarios/chainspecs/client.chainspec.toml.override diff --git a/sh/scenarios/chainspecs/client.chainspec.toml.override b/sh/scenarios/chainspecs/client.chainspec.toml.override new file mode 100644 index 0000000..ee7ab31 --- /dev/null +++ b/sh/scenarios/chainspecs/client.chainspec.toml.override @@ -0,0 +1,2 @@ +[transactions.v1] +wasm_lanes = [[2, 1_048_576, 2048, 1_000_000_000_000, 1], [3, 104857600, 1024, 500_000_000_000, 3], [4, 172_032, 1024, 50_000_000_000, 7], [5, 12_288, 512, 1_500_000_000, 15]] diff --git a/sh/scenarios/client.sh b/sh/scenarios/client.sh index 73cdf4f..848c118 100755 --- a/sh/scenarios/client.sh +++ b/sh/scenarios/client.sh @@ -77,7 +77,7 @@ function main() { # 0. Wait for network start up do_await_genesis_era_to_complete # 1. Check Subcommand Count - compare_client_subcommand_count "$(get_client_subcommand_count)" "31" + compare_client_subcommand_count "$(get_client_subcommand_count)" "34" # 2. Test Each Subcommand Outputs Help test_subcommand_help # 3. Test generate-completion subcommand: Each SHELL From 74bc9a698dd7aeebce6f6d02677ea5f3f8f00c74 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Rafa=C5=82=20Chabowski?= Date: Thu, 22 Aug 2024 17:53:56 +0200 Subject: [PATCH 02/10] Parse chainspec output correctly regardless of the ordering of sections --- sh/scenarios/client.sh | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) diff --git a/sh/scenarios/client.sh b/sh/scenarios/client.sh index 848c118..5e4dd36 100755 --- a/sh/scenarios/client.sh +++ b/sh/scenarios/client.sh @@ -1312,8 +1312,8 @@ function get_chainspec_from_rpc() { OUTPUT=$($(get_path_to_client) get-chainspec \ --node-address "$(get_node_address_rpc)" \ -vv \ - | sed -n '/\[protocol\]/,$p' \ - | sed '/FAUCET/Q') + | awk '/\[.+\]/{flag=1} flag' \ + | awk '/FAUCET/{exit} {print}') # Check non-empty check_client_responded "$OUTPUT" @@ -1341,7 +1341,7 @@ function get_chainspec_json_from_rpc() { OUTPUT=$($(get_path_to_client) get-chainspec \ --node-address "$(get_node_address_rpc)" \ -vv \ - | sed '/\[protocol\]/Q') + | awk '/\[.+\]/{exit} {print}') # Check non-empty check_client_responded "$OUTPUT" From c84f1210676bb6197aafcc7f5e1d347aa05a09c9 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Rafa=C5=82=20Chabowski?= Date: Mon, 26 Aug 2024 14:44:21 +0200 Subject: [PATCH 03/10] Add override for 'event_stream.sh' test --- sh/scenarios/chainspecs/event_stream.chainspec.toml.override | 2 ++ 1 file changed, 2 insertions(+) create mode 100644 sh/scenarios/chainspecs/event_stream.chainspec.toml.override diff --git a/sh/scenarios/chainspecs/event_stream.chainspec.toml.override b/sh/scenarios/chainspecs/event_stream.chainspec.toml.override new file mode 100644 index 0000000..ee7ab31 --- /dev/null +++ b/sh/scenarios/chainspecs/event_stream.chainspec.toml.override @@ -0,0 +1,2 @@ +[transactions.v1] +wasm_lanes = [[2, 1_048_576, 2048, 1_000_000_000_000, 1], [3, 104857600, 1024, 500_000_000_000, 3], [4, 172_032, 1024, 50_000_000_000, 7], [5, 12_288, 512, 1_500_000_000, 15]] From 3c5ee7d98a4733da01453151305fddb7a861690b Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Rafa=C5=82=20Chabowski?= Date: Tue, 27 Aug 2024 16:17:33 +0200 Subject: [PATCH 04/10] Bump the timeout in `validators_disconnect` test --- sh/scenarios/validators_disconnect.sh | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/sh/scenarios/validators_disconnect.sh b/sh/scenarios/validators_disconnect.sh index 8b62664..3d108d0 100644 --- a/sh/scenarios/validators_disconnect.sh +++ b/sh/scenarios/validators_disconnect.sh @@ -41,7 +41,7 @@ function main() { nctl-start node=6 nctl-start node=7 # 7. Check if the network is progressing - do_await_era_change_with_timeout 1 "500" + do_await_era_change_with_timeout 1 "1500" source "$NCTL"/sh/scenarios/common/health_checks.sh \ errors=0 \ equivocators=0 \ From d22929e9bda8830a611cdbeeb6c26459dfa824d1 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Rafa=C5=82=20Chabowski?= Date: Thu, 29 Aug 2024 11:39:40 +0200 Subject: [PATCH 05/10] Fix proposer parsing in `itst13.sh` --- sh/scenarios/common/itst.sh | 6 ++++-- 1 file changed, 4 insertions(+), 2 deletions(-) diff --git a/sh/scenarios/common/itst.sh b/sh/scenarios/common/itst.sh index 52ccc21..4976f17 100644 --- a/sh/scenarios/common/itst.sh +++ b/sh/scenarios/common/itst.sh @@ -472,7 +472,8 @@ function assert_node_proposed() { BLOCK="$(echo "$VERSIONED_BLOCK" | jq '.Version1')" fi - PROPOSER=$(echo "$BLOCK" | jq -r '.body.proposer') + PROPOSER=$(echo "$BLOCK" | jq -r '.header.proposer') + HEIGHT=$(echo "$BLOCK" | jq -r '.header.height') if [ "$PROPOSER" == "$PUBLIC_KEY_HEX" ]; then log "Node-$NODE_ID created a block!" @@ -480,6 +481,7 @@ function assert_node_proposed() { log "Proposer: $PROPOSER" break; else + log "Block $HEIGHT proposed by $PROPOSER, but we need one from $PUBLIC_KEY_HEX" sleep 1 TIMEOUT=$((TIMEOUT-1)) if [ "$TIMEOUT" = '0' ]; then @@ -516,7 +518,7 @@ function assert_no_proposal_walkback() { else BLOCK="$(echo "$VERSIONED_BLOCK" | jq '.Version1')" fi - PROPOSER=$(echo "$BLOCK" | jq -r '.body.proposer') + PROPOSER=$(echo "$BLOCK" | jq -r '.header.proposer') if [ "$PROPOSER" = "$PUBLIC_KEY_HEX" ]; then log "ERROR: Node proposal found!" log "BLOCK HASH $CHECK_HASH: PROPOSER=$PROPOSER, NODE_KEY_HEX=$PUBLIC_KEY_HEX" From 38a803274fbd44d9cab1d2f7a8bcff7487791188 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Rafa=C5=82=20Chabowski?= Date: Thu, 29 Aug 2024 13:06:54 +0200 Subject: [PATCH 06/10] Fix chainspec override for `swap_validator_set` test --- .../chainspecs/swap_validator_set.chainspec.toml.override | 3 +++ 1 file changed, 3 insertions(+) diff --git a/sh/scenarios/chainspecs/swap_validator_set.chainspec.toml.override b/sh/scenarios/chainspecs/swap_validator_set.chainspec.toml.override index b080a17..7d32595 100644 --- a/sh/scenarios/chainspecs/swap_validator_set.chainspec.toml.override +++ b/sh/scenarios/chainspecs/swap_validator_set.chainspec.toml.override @@ -3,3 +3,6 @@ round_seigniorage_rate = [0, 1] locked_funds_period = '0days' validator_slots = 5 vesting_schedule_period = '0days' + +[transactions.v1] +wasm_lanes = [[2, 1_048_576, 2048, 1_000_000_000_000, 1], [3, 104857600, 1024, 500_000_000_000, 3], [4, 172_032, 1024, 50_000_000_000, 7], [5, 12_288, 512, 1_500_000_000, 15]] From 8e3caf972ba8048dfff06dad0848fb0cedc7b6d4 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Rafa=C5=82=20Chabowski?= Date: Thu, 29 Aug 2024 14:20:20 +0200 Subject: [PATCH 07/10] Update chainspec override for `sync_upgrade_test` --- .../chainspecs/sync_upgrade_test.chainspec.toml.override | 2 ++ 1 file changed, 2 insertions(+) create mode 100644 sh/scenarios/chainspecs/sync_upgrade_test.chainspec.toml.override diff --git a/sh/scenarios/chainspecs/sync_upgrade_test.chainspec.toml.override b/sh/scenarios/chainspecs/sync_upgrade_test.chainspec.toml.override new file mode 100644 index 0000000..ee7ab31 --- /dev/null +++ b/sh/scenarios/chainspecs/sync_upgrade_test.chainspec.toml.override @@ -0,0 +1,2 @@ +[transactions.v1] +wasm_lanes = [[2, 1_048_576, 2048, 1_000_000_000_000, 1], [3, 104857600, 1024, 500_000_000_000, 3], [4, 172_032, 1024, 50_000_000_000, 7], [5, 12_288, 512, 1_500_000_000, 15]] From 91dcb6ee3e2de01d297d7db40a1cc669aff9707f Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Rafa=C5=82=20Chabowski?= Date: Thu, 29 Aug 2024 14:20:40 +0200 Subject: [PATCH 08/10] FIx status output parsing w.r.t protocol version --- sh/scenarios/sync_upgrade_test.sh | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/sh/scenarios/sync_upgrade_test.sh b/sh/scenarios/sync_upgrade_test.sh index 10aee28..bc5edfd 100755 --- a/sh/scenarios/sync_upgrade_test.sh +++ b/sh/scenarios/sync_upgrade_test.sh @@ -103,7 +103,7 @@ function assert_network_upgrade() { log_step "checking that entire network upgraded to $PROTO" CONVERTED=$(echo $PROTO | sed 's/_/./g') STATUS=$(nctl-view-node-status) - COUNT=$(grep 'api_version' <<< $STATUS[*] | grep -o "$CONVERTED" | wc -l) + COUNT=$(grep 'protocol_version' <<< $STATUS[*] | grep -o "$CONVERTED" | wc -l) RUNNING_COUNT=$(get_running_node_count) if [ ! "$COUNT" = "$RUNNING_COUNT" ]; then From 5f81f80574d6e5677ffaf9844faf45a5064c8585 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Rafa=C5=82=20Chabowski?= Date: Thu, 29 Aug 2024 14:21:03 +0200 Subject: [PATCH 09/10] Wait until nodes are able to report status --- sh/scenarios/sync_upgrade_test.sh | 8 ++++++++ 1 file changed, 8 insertions(+) diff --git a/sh/scenarios/sync_upgrade_test.sh b/sh/scenarios/sync_upgrade_test.sh index bc5edfd..53cd9d3 100755 --- a/sh/scenarios/sync_upgrade_test.sh +++ b/sh/scenarios/sync_upgrade_test.sh @@ -103,6 +103,14 @@ function assert_network_upgrade() { log_step "checking that entire network upgraded to $PROTO" CONVERTED=$(echo $PROTO | sed 's/_/./g') STATUS=$(nctl-view-node-status) + + # The empty status response is usually ~16 lines long, so we wait for more than that. + while [[ $(echo "$STATUS" | wc -l) -le 200 ]]; do + echo "Waiting for nodes and sidecars to start..." + sleep 3 + STATUS=$(nctl-view-node-status) + done + COUNT=$(grep 'protocol_version' <<< $STATUS[*] | grep -o "$CONVERTED" | wc -l) RUNNING_COUNT=$(get_running_node_count) From 30fe4a406a711bb0d9d482d8a8747695d01eaed5 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Rafa=C5=82=20Chabowski?= Date: Thu, 29 Aug 2024 16:34:13 +0200 Subject: [PATCH 10/10] Make the log message consistent with the others --- sh/scenarios/sync_upgrade_test.sh | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/sh/scenarios/sync_upgrade_test.sh b/sh/scenarios/sync_upgrade_test.sh index 53cd9d3..e393de1 100755 --- a/sh/scenarios/sync_upgrade_test.sh +++ b/sh/scenarios/sync_upgrade_test.sh @@ -106,7 +106,7 @@ function assert_network_upgrade() { # The empty status response is usually ~16 lines long, so we wait for more than that. while [[ $(echo "$STATUS" | wc -l) -le 200 ]]; do - echo "Waiting for nodes and sidecars to start..." + log "Waiting for nodes and sidecars to start..." sleep 3 STATUS=$(nctl-view-node-status) done