diff --git a/.gitlab-ci.yml b/.gitlab-ci.yml index f727456158ee..b1883f9e9687 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.25" + ZOMBIENET_IMAGE: "docker.io/paritytech/zombienet:v1.2.50" PIPELINE_SCRIPTS_TAG: "v0.4" default: @@ -826,7 +826,7 @@ zombienet-tests-malus-dispute-valid: zombienet-tests-deregister-register-validator: stage: stage3 - image: "docker.io/paritytech/zombienet:v1.2.47" + image: "${ZOMBIENET_IMAGE}" <<: *kubernetes-env <<: *zombienet-refs needs: @@ -851,6 +851,31 @@ zombienet-tests-deregister-register-validator: tags: - zombienet-polkadot-integration-test +zombienet-tests-beefy-and-mmr: + stage: stage3 + <<: *kubernetes-env + <<: *zombienet-refs + image: "${ZOMBIENET_IMAGE}" + needs: + - job: publish-polkadot-debug-image + variables: + GH_DIR: "https://github.com/paritytech/polkadot/tree/${CI_COMMIT_SHORT_SHA}/zombienet_tests/functional" + before_script: + - echo "Zombie-net Tests Config" + - echo "${ZOMBIENET_IMAGE_NAME}" + - echo "${PARACHAINS_IMAGE_NAME} ${PARACHAINS_IMAGE_TAG}" + - echo "${GH_DIR}" + - export DEBUG=zombie* + - export ZOMBIENET_INTEGRATION_TEST_IMAGE=${PARACHAINS_IMAGE_NAME}:${PARACHAINS_IMAGE_TAG} + script: + - /home/nonroot/zombie-net/scripts/ci/run-test-env-manager.sh + --github-remote-dir="${GH_DIR}" + --test="0003-beefy-and-mmr.feature" + allow_failure: true + retry: 2 + tags: + - zombienet-polkadot-integration-test + #### stage: stage4 publish-rustdoc: diff --git a/zombienet_tests/functional/0003-beefy-and-mmr.feature b/zombienet_tests/functional/0003-beefy-and-mmr.feature new file mode 100644 index 000000000000..2736cb60cc35 --- /dev/null +++ b/zombienet_tests/functional/0003-beefy-and-mmr.feature @@ -0,0 +1,44 @@ +Description: Test BEEFY voting and finality, test MMR proofs. Assumes Rococo sessions of 1 minute. +Network: ./0003-beefy-and-mmr.toml +Creds: config + +# Some sanity checks. +validator-0: is up +validator-1: is up +validator-2: 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 + +# 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 + +# 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 + +# Verify validator sets get changed on new sessions. +validator-0: reports substrate_beefy_validator_set_id is at least 1 within 70 seconds +validator-1: reports substrate_beefy_validator_set_id is at least 1 within 70 seconds +validator-2: reports substrate_beefy_validator_set_id is at least 1 within 70 seconds +# Check next session too. +validator-0: reports substrate_beefy_validator_set_id is at least 2 within 130 seconds +validator-1: reports substrate_beefy_validator_set_id is at least 2 within 130 seconds +validator-2: reports substrate_beefy_validator_set_id is at least 2 within 130 seconds + +# Verify voting happens and blocks are being finalized for new sessions too: +# since we verified we're at least in the 3rd session, verify BEEFY finalized mandatory #21. +validator-0: reports substrate_beefy_best_block is at least 21 within 130 seconds +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 3: once zombienet/#227 is implemented: pause+resume nodes to test Justifications Import diff --git a/zombienet_tests/functional/0003-beefy-and-mmr.toml b/zombienet_tests/functional/0003-beefy-and-mmr.toml new file mode 100644 index 000000000000..6ac2ec0af7ff --- /dev/null +++ b/zombienet_tests/functional/0003-beefy-and-mmr.toml @@ -0,0 +1,12 @@ +[settings] +timeout = 1000 + +[relaychain] +default_image = "{{ZOMBIENET_INTEGRATION_TEST_IMAGE}}" +chain = "rococo-local" +command = "polkadot" + +[[relaychain.node_groups]] +name = "validator" +count = 3 +args = ["--log=beefy=debug", "--beefy", "--enable-offchain-indexing=true"]