Skip to content

Commit

Permalink
Custom warp sync test enabled
Browse files Browse the repository at this point in the history
  • Loading branch information
ErakhtinB committed Sep 12, 2024
1 parent 6cce7e3 commit 2dfe877
Show file tree
Hide file tree
Showing 6 changed files with 236 additions and 0 deletions.
2 changes: 2 additions & 0 deletions .github/workflows/test.yml
Original file line number Diff line number Diff line change
Expand Up @@ -434,6 +434,8 @@ jobs:
test: "test-polkadot-functional-0011-async-backing-6-seconds-rate"
- name: "Systematic chunk recovery is used if the chunk mapping feature is enabled."
test: "test-polkadot-functional-0013-systematic-chunk-recovery"
- name: "Warp sync from polkadot node"
test: "test-custom-0001-validators-warp-sync"
steps:
- name: "Checkout repository"
uses: actions/checkout@v4
Expand Down
2 changes: 2 additions & 0 deletions .github/workflows/zombie-tests.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -174,6 +174,8 @@ jobs:
test: "test-polkadot-functional-0011-async-backing-6-seconds-rate"
- name: "Systematic chunk recovery is used if the chunk mapping feature is enabled."
test: "test-polkadot-functional-0013-systematic-chunk-recovery"
- name: "Warp sync from polkadot node"
test: "test-custom-0001-validators-warp-sync"
steps:
- name: "Checkout repository"
uses: actions/checkout@v4
Expand Down
35 changes: 35 additions & 0 deletions zombienet/custom/0001-validators-warp-sync.toml
Original file line number Diff line number Diff line change
@@ -0,0 +1,35 @@
[settings]
enable_tracing = false

[relaychain]
default_command = "polkadot"
chain_spec_path = "kagome/zombienet/custom/relay.json"
chain = "rococo_dev"

[[relaychain.nodes]]
name = "alice"
validator = true
args = ["--sync warp"]

[[relaychain.nodes]]
name = "bob"
validator = true
command = "kagome"
prometheus_prefix = "kagome"
args = ["--sync Warp"]

#we need at least 3 nodes for warp sync
[[relaychain.nodes]]
name = "charlie"
validator = true
db_snapshot = "https://www.googleapis.com/drive/v3/files/1Af9XRSXpVUPObCJH_4HE8HFY3K7HE5Q0?alt=media&key=AIzaSyBuxBOn182JNSqH2u347poSwA-d-ttaZPs"

[[relaychain.nodes]]
name = "dave"
validator = false
db_snapshot = "https://www.googleapis.com/drive/v3/files/1Af9XRSXpVUPObCJH_4HE8HFY3K7HE5Q0?alt=media&key=AIzaSyBuxBOn182JNSqH2u347poSwA-d-ttaZPs"

[[relaychain.nodes]]
name = "eve"
validator = false
db_snapshot = "https://www.googleapis.com/drive/v3/files/1Af9XRSXpVUPObCJH_4HE8HFY3K7HE5Q0?alt=media&key=AIzaSyBuxBOn182JNSqH2u347poSwA-d-ttaZPs"
33 changes: 33 additions & 0 deletions zombienet/custom/0001-validators-warp-sync.zndsl
Original file line number Diff line number Diff line change
@@ -0,0 +1,33 @@
Description: Warp sync
Network: ./0001-validators-warp-sync.toml
Creds: config

alice: reports node_roles is 4
bob: reports node_roles is 4
charlie: reports node_roles is 4
dave: reports node_roles is 1
eve: reports node_roles is 1

alice: reports peers count is at least 4 within 60 seconds
bob: reports peers count is at least 4 within 60 seconds
charlie: reports peers count is at least 4 within 60 seconds
dave: reports peers count is at least 4 within 60 seconds
eve: reports peers count is at least 4 within 60 seconds

# db snapshot has 3340 blocks
charlie: reports block height is at least 3340 within 60 seconds
dave: reports block height is at least 3340 within 60 seconds
eve: reports block height is at least 3340 within 60 seconds

alice: log line matches "Warp sync is complete" within 60 seconds
bob: log line matches "Synchronizer State syncing block #[0-9]+ \(0x.*?\) has finished." within 60 seconds

# workaround for: https://github.com/paritytech/zombienet/issues/580
alice: count of log lines containing "Block history download is complete" is 1 within 60 seconds

alice: reports block height is at least 3340 within 10 seconds
bob: reports block height is at least 3340 within 10 seconds

# new block were built
alice: reports block height is at least 3345 within 90 seconds
bob: reports block height is at least 3345 within 90 seconds
161 changes: 161 additions & 0 deletions zombienet/custom/relay.json

Large diffs are not rendered by default.

3 changes: 3 additions & 0 deletions zombienet/docker/Makefile
Original file line number Diff line number Diff line change
Expand Up @@ -263,3 +263,6 @@ test-polkadot-functional-0011-async-backing-6-seconds-rate:

test-polkadot-functional-0013-systematic-chunk-recovery:
$(call run_test, $(ZOMBIE_TESTER_IMAGE), "kagome/zombienet/polkadot/functional/0013-systematic-chunk-recovery.zndsl")

test-custom-0001-validators-warp-sync:
$(call run_test, $(ZOMBIE_TESTER_IMAGE), "kagome/zombienet/custom/0001-validators-warp-sync.zndsl")

0 comments on commit 2dfe877

Please sign in to comment.