Skip to content
This repository has been archived by the owner on Nov 15, 2023. It is now read-only.

Commit

Permalink
pov-recovery: try connect to validators (#1711)
Browse files Browse the repository at this point in the history
* zombienet/pov-recovery: do not setup reserved connection for collators

* connect eve to dave

* REVERTME: diener update --polkadot --branch ao-recovery-try-connect

* REVERTME: cargo update -p sp-io

* REVERTME: cargo update -p sp-io and hope for the best

* pass reserved flags for eve after --

* Revert "REVERTME: cargo update -p sp-io and hope for the best"

This reverts commit 0d66b70.

* Revert "REVERTME: cargo update -p sp-io"

This reverts commit f8d16c3.

* REVERTME: cargo update -p sp-io

* Revert "REVERTME: cargo update -p sp-io"

This reverts commit d48e1e6.

* REVERTME: cargo update -p sp-io

* REVERTME: cargo update -p sp-io

* try some logs and flags

* apply some suggestions from Sebastian

* let Charlie produce blocks

* Revert "REVERTME: cargo update -p sp-io"

This reverts commit 02838a6.

* git checkout master Cargo.lock

* Revert "REVERTME: diener update --polkadot --branch ao-recovery-try-connect"

This reverts commit 8ae8d53.

* zombienet/pov-recovery: 4 validators

* REVERTME: diener update --polkadot --branch ao-recovery-try-connect && cargo update -p polkadot-primitives

* Revert "REVERTME: diener update --polkadot --branch ao-recovery-try-connect && cargo update -p polkadot-primitives"

This reverts commit 3cc9182.

* make sure it is not due to backing group connections

* clean up flags

* try no-mdns on collators, limit out-peers on validators

* try no-mdns on validators and bob

* fix bob flag

* try 7 validators (3 chunks needed for recovery)

* reserved-only on validators

* reserved-only on alice and charlie

* explicitly pass log targets

* rm default_args

* parachain=debug and cumulus-pov-recovery=debug

* try another idea

* try 13 validators (4 chunks required)

* bump block height to 20

* Register parachain after 20sec, increase block target to 20

* bump zombienet version

* remove debug

* bump zombienet

* update lockfile for {"polkadot", "substrate"}

Co-authored-by: Sebastian Kunert <[email protected]>
Co-authored-by: Javier Viola <[email protected]>
Co-authored-by: parity-processbot <>
Co-authored-by: Bastian Köcher <[email protected]>
  • Loading branch information
4 people authored Oct 19, 2022
1 parent 98425f1 commit 7273afa
Show file tree
Hide file tree
Showing 4 changed files with 54 additions and 29 deletions.
2 changes: 1 addition & 1 deletion .gitlab-ci.yml
Original file line number Diff line number Diff line change
Expand Up @@ -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:
Expand Down
25 changes: 17 additions & 8 deletions zombienet_tests/0002-pov_recovery.feature
Original file line number Diff line number Diff line change
Expand Up @@ -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
47 changes: 27 additions & 20 deletions zombienet_tests/0002-pov_recovery.toml
Original file line number Diff line number Diff line change
@@ -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')}}"]
9 changes: 9 additions & 0 deletions zombienet_tests/register-para.js
Original file line number Diff line number Diff line change
@@ -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 }

0 comments on commit 7273afa

Please sign in to comment.