Skip to content

Commit

Permalink
simple zombienet test
Browse files Browse the repository at this point in the history
  • Loading branch information
ordian committed Oct 26, 2023
1 parent 378e763 commit cb2fa67
Show file tree
Hide file tree
Showing 2 changed files with 60 additions and 0 deletions.
39 changes: 39 additions & 0 deletions polkadot/zombienet_tests/functional/0006-validator-disabling.toml
Original file line number Diff line number Diff line change
@@ -0,0 +1,39 @@
[settings]
timeout = 1000
bootnode = true

[relaychain.genesis.runtime.configuration.config]
max_validators_per_core = 1
needed_approvals = 2
group_rotation_frequency = 10

[relaychain]
default_image = "{{ZOMBIENET_INTEGRATION_TEST_IMAGE}}"
chain = "westend-local" # for the disabling to take an effect
default_command = "polkadot"

[relaychain.default_resources]
limits = { memory = "4G", cpu = "2" }
requests = { memory = "2G", cpu = "1" }

[[relaychain.node_groups]]
name = "honest-validator"
count = 3
args = ["-lparachain=debug"]

[[relaychain.node_groups]]
image = "{{MALUS_IMAGE}}"
name = "malus-validator"
command = "malus suggest-garbage-candidate"
args = ["-lMALUS=trace"]
count = 1

[[parachains]]
id = 1000
cumulus_based = true

[parachains.collator]
name = "alice"
command = "polkadot-parachain"
image = "{{CUMULUS_IMAGE}}"
args = ["-lparachain=debug"]
21 changes: 21 additions & 0 deletions polkadot/zombienet_tests/functional/0006-validator-disabling.zndsl
Original file line number Diff line number Diff line change
@@ -0,0 +1,21 @@
Description: Test validator disabling effects
Network: ./0006-validator-disabling.toml
Creds: config

# Ensure nodes are up and running
honest-validator: reports node_roles is 4

# Ensure parachain is registered
honest-validator: parachain 1000 is registered within 100 seconds

# Ensure parachain made progress
honest-validator: parachain 1000 block height is at least 1 within 300 seconds

# Wait for the dispute
honest-validator-1: reports parachain_candidate_disputes_total is at least 1 within 300 seconds

# Disputes should conclude
honest-validator: reports polkadot_parachain_candidate_dispute_concluded{validity="invalid"} is at least 1 within 200 seconds

# Wait for a few blocks for the disabling to take place.
honest-validator: log line contains "Disabled validators detected" within 180 seconds

0 comments on commit cb2fa67

Please sign in to comment.