zombienet: use another collator image for the slashing test (#1386)

* zombienet: use test-parachain image for the slashing test

* use the right image

* try polkadot-parachain image

* try naming collator alice 🙈

* add needed job for the pipeline

* fix user id in polkadot-parachain-debug image

* small tweaks to the test

* another small tweak

* yet another small tweak

* bump zombienet version

---------

Co-authored-by: Javier Viola <javier@parity.io>
This commit is contained in:
ordian
2023-09-06 20:39:42 +02:00
committed by GitHub
parent 0090152386
commit a47943983f
5 changed files with 12 additions and 9 deletions
+1 -1
View File
@@ -30,7 +30,7 @@ variables:
RUSTY_CACHIER_COMPRESSION_METHOD: zstd RUSTY_CACHIER_COMPRESSION_METHOD: zstd
NEXTEST_FAILURE_OUTPUT: immediate-final NEXTEST_FAILURE_OUTPUT: immediate-final
NEXTEST_SUCCESS_OUTPUT: final NEXTEST_SUCCESS_OUTPUT: final
ZOMBIENET_IMAGE: "docker.io/paritytech/zombienet:v1.3.65" ZOMBIENET_IMAGE: "docker.io/paritytech/zombienet:v1.3.67"
DOCKER_IMAGES_VERSION: "${CI_COMMIT_REF_NAME}-${CI_COMMIT_SHORT_SHA}" DOCKER_IMAGES_VERSION: "${CI_COMMIT_REF_NAME}-${CI_COMMIT_SHORT_SHA}"
default: default:
+4
View File
@@ -9,6 +9,7 @@
- export ZOMBIENET_INTEGRATION_TEST_IMAGE="${POLKADOT_IMAGE}":${PIPELINE_IMAGE_TAG} - export ZOMBIENET_INTEGRATION_TEST_IMAGE="${POLKADOT_IMAGE}":${PIPELINE_IMAGE_TAG}
- export ZOMBIENET_INTEGRATION_TEST_SECONDARY_IMAGE="docker.io/parity/polkadot:${BUILD_RELEASE_VERSION}" - export ZOMBIENET_INTEGRATION_TEST_SECONDARY_IMAGE="docker.io/parity/polkadot:${BUILD_RELEASE_VERSION}"
- export COL_IMAGE="${COLANDER_IMAGE}":${PIPELINE_IMAGE_TAG} - export COL_IMAGE="${COLANDER_IMAGE}":${PIPELINE_IMAGE_TAG}
- export CUMULUS_IMAGE="docker.io/paritypr/polkadot-parachain-debug:${DOCKER_IMAGES_VERSION}"
- export MALUS_IMAGE="${MALUS_IMAGE}":${PIPELINE_IMAGE_TAG} - export MALUS_IMAGE="${MALUS_IMAGE}":${PIPELINE_IMAGE_TAG}
- echo "Zombienet Tests Config" - echo "Zombienet Tests Config"
- echo "gh-dir ${GH_DIR}" - echo "gh-dir ${GH_DIR}"
@@ -16,6 +17,7 @@
- echo "polkadot image ${ZOMBIENET_INTEGRATION_TEST_IMAGE}" - echo "polkadot image ${ZOMBIENET_INTEGRATION_TEST_IMAGE}"
- echo "polkadot secondary image ${ZOMBIENET_INTEGRATION_TEST_SECONDARY_IMAGE}" - echo "polkadot secondary image ${ZOMBIENET_INTEGRATION_TEST_SECONDARY_IMAGE}"
- echo "colander image ${COL_IMAGE}" - echo "colander image ${COL_IMAGE}"
- echo "cumulus image ${CUMULUS_IMAGE}"
- echo "malus image ${MALUS_IMAGE}" - echo "malus image ${MALUS_IMAGE}"
stage: zombienet stage: zombienet
image: "${ZOMBIENET_IMAGE}" image: "${ZOMBIENET_IMAGE}"
@@ -28,6 +30,8 @@
artifacts: true artifacts: true
- job: build-push-image-colander - job: build-push-image-colander
artifacts: true artifacts: true
- job: build-push-image-polkadot-parachain-debug
artifacts: true
extends: extends:
- .kubernetes-env - .kubernetes-env
- .zombienet-refs - .zombienet-refs
@@ -28,7 +28,7 @@ RUN apt-get update && \
apt-get clean && \ apt-get clean && \
find /var/lib/apt/lists/ -type f -not -name lock -delete; \ find /var/lib/apt/lists/ -type f -not -name lock -delete; \
# add user and link ~/.local/share/polkadot-parachain to /data # add user and link ~/.local/share/polkadot-parachain to /data
useradd -m -u 10000 -U -s /bin/sh -d /polkadot-parachain polkadot-parachain && \ useradd -m -u 1000 -U -s /bin/sh -d /polkadot-parachain polkadot-parachain && \
mkdir -p /data /polkadot-parachain/.local/share && \ mkdir -p /data /polkadot-parachain/.local/share && \
chown -R polkadot-parachain:polkadot-parachain /data && \ chown -R polkadot-parachain:polkadot-parachain /data && \
ln -s /data /polkadot-parachain/.local/share/polkadot-parachain && \ ln -s /data /polkadot-parachain/.local/share/polkadot-parachain && \
@@ -5,7 +5,7 @@ bootnode = true
[relaychain.genesis.runtime.configuration.config] [relaychain.genesis.runtime.configuration.config]
max_validators_per_core = 1 max_validators_per_core = 1
needed_approvals = 2 needed_approvals = 2
group_rotation_frequency = 3 group_rotation_frequency = 2
[relaychain] [relaychain]
default_image = "{{ZOMBIENET_INTEGRATION_TEST_IMAGE}}" default_image = "{{ZOMBIENET_INTEGRATION_TEST_IMAGE}}"
@@ -39,8 +39,7 @@ id = 1000
cumulus_based = true cumulus_based = true
[parachains.collator] [parachains.collator]
name = "collator" name = "alice"
command = "polkadot-parachain" command = "polkadot-parachain"
image = "docker.io/parity/polkadot-parachain:latest" image = "{{CUMULUS_IMAGE}}"
# image = "{{COL_IMAGE}}"
args = ["-lparachain=debug"] args = ["-lparachain=debug"]
@@ -21,18 +21,18 @@ malus-validator: resume
malus-validator: log line matches "Suggesting malicious candidate" within 200 seconds malus-validator: log line matches "Suggesting malicious candidate" within 200 seconds
# Pause first flaky node # Pause first flaky node
# Availability and finality will continue with 3/4 nodes online (incl. malus) # Availability will continue with 3/4 nodes online (incl. malus)
honest-flaky-validator-0: pause honest-flaky-validator-0: pause
# Wait for the dispute # Wait for the dispute
honest-flaky-validator-1: reports parachain_candidate_disputes_total is at least 1 within 40 seconds honest-flaky-validator-1: reports parachain_candidate_disputes_total is at least 1 within 60 seconds
# Pause second flaky node so that we do not revert blocks due to f+1 invalid votes # Pause second flaky node so that we do not revert blocks due to f+1 invalid votes
# Availability and finality will stop # Availability and finality will stop
honest-flaky-validator-1: pause honest-flaky-validator-1: pause
# Wait for 1 full session to pass after the last unconcluded dispute. # Wait for 1 full session to pass after the last unconcluded dispute.
sleep 120 seconds sleep 110 seconds
# Now resume flaky validators # Now resume flaky validators
honest-flaky-validator: resume honest-flaky-validator: resume