Skip to content
Snippets Groups Projects
Unverified Commit 7125f65f authored by ordian's avatar ordian Committed by GitHub
Browse files

less flaky dispute slashing test (#1218)

parent c58db695
No related merge requests found
Pipeline #384833 canceled with stages
in 34 seconds
......@@ -4,8 +4,8 @@ bootnode = true
[relaychain.genesis.runtime.configuration.config]
max_validators_per_core = 1
needed_approvals = 3
group_rotation_frequency = 4
needed_approvals = 2
group_rotation_frequency = 3
[relaychain]
default_image = "{{ZOMBIENET_INTEGRATION_TEST_IMAGE}}"
......@@ -16,15 +16,16 @@ default_command = "polkadot"
limits = { memory = "4G", cpu = "2" }
requests = { memory = "2G", cpu = "1" }
[[relaychain.nodes]]
name = "alice"
[[relaychain.node_groups]]
name = "honest-flaky-validator"
invulnerable = true # it will go offline, we don't want to disable it
args = ["-lparachain=debug,runtime=debug"]
count = 2
args = ["-lparachain=debug"]
[[relaychain.node_groups]]
name = "honest-validator"
count = 2
args = ["-lruntime=debug,sync=trace"]
count = 1
args = ["-lparachain=debug"]
[[relaychain.node_groups]]
image = "{{MALUS_IMAGE}}"
......
......@@ -2,36 +2,52 @@ Description: Past-session dispute slashing
Network: ./0004-parachains-disputes-past-session.toml
Creds: config
alice: reports node_roles is 4
# Ensure nodes are up and running
honest-flaky-validator: reports node_roles is 4
# pause alice so that disputes don't conclude
alice: pause
# Stop issuing disputes for now
malus-validator: pause
# Ensure parachain is registered.
honest-validator-0: parachain 1000 is registered within 100 seconds
# Ensure parachain is registered
honest-validator: parachain 1000 is registered within 100 seconds
# Ensure parachain made progress.
honest-validator-0: parachain 1000 block height is at least 1 within 300 seconds
# Ensure parachain made progress
honest-validator: parachain 1000 block height is at least 1 within 300 seconds
# There should be disputes initiated
honest-validator-0: reports polkadot_parachain_candidate_disputes_total is at least 2 within 200 seconds
# Start issuing disputes
malus-validator: resume
# Stop issuing disputes
malus-validator-0: pause
# Wait for malus to back garbage candidate
malus-validator: log line matches "Suggesting malicious candidate" within 200 seconds
# Pause first flaky node
# Availability and finality will continue with 3/4 nodes online (incl. malus)
honest-flaky-validator-0: pause
# Wait for the dispute
honest-flaky-validator-1: reports parachain_candidate_disputes_total is at least 1 within 40 seconds
# Pause second flaky node so that we do not revert blocks due to f+1 invalid votes
# Availability and finality will stop
honest-flaky-validator-1: pause
# wait for the next session
# Wait for 1 full session to pass after the last unconcluded dispute.
sleep 120 seconds
# But should not resolve
honest-validator-0: reports block height minus finalised block is at least 10 within 100 seconds
# Now resume flaky validators
honest-flaky-validator: resume
# Now resume alice
alice: resume
# Stop issuing disputes
malus-validator: pause
# Disputes should start concluding now
honest-validator-0: reports polkadot_parachain_candidate_dispute_concluded{validity="invalid"} is at least 1 within 200 seconds
honest-validator: reports polkadot_parachain_candidate_dispute_concluded{validity="invalid"} is at least 1 within 200 seconds
# Disputes should always end as "invalid"
honest-validator-0: reports polkadot_parachain_candidate_dispute_concluded{validity="valid"} is 0
honest-validator: reports polkadot_parachain_candidate_dispute_concluded{validity="valid"} is 0
# Check an unsigned extrinsic is submitted
honest-validator: log line contains "Successfully reported pending slash" within 180 seconds
# Finality should not lag after dispute resolution
honest-validator: reports block height minus finalised block is lower than 8 within 100 seconds
0% or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment