Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

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

Merged
merged 11 commits into from
Sep 6, 2023
2 changes: 1 addition & 1 deletion .gitlab-ci.yml
Original file line number Diff line number Diff line change
Expand Up @@ -30,7 +30,7 @@ variables:
RUSTY_CACHIER_COMPRESSION_METHOD: zstd
NEXTEST_FAILURE_OUTPUT: immediate-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}"

default:
Expand Down
4 changes: 4 additions & 0 deletions .gitlab/pipeline/zombienet/polkadot.yml
Original file line number Diff line number Diff line change
Expand Up @@ -9,13 +9,15 @@
- export ZOMBIENET_INTEGRATION_TEST_IMAGE="${POLKADOT_IMAGE}":${PIPELINE_IMAGE_TAG}
- export ZOMBIENET_INTEGRATION_TEST_SECONDARY_IMAGE="docker.io/parity/polkadot:${BUILD_RELEASE_VERSION}"
- 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}
- echo "Zombienet Tests Config"
- echo "gh-dir ${GH_DIR}"
- echo "local-dir ${LOCAL_DIR}"
- echo "polkadot image ${ZOMBIENET_INTEGRATION_TEST_IMAGE}"
- echo "polkadot secondary image ${ZOMBIENET_INTEGRATION_TEST_SECONDARY_IMAGE}"
- echo "colander image ${COL_IMAGE}"
- echo "cumulus image ${CUMULUS_IMAGE}"
- echo "malus image ${MALUS_IMAGE}"
stage: zombienet
image: "${ZOMBIENET_IMAGE}"
Expand All @@ -28,6 +30,8 @@
artifacts: true
- job: build-push-image-colander
artifacts: true
- job: build-push-image-polkadot-parachain-debug
artifacts: true
extends:
- .kubernetes-env
- .zombienet-refs
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -28,7 +28,7 @@ RUN apt-get update && \
apt-get clean && \
find /var/lib/apt/lists/ -type f -not -name lock -delete; \
# 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 && \
chown -R polkadot-parachain:polkadot-parachain /data && \
ln -s /data /polkadot-parachain/.local/share/polkadot-parachain && \
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -5,7 +5,7 @@ bootnode = true
[relaychain.genesis.runtime.configuration.config]
max_validators_per_core = 1
needed_approvals = 2
group_rotation_frequency = 3
group_rotation_frequency = 2

[relaychain]
default_image = "{{ZOMBIENET_INTEGRATION_TEST_IMAGE}}"
Expand Down Expand Up @@ -39,8 +39,7 @@ id = 1000
cumulus_based = true

[parachains.collator]
name = "collator"
name = "alice"
command = "polkadot-parachain"
image = "docker.io/parity/polkadot-parachain:latest"
# image = "{{COL_IMAGE}}"
image = "{{CUMULUS_IMAGE}}"
args = ["-lparachain=debug"]
Original file line number Diff line number Diff line change
Expand Up @@ -21,18 +21,18 @@ malus-validator: resume
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)
# Availability 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
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
# Availability and finality will stop
honest-flaky-validator-1: pause

# Wait for 1 full session to pass after the last unconcluded dispute.
sleep 120 seconds
sleep 110 seconds

# Now resume flaky validators
honest-flaky-validator: resume
Expand Down