Skip to content

Commit

Permalink
Warp sync zombienet tests: Add BEEFY checks
Browse files Browse the repository at this point in the history
  • Loading branch information
serban300 committed Jan 10, 2024
1 parent db4962f commit bd90963
Show file tree
Hide file tree
Showing 6 changed files with 111 additions and 63 deletions.
5 changes: 3 additions & 2 deletions .gitlab/pipeline/zombienet/substrate.yml
Original file line number Diff line number Diff line change
Expand Up @@ -44,8 +44,9 @@
extends:
- .zombienet-substrate-common
variables:
DB_SNAPSHOT: "https://storage.googleapis.com/zombienet-db-snaps/substrate/0001-basic-warp-sync/chains-a233bbacff650aac6bcb56b4e4ef7db7dc143cfb.tgz"
DB_BLOCK_HEIGHT: 12133
DB_SNAPSHOT: "https://storage.googleapis.com/zombienet-db-snaps/substrate/0004-basic-beefy-warp-sync/chains-3s.tgz"
DB_BLOCK_HEIGHT: 47222
DB_LATEST_MANDATORY_ROUND: 47182

zombienet-substrate-0000-block-building:
extends:
Expand Down
150 changes: 90 additions & 60 deletions substrate/zombienet/0001-basic-warp-sync/chain-spec.json

Large diffs are not rendered by default.

6 changes: 6 additions & 0 deletions substrate/zombienet/0001-basic-warp-sync/test-warp-sync.toml
Original file line number Diff line number Diff line change
@@ -1,6 +1,12 @@
[settings]
enable_tracing = false

#[relaychain]
#default_command = "/home/serban/workplace/sources/polkadot-sdk/target/release/substrate-node"
#
#chain = "local"
#chain_spec_path = "/home/serban/workplace/snapshots/db-test-gen-3s/local.json"

[relaychain]
default_image = "{{ZOMBIENET_INTEGRATION_TEST_IMAGE}}"
default_command = "substrate"
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -18,7 +18,7 @@ chain_spec_path = "chain-spec.json"
validator = true
args = ["--sync warp"]

#we need at least 3 nodes for warp sync
# we need at least 3 nodes for warp sync
[[relaychain.nodes]]
name = "charlie"
validator = false
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -28,6 +28,14 @@ bob: log line matches "Block history download is complete" within 60 seconds
alice: reports block height is at least {{DB_BLOCK_HEIGHT}} within 10 seconds
bob: reports block height is at least {{DB_BLOCK_HEIGHT}} within 10 seconds

# TODO: investigate
# The chain doesn't have the BEEFY justifications for the previous blocks
# probably because only the non-validator nodes are started from the snapshot.
# So we can't check if BEEFY catches up.
# We check only if the latest mandatory block was marked correctly.
alice: log line matches "🥩 Marking block {{DB_LATEST_MANDATORY_ROUND}} as BEEFY Mandatory." within 90 seconds
bob: log line matches "🥩 Marking block {{DB_LATEST_MANDATORY_ROUND}} as BEEFY Mandatory." within 90 seconds

alice: count of log lines containing "error" is 0 within 10 seconds
bob: count of log lines containing "verification failed" is 0 within 10 seconds

Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -24,5 +24,8 @@ dave: reports block height is at least {{DB_BLOCK_HEIGHT}} within 60 seconds
dave: log line matches "Warp sync is complete" within 60 seconds
dave: log line matches "Block history download is complete" within 10 seconds

dave: reports substrate_beefy_best_block is at least {{DB_BLOCK_HEIGHT}} within 180 seconds
dave: reports substrate_beefy_best_block is greater than {{DB_BLOCK_HEIGHT}} within 60 seconds

dave: count of log lines containing "error" is 0 within 10 seconds
dave: count of log lines containing "verification failed" is 0 within 10 seconds

0 comments on commit bd90963

Please sign in to comment.