Skip to content

Commit

Permalink
migrate zombie past slashing test (#7147)
Browse files Browse the repository at this point in the history
to zombienet-sdk 0.2.24 (also needed to update to this version for
slashing to work).

---------

Signed-off-by: Alexandru Vasile <[email protected]>
Co-authored-by: Alexandru Vasile <[email protected]>
  • Loading branch information
ordian and lexnv authored Feb 12, 2025
1 parent 42a6167 commit f340e07
Show file tree
Hide file tree
Showing 9 changed files with 338 additions and 140 deletions.
46 changes: 27 additions & 19 deletions .gitlab/pipeline/zombienet/polkadot.yml
Original file line number Diff line number Diff line change
Expand Up @@ -112,14 +112,6 @@ zombienet-polkadot-functional-0004-parachains-disputes-garbage-candidate:
--local-dir="${LOCAL_DIR}/functional"
--test="0004-parachains-garbage-candidate.zndsl"

.zombienet-polkadot-functional-0005-parachains-disputes-past-session:
extends:
- .zombienet-polkadot-common
script:
- /home/nonroot/zombie-net/scripts/ci/run-test-local-env-manager.sh
--local-dir="${LOCAL_DIR}/functional"
--test="0005-parachains-disputes-past-session.zndsl"

zombienet-polkadot-functional-0006-parachains-max-tranche0:
extends:
- .zombienet-polkadot-common
Expand Down Expand Up @@ -188,7 +180,7 @@ zombienet-polkadot-functional-0015-coretime-shared-core:
extends:
- .zombienet-polkadot-common
before_script:
- !reference [ .zombienet-polkadot-common, before_script ]
- !reference [.zombienet-polkadot-common, before_script]
- cp --remove-destination ${LOCAL_DIR}/assign-core.js ${LOCAL_DIR}/functional
script:
- /home/nonroot/zombie-net/scripts/ci/run-test-local-env-manager.sh
Expand All @@ -207,7 +199,7 @@ zombienet-polkadot-functional-0018-shared-core-idle-parachain:
extends:
- .zombienet-polkadot-common
before_script:
- !reference [ .zombienet-polkadot-common, before_script ]
- !reference [.zombienet-polkadot-common, before_script]
- cp --remove-destination ${LOCAL_DIR}/assign-core.js ${LOCAL_DIR}/functional
script:
- /home/nonroot/zombie-net/scripts/ci/run-test-local-env-manager.sh
Expand All @@ -218,7 +210,7 @@ zombienet-polkadot-functional-0019-coretime-collation-fetching-fairness:
extends:
- .zombienet-polkadot-common
before_script:
- !reference [ .zombienet-polkadot-common, before_script ]
- !reference [.zombienet-polkadot-common, before_script]
- cp --remove-destination ${LOCAL_DIR}/assign-core.js ${LOCAL_DIR}/functional
script:
- /home/nonroot/zombie-net/scripts/ci/run-test-local-env-manager.sh
Expand Down Expand Up @@ -354,7 +346,7 @@ zombienet-polkadot-malus-0001-dispute-valid:
- job: build-polkadot-zombienet-tests
artifacts: true
before_script:
- !reference [ ".zombienet-polkadot-common", "before_script" ]
- !reference [".zombienet-polkadot-common", "before_script"]
- export POLKADOT_IMAGE="${ZOMBIENET_INTEGRATION_TEST_IMAGE}"
script:
# we want to use `--no-capture` in zombienet tests.
Expand All @@ -369,7 +361,7 @@ zombienet-polkadot-elastic-scaling-slot-based-3cores:
- job: build-polkadot-zombienet-tests
artifacts: true
before_script:
- !reference [ ".zombienet-polkadot-common", "before_script" ]
- !reference [".zombienet-polkadot-common", "before_script"]
- export POLKADOT_IMAGE="${ZOMBIENET_INTEGRATION_TEST_IMAGE}"
- export CUMULUS_IMAGE="docker.io/paritypr/test-parachain:${PIPELINE_IMAGE_TAG}"
- export X_INFRA_INSTANCE=spot # use spot by default
Expand All @@ -386,7 +378,7 @@ zombienet-polkadot-elastic-scaling-slot-based-12cores:
- job: build-polkadot-zombienet-tests
artifacts: true
before_script:
- !reference [ ".zombienet-polkadot-common", "before_script" ]
- !reference [".zombienet-polkadot-common", "before_script"]
- export POLKADOT_IMAGE="${ZOMBIENET_INTEGRATION_TEST_IMAGE}"
- export CUMULUS_IMAGE="docker.io/paritypr/test-parachain:${PIPELINE_IMAGE_TAG}"
- export X_INFRA_INSTANCE=spot # use spot by default
Expand All @@ -403,7 +395,7 @@ zombienet-polkadot-elastic-scaling-doesnt-break-parachains:
- job: build-polkadot-zombienet-tests
artifacts: true
before_script:
- !reference [ ".zombienet-polkadot-common", "before_script" ]
- !reference [".zombienet-polkadot-common", "before_script"]
- export POLKADOT_IMAGE="${ZOMBIENET_INTEGRATION_TEST_IMAGE}"
- export X_INFRA_INSTANCE=spot # use spot by default
variables:
Expand All @@ -421,7 +413,7 @@ zombienet-polkadot-elastic-scaling-basic-3cores:
- job: build-polkadot-zombienet-tests
artifacts: true
before_script:
- !reference [ ".zombienet-polkadot-common", "before_script" ]
- !reference [".zombienet-polkadot-common", "before_script"]
- export POLKADOT_IMAGE="${ZOMBIENET_INTEGRATION_TEST_IMAGE}"
- export CUMULUS_IMAGE="${COL_IMAGE}"
- export X_INFRA_INSTANCE=spot # use spot by default
Expand All @@ -438,7 +430,7 @@ zombienet-polkadot-functional-sync-backing:
- job: build-polkadot-zombienet-tests
artifacts: true
before_script:
- !reference [ ".zombienet-polkadot-common", "before_script" ]
- !reference [".zombienet-polkadot-common", "before_script"]
- export POLKADOT_IMAGE="${ZOMBIENET_INTEGRATION_TEST_IMAGE}"
# Hardcoded to an old polkadot-parachain image, pre async backing.
- export CUMULUS_IMAGE="docker.io/paritypr/polkadot-parachain-debug:master-99623e62"
Expand All @@ -456,7 +448,7 @@ zombienet-polkadot-functional-async-backing-6-seconds-rate:
- job: build-polkadot-zombienet-tests
artifacts: true
before_script:
- !reference [ ".zombienet-polkadot-common", "before_script" ]
- !reference [".zombienet-polkadot-common", "before_script"]
- export POLKADOT_IMAGE="${ZOMBIENET_INTEGRATION_TEST_IMAGE}"
- export X_INFRA_INSTANCE=spot # use spot by default
script:
Expand All @@ -472,11 +464,27 @@ zombienet-polkadot-functional-duplicate-collations:
- job: build-polkadot-zombienet-tests
artifacts: true
before_script:
- !reference [ ".zombienet-polkadot-common", "before_script" ]
- !reference [".zombienet-polkadot-common", "before_script"]
- export POLKADOT_IMAGE="${ZOMBIENET_INTEGRATION_TEST_IMAGE}"
- export X_INFRA_INSTANCE=spot # use spot by default
script:
# we want to use `--no-capture` in zombienet tests.
- unset NEXTEST_FAILURE_OUTPUT
- unset NEXTEST_SUCCESS_OUTPUT
- cargo nextest run --archive-file ./artifacts/polkadot-zombienet-tests.tar.zst --no-capture -- functional::duplicate_collations::duplicate_collations_test

zombienet-polkadot-disputes-slashing:
extends:
- .zombienet-polkadot-common
needs:
- job: build-polkadot-zombienet-tests
artifacts: true
before_script:
- !reference [".zombienet-polkadot-common", "before_script"]
- export POLKADOT_IMAGE="${ZOMBIENET_INTEGRATION_TEST_IMAGE}"
- export X_INFRA_INSTANCE=spot # use spot by default
script:
# we want to use `--no-capture` in zombienet tests.
- unset NEXTEST_FAILURE_OUTPUT
- unset NEXTEST_SUCCESS_OUTPUT
- cargo nextest run --archive-file ./artifacts/polkadot-zombienet-tests.tar.zst --no-capture -- disabling::slashing
127 changes: 110 additions & 17 deletions Cargo.lock

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

1 change: 1 addition & 0 deletions polkadot/zombienet-sdk-tests/Cargo.toml
Original file line number Diff line number Diff line change
Expand Up @@ -18,6 +18,7 @@ serde_json = { workspace = true }
subxt = { workspace = true, features = ["substrate-compat"] }
subxt-signer = { workspace = true }
tokio = { workspace = true, features = ["rt-multi-thread"] }
tokio-util = { workspace = true, features = ["time"] }
zombienet-sdk = { workspace = true }

[features]
Expand Down
4 changes: 4 additions & 0 deletions polkadot/zombienet-sdk-tests/tests/disabling/mod.rs
Original file line number Diff line number Diff line change
@@ -0,0 +1,4 @@
// Copyright (C) Parity Technologies (UK) Ltd.
// SPDX-License-Identifier: Apache-2.0

mod slashing;
Loading

0 comments on commit f340e07

Please sign in to comment.