Loading
simulation: improve startup resilience for delayed ERC token deployment
Summary
Mocknet startup can be delayed by ERC token contracts on EVM chains being sometimes deployed later than expected. This change complements that by making ERC deployment waiting more tolerant.
What changed
- In
test/simulation/cmd/mocknet.go, replaced a fixed retry loop (30checks with 2s sleep, ~60s total) with timeout-based polling. - Added a 5-minute deployment timeout for ERC token contract checks.
Why
A fixed ~60s window was too short in slower startup conditions, causing avoidable mocknet init failures.
Impact
- Fewer flaky startup failures during slow contract deployment.
- Still fails deterministically after a clear timeout boundary.
Summary by CodeRabbit
- Tests
- Enhanced contract deployment timeout handling in test simulations with improved error messages for better diagnostics during deployment failures.
Edited by Ghost User