feat(evmigration): tune migration params, fix chain-helper counts#151
Merged
Conversation
- raise DefaultMaxValidatorDelegations 2000 -> 2500, sized against the live mainnet worst-case migration-object count of 1,632 (delegations + unbondings + redelegations) - v1.20.0 upgrade handler auto-sets devnet migration_end_time to upgrade block time + 2 days; testnet/mainnet keep 0 (specific absolute timestamp chosen near launch) - move chain-ID detection (mainnet/testnet/devnet prefixes) into config as a single source of truth; app/upgrades/chain_id.go now delegates, avoiding an import cycle for the v1_20_0 subpackage - wire EvmigrationKeeper into AppUpgradeParams and app.setupUpgrades - fix scripts/chain-helper.sh max-validator-delegations: use --page-count-total for exact delegation/unbonding counts (previously truncated at the page limit, under-reporting large validators), add per-validator count= progress, default buffer 10% -> 30% - add scripts/chain-helper.sh stats: accounts, validators + jailed, and supernodes grouped by current state - update rollout doc and tests for the finalized evmigration decisions Co-Authored-By: Claude Opus 4.8 (1M context) <noreply@anthropic.com>
… days Generalize the v1.20.0 upgrade handler's devnet-only deadline into a per-network autoMigrationWindow: devnet = 2 days, testnet = 7 days, mainnet = 0 (specific absolute timestamp chosen near launch). The handler applies the window only when > 0, so mainnet and any unrecognized chain ID fall through to the manual-timestamp path. Updates upgrade tests (testnet now asserts +7 days; mainnet asserts 0) and the rollout doc. Co-Authored-By: Claude Opus 4.8 (1M context) <noreply@anthropic.com>
a-ok123
previously approved these changes
Jun 11, 2026
Contributor
There was a problem hiding this comment.
Pull request overview
This PR finalizes x/evmigration launch sizing and makes the v1.20.0 upgrade path/network tooling more robust by (a) auto-deriving devnet/testnet migration deadlines at upgrade time, (b) consolidating chain-ID classification, and (c) hardening chain-helper.sh counting + adding a new stats command. It also updates rollout documentation and refactors GitHub Actions Go setup to prime module caches centrally.
Changes:
- Tune
x/evmigrationdefaults (notablymax_validator_delegations→ 2500) and document sizing rationale. - In the v1.20.0 upgrade handler, auto-set
migration_end_timeon devnet/testnet from upgrade block time; mainnet remains0. - Improve operational tooling (
chain-helper.shexact counting + newstats) and supporting tests/docs; CI workflows now rely on a smartersetup-gocomposite action.
Reviewed changes
Copilot reviewed 15 out of 15 changed files in this pull request and generated 2 comments.
Show a summary per file
| File | Description |
|---|---|
| x/evmigration/types/params.go | Raises DefaultMaxValidatorDelegations to 2500 and documents sizing rationale. |
| tests/scripts/chain-helper.bats | Updates Bats fixtures/assertions for exact pagination totals and the new stats command. |
| scripts/chain-helper.sh | Fixes staking record counting via --page-count-total, adds progress detail, and introduces stats with pagination helper. |
| docs/evm-integration/architecture/rollout.md | Updates rollout decisions/table to reflect finalized migration policy and sizing signals. |
| devnet/tests/common/chaincli.go | Improves height parsing to handle mixed CLI output and top-level header.height. |
| devnet/tests/common/chaincli_test.go | Adds coverage for the new LatestHeight parsing cases. |
| config/config.go | Centralizes chain-ID prefix constants and Is{Net}ChainID helpers. |
| app/upgrades/v1_20_0/upgrade.go | Adds auto-derived migration window logic and sets migration_end_time on devnet/testnet. |
| app/upgrades/v1_20_0/upgrade_test.go | Adds tests asserting devnet/testnet deadline derivation and mainnet “leave at 0”. |
| app/upgrades/params/params.go | Wires EvmigrationKeeper into AppUpgradeParams. |
| app/upgrades/chain_id.go | Delegates chain-ID checks to config to avoid import cycles. |
| app/app.go | Passes EvmigrationKeeper into upgrade params wiring. |
| .github/workflows/test.yml | Removes redundant go mod download steps (now handled by composite action). |
| .github/workflows/build.yml | Same CI adjustment as above across build/test jobs. |
| .github/actions/setup-go/action.yml | Enhances Go setup to optionally download modules and explicitly cache GOMODCACHE. |
💡 Add Copilot custom instructions for smarter, more guided reviews. Learn how to get started.
a-ok123
approved these changes
Jun 11, 2026
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
Summary
Finalizes the
x/evmigrationlaunch parameters and hardens the supportingchain-helper.shtooling, plus syncs the rollout doc.max_validator_delegationsdefault 2000 → 2500 (x/evmigration/types/params.go). Sized against livelumera-mainnet-1, where the largest validator's migration-object count (delegations + unbondings + redelegations) is 1,632; 2500 gives ~1.5× headroom without over-provisioning.migration_end_timeauto-derived in thev1.20.0upgrade handler as upgrade-block time + 2 days (app/upgrades/v1_20_0/upgrade.go). Testnet/mainnet keep0and receive a specific absolute Unix timestamp near launch.config(IsDevnetChainID, etc.) as a single source of truth;app/upgrades/chain_id.godelegates to it — this avoids the import cycle that blocksv1_20_0from importing packageupgrades.EvmigrationKeeperwired intoAppUpgradeParamsso the handler can set params.scripts/chain-helper.shfixes:max-validator-delegationsnow uses--page-count-totalfor exact counts (was silently truncated at the page limit, e.g. 1,593 → 1,000); added per-validatorcount=progress; default buffer 10% → 30%.statscommand: total accounts, validators + jailed count, supernodes grouped by current state.setup-goaction now owns Go dependency caching/downloads, so the build/test workflows no longer repeat explicitgo mod downloadsteps.Test plan
go build ./...— cleango test ./config/... ./app/upgrades/... ./x/evmigration/...— all pass (incl. new devnetmigration_end_timeupgrade tests)golangci-lint runon changed packages — 0 issuesbats tests/scripts/chain-helper.bats— 8/8 passchain-helper.sh stats/max-validator-delegationsverified live againstlumera-mainnet-1🤖 Generated with Claude Code