diff --git a/.gitlab-ci.yml b/.gitlab-ci.yml index 38bccdb91bf..dcb7de25f2e 100644 --- a/.gitlab-ci.yml +++ b/.gitlab-ci.yml @@ -29,7 +29,7 @@ variables: CI_IMAGE: "paritytech/ci-linux:production" DOCKER_OS: "debian:stretch" ARCH: "x86_64" - ZOMBIENET_IMAGE: "docker.io/paritytech/zombienet:v1.2.59" + ZOMBIENET_IMAGE: "docker.io/paritytech/zombienet:v1.2.80" .collect-artifacts: &collect-artifacts artifacts: diff --git a/zombienet_tests/0002-pov_recovery.feature b/zombienet_tests/0002-pov_recovery.feature index fa9836e264b..0b4d0a81de8 100644 --- a/zombienet_tests/0002-pov_recovery.feature +++ b/zombienet_tests/0002-pov_recovery.feature @@ -3,11 +3,20 @@ Network: ./0002-pov_recovery.toml Creds: config -alice: is up -bob: is up -charlie: is up -dave: is up -eve: is up -alice: parachain 2000 is registered within 225 seconds -dave: reports block height is at least 7 within 250 seconds -eve: reports block height is at least 7 within 250 seconds +validator-0: is up +validator-1: is up +validator-2: is up +validator-3: is up +alice: is up within 60 seconds +bob: is up within 60 seconds +charlie: is up within 60 seconds + +# wait 30 blocks and register parachain +validator-3: reports block height is at least 30 within 250 seconds +validator-0: js-script ./register-para.js with "2000" within 240 seconds +validator-0: parachain 2000 is registered within 300 seconds + +# check block production +bob: reports block height is at least 20 within 600 seconds +alice: reports block height is at least 20 within 600 seconds +charlie: reports block height is at least 20 within 600 seconds diff --git a/zombienet_tests/0002-pov_recovery.toml b/zombienet_tests/0002-pov_recovery.toml index fc62d94595a..a9117dd82c6 100644 --- a/zombienet_tests/0002-pov_recovery.toml +++ b/zombienet_tests/0002-pov_recovery.toml @@ -1,44 +1,51 @@ [relaychain] default_image = "{{RELAY_IMAGE}}" default_command = "polkadot" -default_args = [ "-lparachain=debug" ] chain = "rococo-local" - [[relaychain.nodes]] - name = "alice" - validator = true +[relaychain.genesis.runtime.runtime_genesis_config.configuration.config] +# set parameters such that collators only connect to 1 validator as a backing group +max_validators_per_core = 1 +group_rotation_frequency = 100 # 10 mins [[relaychain.nodes]] - name = "bob" - validator = true + name = "ferdie" # bootnode fullnode + validator = false + + [[relaychain.node_groups]] + name = "validator" + count = 13 + args = ["-lparachain::availability=trace,sync=debug,parachain=debug", "--reserved-only", "--reserved-nodes {{'ferdie'|zombie('multiAddress')}}"] [[parachains]] id = 2000 cumulus_based = true +register_para = false +add_to_genesis = false - # run charlie as parachain collator + # run bob as a parachain collator who is the only one producing blocks + # alice and charlie will need to recover the pov blocks through availability recovery [[parachains.collators]] - name = "charlie" - validator = true + name = "bob" + validator = true # collator image = "{{COL_IMAGE}}" command = "test-parachain" - args = ["-lparachain=debug"] + args = ["--disable-block-announcements"] - # Run dave as parachain collator and eve as parachain full node - # - # They will need to recover the pov blocks through availability recovery. + # run alice as a parachain collator who does not produce blocks + # alice is a bootnode for bob and charlie [[parachains.collators]] - name = "dave" - validator = true + name = "alice" + validator = true # collator image = "{{COL_IMAGE}}" command = "test-parachain" - args = ["--reserved-only", "--reserved-nodes {{'charlie'|zombie('multiAddress')}}", "--use-null-consensus", "--disable-block-announcements"] + args = ["-lparachain::availability=trace,sync=debug,parachain=debug,cumulus-pov-recovery=debug", "--use-null-consensus", "--disable-block-announcements", "--bootnodes {{'bob'|zombie('multiAddress')}}", "--", "--reserved-only", "--reserved-nodes {{'ferdie'|zombie('multiAddress')}}"] - # run eve as parachain full node that is only connected to dave + # run eve as a parachain full node [[parachains.collators]] - name = "eve" - validator = false + name = "charlie" + validator = false # full node image = "{{COL_IMAGE}}" command = "test-parachain" - args = ["--reserved-only", "--reserved-nodes {{'charlie'|zombie('multiAddress')}}", "--use-null-consensus", "--disable-block-announcements"] + args = ["-lparachain::availability=trace,sync=debug,parachain=debug,cumulus-pov-recovery=debug", "--disable-block-announcements", "--bootnodes {{'bob'|zombie('multiAddress')}}","--", "--reserved-only", "--reserved-nodes {{'ferdie'|zombie('multiAddress')}}"] diff --git a/zombienet_tests/register-para.js b/zombienet_tests/register-para.js new file mode 100644 index 00000000000..c080904aefe --- /dev/null +++ b/zombienet_tests/register-para.js @@ -0,0 +1,9 @@ +async function run(nodeName, networkInfo, args) { + const paraIdStr = args[0]; + const para = networkInfo.paras[paraIdStr]; + const relayNode = networkInfo.relay[0]; + + await zombie.registerParachain(parseInt(paraIdStr,10),para.wasmPath, para.statePath, relayNode.wsUri, "//Alice", true); +} + +module.exports = { run }