From 802a1af04302654747b9e24ce3289a428d5b2dfe Mon Sep 17 00:00:00 2001 From: acatangiu Date: Thu, 4 Aug 2022 11:32:14 +0300 Subject: [PATCH 1/4] zombienet: add BEEFY justifications import test Signed-off-by: acatangiu --- .../functional/0003-beefy-and-mmr.feature | 20 +++++++++++++++---- .../functional/0003-beefy-and-mmr.toml | 2 +- 2 files changed, 17 insertions(+), 5 deletions(-) diff --git a/zombienet_tests/functional/0003-beefy-and-mmr.feature b/zombienet_tests/functional/0003-beefy-and-mmr.feature index 2736cb60cc35..10e681f4cf4a 100644 --- a/zombienet_tests/functional/0003-beefy-and-mmr.feature +++ b/zombienet_tests/functional/0003-beefy-and-mmr.feature @@ -6,21 +6,28 @@ Creds: config validator-0: is up validator-1: is up validator-2: is up +validator-3: is up # Check authority status. validator-0: reports node_roles is 4 validator-1: reports node_roles is 4 validator-2: reports node_roles is 4 +validator-3: reports node_roles is 4 # BEEFY sanity checks. validator-0: reports substrate_beefy_validator_set_id is 0 validator-1: reports substrate_beefy_validator_set_id is 0 validator-2: reports substrate_beefy_validator_set_id is 0 +validator-3: reports substrate_beefy_validator_set_id is 0 # Verify voting happens and 1st mandatory block is finalized within 1st session. validator-0: reports substrate_beefy_best_block is at least 1 within 60 seconds validator-1: reports substrate_beefy_best_block is at least 1 within 60 seconds validator-2: reports substrate_beefy_best_block is at least 1 within 60 seconds +validator-3: reports substrate_beefy_best_block is at least 1 within 60 seconds + +# Pause validator-3 and test chain is making progress without it. +validator-3: pause # Verify validator sets get changed on new sessions. validator-0: reports substrate_beefy_validator_set_id is at least 1 within 70 seconds @@ -37,8 +44,13 @@ validator-0: reports substrate_beefy_best_block is at least 21 within 130 second validator-1: reports substrate_beefy_best_block is at least 21 within 130 seconds validator-2: reports substrate_beefy_best_block is at least 21 within 130 seconds -# TODO 1: Custom JS to test BEEFY RPCs - -# TODO 2: Custom JS to test MMR RPCs +# TODO (issue #11972): Custom JS to test BEEFY RPCs +# TODO (issue #11972): Custom JS to test MMR RPCs -# TODO 3: once zombienet/#227 is implemented: pause+resume nodes to test Justifications Import +# Check that validator-3 is still paused somewhere in 1st session. +validator-3: reports substrate_beefy_validator_set_id is 0 +validator-3: reports substrate_beefy_validator_set_id is lower than 11 +# Resume validator-3 and verify it imports all BEEFY justification and catches up. +validator-3: resume +validator-3: reports substrate_beefy_validator_set_id is at least 2 within 30 seconds +validator-3: reports substrate_beefy_best_block is at least 21 within 30 seconds diff --git a/zombienet_tests/functional/0003-beefy-and-mmr.toml b/zombienet_tests/functional/0003-beefy-and-mmr.toml index 6ac2ec0af7ff..1608976abdf2 100644 --- a/zombienet_tests/functional/0003-beefy-and-mmr.toml +++ b/zombienet_tests/functional/0003-beefy-and-mmr.toml @@ -8,5 +8,5 @@ command = "polkadot" [[relaychain.node_groups]] name = "validator" -count = 3 +count = 4 args = ["--log=beefy=debug", "--beefy", "--enable-offchain-indexing=true"] From 5be30f3a60fb598d587a2af04a7d5bbbd2049d7f Mon Sep 17 00:00:00 2001 From: acatangiu Date: Tue, 9 Aug 2022 11:56:50 +0300 Subject: [PATCH 2/4] bump zombienet image version --- .gitlab-ci.yml | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/.gitlab-ci.yml b/.gitlab-ci.yml index 150613796121..d5dacba5aead 100644 --- a/.gitlab-ci.yml +++ b/.gitlab-ci.yml @@ -32,7 +32,7 @@ variables: CI_IMAGE: "paritytech/ci-linux:production" DOCKER_OS: "debian:stretch" ARCH: "x86_64" - ZOMBIENET_IMAGE: "docker.io/paritytech/zombienet:v1.2.51" + ZOMBIENET_IMAGE: "docker.io/paritytech/zombienet:v1.2.52" PIPELINE_SCRIPTS_TAG: "v0.4" default: From eec25e259f766a6e33c4e7aa03fa74fa4b39cb21 Mon Sep 17 00:00:00 2001 From: acatangiu Date: Tue, 9 Aug 2022 18:49:14 +0300 Subject: [PATCH 3/4] zombienet: can't retrieve metrics when node paused --- zombienet_tests/functional/0003-beefy-and-mmr.feature | 3 --- 1 file changed, 3 deletions(-) diff --git a/zombienet_tests/functional/0003-beefy-and-mmr.feature b/zombienet_tests/functional/0003-beefy-and-mmr.feature index 10e681f4cf4a..fad890bec9e4 100644 --- a/zombienet_tests/functional/0003-beefy-and-mmr.feature +++ b/zombienet_tests/functional/0003-beefy-and-mmr.feature @@ -47,9 +47,6 @@ validator-2: reports substrate_beefy_best_block is at least 21 within 130 second # TODO (issue #11972): Custom JS to test BEEFY RPCs # TODO (issue #11972): Custom JS to test MMR RPCs -# Check that validator-3 is still paused somewhere in 1st session. -validator-3: reports substrate_beefy_validator_set_id is 0 -validator-3: reports substrate_beefy_validator_set_id is lower than 11 # Resume validator-3 and verify it imports all BEEFY justification and catches up. validator-3: resume validator-3: reports substrate_beefy_validator_set_id is at least 2 within 30 seconds From 1fb9134dbd3be9ba01d0ccc1e36b5173cc83a0aa Mon Sep 17 00:00:00 2001 From: acatangiu Date: Thu, 11 Aug 2022 16:00:09 +0300 Subject: [PATCH 4/4] bump zombienet image version to v1.2.54 --- .gitlab-ci.yml | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/.gitlab-ci.yml b/.gitlab-ci.yml index d5dacba5aead..038f1c13f060 100644 --- a/.gitlab-ci.yml +++ b/.gitlab-ci.yml @@ -32,7 +32,7 @@ variables: CI_IMAGE: "paritytech/ci-linux:production" DOCKER_OS: "debian:stretch" ARCH: "x86_64" - ZOMBIENET_IMAGE: "docker.io/paritytech/zombienet:v1.2.52" + ZOMBIENET_IMAGE: "docker.io/paritytech/zombienet:v1.2.54" PIPELINE_SCRIPTS_TAG: "v0.4" default: