Files
evm/params
zeekay 6c246f9abf params/extras: rollout regression tests + register 16 missing precompiles
Two changes for the Quasar Edition rollout:

1. precompile/registry/registry.go side-effect imports the 16 modules
   that ship in the canonical upgrade.json but were not yet wired into
   the registry: attestation, babyjubjub, bls12381, bridge, compute,
   curve25519, ed25519, math, pasta, pedersen, poseidon, sr25519,
   stableswap, vrf, x25519, xwing. Without these imports each module's
   init() never runs, so modules.RegisteredModules omits them and
   UpgradeConfig.UnmarshalJSON rejects the activation with
   "unknown precompile config: <key>", bricking luxd boot.

2. params/extras/precompile_upgrade_rollout_test.go (NEW) is the
   forward-compat regression gate against the live lux-mainnet config.
   Five subtests:
   - IsForwardCompatibleWithLiveActivations: every precompile
     activation currently in the lux-mainnet StatefulSet inline
     upgrade.json (18 entries at blockTimestamp:0 including the
     dead* family) MUST be preserved at the same blockTimestamp in
     the canonical upgrade.json, else checkPrecompileCompatible
     refuses boot.
   - PrecompileTimestampsAreMonotonic: verifyPrecompileUpgrades
     rejects non-monotonic timestamps; we verify the canonical
     config respects this.
   - WarpRequiresPrimaryNetworkSigners: warpConfig MUST pin
     requirePrimaryNetworkSigners=true (red-review finding #8).
   - HasStrictPQActivation: networkUpgradeOverrides MUST set
     strictPQTimestamp=1766708400 (Quasar timestamp) so
     contract.RefuseUnderStrictPQ fires.
   - HasStrictPQTrue: ~/work/lux/state/chain-configs/lux-mainnet/
     config.json MUST set "pq": true so the EVM plugin boots into
     strict-PQ posture.

The test uses raw JSON parsing (not typed UpgradeConfig.Unmarshal) so
it does not depend on the registry side-effect imports being loaded
in the test binary — avoiding cgo linker conflicts between sr25519's
NaCl-compat randombytes and the HQC PQClean randombytes shim.

Red review findings #2, #7, #8.
2026-06-01 21:12:21 -07:00
..
2025-08-01 01:23:42 +00:00
2025-08-01 01:23:42 +00:00