Loading
fix(mocknet): retry EVM readiness checks and guard incomplete genesis
Simulation job 16524223866 failed during mocknet startup, before the simulation ran. POL and AVAX readiness checks reported temporary DNS resolution failures, aborting EVM contract deployment and leaving the bootstrap THORNode unhealthy.
DNS exceptions escaped the existing readiness retry loop immediately. After the container restarted, the partially written genesis.json caused initialization to be skipped.
This change:
- Retries DNS/socket errors within the existing attempt limit and adds a connection timeout.
- Records mocknet initialization as incomplete until genesis initialization and validation succeed. Subsequent restarts refuse to start or redeploy against that incomplete state.
- Stops startup when genesis initialization returns an error.
- Adds regression tests in a separate
test-mocknet-scriptsCI job in the existingteststage.
Validation: all 13 focused tests passed in the CI job’s Alpine environment, covering retry recovery/exhaustion, partial deployment, interruption, validation failure, and normal restarts. Configured linters, shell syntax, local CI configuration checks, and diff checks passed.