commit 8119746bd80b66422ca874eddb41caf3aa6f5722
parent 84c474b0ac0edd82c40dd6c72cbdfd61a83cb8a4
Author: Joris Hartog <jorishartog@hotmail.com>
Date: Tue, 8 Sep 2026 13:23:38 +0200
Stabilize sync resilience deployment test
Diffstat:
3 files changed, 35 insertions(+), 6 deletions(-)
diff --git a/e2e/README.md b/e2e/README.md
@@ -104,9 +104,9 @@ before its fetched chain is persisted, then requires a successful restart and
seven-node convergence. Next it gives the same node the height-299 chain/UI
fixture, waits until the management API reports active incremental range
validation, interrupts it again, and requires the persisted stale node to
-resume and converge. The six finalizing reference nodes remain untouched, so
-their consensus participation is not conflated with the sync failure being
-tested.
+resume and converge. The six reference nodes start with finalization paused so
+the sync target stays fixed and fork races are not conflated with the sync
+failure being tested.
Each evidence run is stored in a timestamped directory with `report.json` and
`nodes.log`. The report records the base Git revision, dirty-worktree flag, an
diff --git a/e2e/docker-compose.e2e.yml b/e2e/docker-compose.e2e.yml
@@ -6,6 +6,8 @@ services:
image: iuna-local-e2e:latest
restart: "no"
cap_add: [NET_ADMIN]
+ environment:
+ IUNA_AUTOMATIC_BURN_ENABLED: "${IUNA_E2E_REFERENCE_MINING_ENABLED:-true}"
command:
- if [ -s /data/chain.sqlite3 ]; then exec iuna --data-dir /data --http 0.0.0.0:18661 --p2p 0.0.0.0:9444 --p2p-announce 172.29.0.10:9444 --debug; else exec iuna --genesis --data-dir /data --http 0.0.0.0:18661 --p2p 0.0.0.0:9444 --p2p-announce 172.29.0.10:9444 --debug; fi
healthcheck:
@@ -27,6 +29,9 @@ services:
image: iuna-local-e2e:latest
restart: "no"
cap_add: [NET_ADMIN]
+ environment:
+ IUNA_AUTOMATIC_BURN_ENABLED: "${IUNA_E2E_REFERENCE_MINING_ENABLED:-true}"
+ IUNA_POW_MINING_ENABLED: "${IUNA_E2E_REFERENCE_MINING_ENABLED:-true}"
command:
- exec iuna --join 172.29.0.10:9444 --data-dir /data --http 0.0.0.0:18661 --p2p 0.0.0.0:9444 --p2p-announce 172.29.0.11:9444 --debug
healthcheck:
@@ -48,6 +53,9 @@ services:
image: iuna-local-e2e:latest
restart: "no"
cap_add: [NET_ADMIN]
+ environment:
+ IUNA_AUTOMATIC_BURN_ENABLED: "${IUNA_E2E_REFERENCE_MINING_ENABLED:-true}"
+ IUNA_POW_MINING_ENABLED: "${IUNA_E2E_REFERENCE_MINING_ENABLED:-true}"
command:
- exec iuna --join 172.29.0.10:9444 --data-dir /data --http 0.0.0.0:18661 --p2p 0.0.0.0:9444 --p2p-announce 172.29.0.12:9444 --stratum 0.0.0.0:3333 --debug
healthcheck:
@@ -70,6 +78,9 @@ services:
image: iuna-local-e2e:latest
restart: "no"
cap_add: [NET_ADMIN]
+ environment:
+ IUNA_AUTOMATIC_BURN_ENABLED: "${IUNA_E2E_REFERENCE_MINING_ENABLED:-true}"
+ IUNA_POW_MINING_ENABLED: "${IUNA_E2E_REFERENCE_MINING_ENABLED:-true}"
command:
- exec iuna --join 172.29.0.10:9444 --data-dir /data --http 0.0.0.0:18661 --p2p 0.0.0.0:9444 --p2p-announce 172.29.0.13:9444 --debug
healthcheck:
@@ -91,6 +102,9 @@ services:
image: iuna-local-e2e:latest
restart: "no"
cap_add: [NET_ADMIN]
+ environment:
+ IUNA_AUTOMATIC_BURN_ENABLED: "${IUNA_E2E_REFERENCE_MINING_ENABLED:-true}"
+ IUNA_POW_MINING_ENABLED: "${IUNA_E2E_REFERENCE_MINING_ENABLED:-true}"
command:
- exec iuna --join 172.29.0.13:9444 --data-dir /data --http 0.0.0.0:18661 --p2p 0.0.0.0:9444 --p2p-announce 172.29.0.14:9444 --debug
healthcheck:
@@ -112,6 +126,9 @@ services:
image: iuna-local-e2e:latest
restart: "no"
cap_add: [NET_ADMIN]
+ environment:
+ IUNA_AUTOMATIC_BURN_ENABLED: "${IUNA_E2E_REFERENCE_MINING_ENABLED:-true}"
+ IUNA_POW_MINING_ENABLED: "${IUNA_E2E_REFERENCE_MINING_ENABLED:-true}"
command:
- exec iuna --join 172.29.0.13:9444 --data-dir /data --http 0.0.0.0:18661 --p2p 0.0.0.0:9444 --p2p-announce 172.29.0.15:9444 --debug
healthcheck:
diff --git a/e2e/iuna_e2e.py b/e2e/iuna_e2e.py
@@ -28,6 +28,7 @@ E2E_DIR = ROOT / "e2e"
COMPOSE_FILES = (ROOT / "docker-compose.yml", E2E_DIR / "docker-compose.e2e.yml")
SERVICES = ("bootstrap", "node2", "node3", "node4", "node5", "node6")
SYNC_SERVICE = "syncnode"
+REFERENCE_MINING_ENV = "IUNA_E2E_REFERENCE_MINING_ENABLED"
SERVICE_IPS = {
"bootstrap": "172.29.0.10",
"node2": "172.29.0.11",
@@ -1075,8 +1076,13 @@ def run_sync_resilience_scenario(
"running e2e scenario sync-resilience: interrupted empty bootstrap and stale range sync",
flush=True,
)
- restore_snapshot("first-objective-checkpoint")
+ previous_reference_mining = os.environ.get(REFERENCE_MINING_ENV)
+ os.environ[REFERENCE_MINING_ENV] = "false"
try:
+ # Sync interruption is the variable under test. Start the reference chain
+ # paused so a slow deployment host cannot turn range validation into an
+ # unrelated moving-tip fork race while the seventh node catches up.
+ restore_snapshot("first-objective-checkpoint")
start(build)
initial = wait_for_height(1_001, timeout, converge=True)
initial_height = min(
@@ -1194,8 +1200,14 @@ def run_sync_resilience_scenario(
compose("logs", "--tail", "300", *sync_services, check=False)
raise
finally:
- if not keep:
- compose("down", "--remove-orphans", check=False)
+ try:
+ if not keep:
+ compose("down", "--remove-orphans", check=False)
+ finally:
+ if previous_reference_mining is None:
+ os.environ.pop(REFERENCE_MINING_ENV, None)
+ else:
+ os.environ[REFERENCE_MINING_ENV] = previous_reference_mining
def run_partition_recovery_scenario(