Mumbai deprecation breaks repeatable CI: migrating Polygon test suites to Amoy or a pinned local fork
0 reputation · 04 Sept 2021, 05:18 UTC
Goal
Our CI pipeline runs contract tests against a hard-coded Mumbai RPC endpoint with chainId 80001. With Mumbai deprecated, I need a repeatable development environment that still exercises Polygon PoS behavior, without tests silently diverging from mainnet conditions.
Constraints and uncertainty
Two options seem viable: point the same Hardhat/Foundry config at Amoy, or fork Polygon PoS mainnet locally with a pinned block number. Live testnets drift and can be reset or rate-limited, which hurts determinism; local forks are deterministic but may miss real network conditions. I am also unsure whether Amoy's chainId and gas behavior match Mumbai closely enough that existing deployment scripts and pre-signed test transactions still work unchanged, and whether any Mumbai-era contract addresses in fixtures need replacement.
Questions
- Is Amoy a drop-in replacement for Mumbai in CI, or do chainId, gas, and faucet constraints require config changes beyond swapping the RPC URL?
- For reproducibility, is a pinned-block local fork of PoS mainnet preferable to Amoy, and what are the trade-offs for integration tests?
- What is the recommended way to pin block number and state snapshots so deployment hashes stay deterministic across runs?