Skip to content

feat(evmigration): tune migration params, fix chain-helper counts#151

Merged
akobrin1 merged 5 commits into
masterfrom
feat/evm-params
Jun 11, 2026
Merged

feat(evmigration): tune migration params, fix chain-helper counts#151
akobrin1 merged 5 commits into
masterfrom
feat/evm-params

Conversation

@akobrin1

@akobrin1 akobrin1 commented Jun 10, 2026

Copy link
Copy Markdown
Contributor

Summary

Finalizes the x/evmigration launch parameters and hardens the supporting chain-helper.sh tooling, plus syncs the rollout doc.

  • max_validator_delegations default 2000 → 2500 (x/evmigration/types/params.go). Sized against live lumera-mainnet-1, where the largest validator's migration-object count (delegations + unbondings + redelegations) is 1,632; 2500 gives ~1.5× headroom without over-provisioning.
  • Devnet migration_end_time auto-derived in the v1.20.0 upgrade handler as upgrade-block time + 2 days (app/upgrades/v1_20_0/upgrade.go). Testnet/mainnet keep 0 and receive a specific absolute Unix timestamp near launch.
  • Chain-ID detection moved to config (IsDevnetChainID, etc.) as a single source of truth; app/upgrades/chain_id.go delegates to it — this avoids the import cycle that blocks v1_20_0 from importing package upgrades.
  • EvmigrationKeeper wired into AppUpgradeParams so the handler can set params.
  • scripts/chain-helper.sh fixes: max-validator-delegations now uses --page-count-total for exact counts (was silently truncated at the page limit, e.g. 1,593 → 1,000); added per-validator count= progress; default buffer 10% → 30%.
  • New stats command: total accounts, validators + jailed count, supernodes grouped by current state.
  • Docs: rollout.md updated with the finalized decisions (also synced to the Notion page).
  • CI setup cleanup: the shared setup-go action now owns Go dependency caching/downloads, so the build/test workflows no longer repeat explicit go mod download steps.

Test plan

  • go build ./... — clean
  • go test ./config/... ./app/upgrades/... ./x/evmigration/... — all pass (incl. new devnet migration_end_time upgrade tests)
  • golangci-lint run on changed packages — 0 issues
  • bats tests/scripts/chain-helper.bats — 8/8 pass
  • chain-helper.sh stats / max-validator-delegations verified live against lumera-mainnet-1

🤖 Generated with Claude Code

akobrin1 and others added 4 commits June 10, 2026 14:31
- 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>
@akobrin1 akobrin1 requested a review from a-ok123 June 11, 2026 19:16
@a-ok123 a-ok123 requested a review from Copilot June 11, 2026 19:31
a-ok123
a-ok123 previously approved these changes Jun 11, 2026

Copilot AI left a comment

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

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/evmigration defaults (notably max_validator_delegations → 2500) and document sizing rationale.
  • In the v1.20.0 upgrade handler, auto-set migration_end_time on devnet/testnet from upgrade block time; mainnet remains 0.
  • Improve operational tooling (chain-helper.sh exact counting + new stats) and supporting tests/docs; CI workflows now rely on a smarter setup-go composite 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.

Comment thread scripts/chain-helper.sh
Comment thread .github/workflows/test.yml
@akobrin1 akobrin1 merged commit 271cafe into master Jun 11, 2026
16 checks passed
@akobrin1 akobrin1 deleted the feat/evm-params branch June 11, 2026 20:53
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

3 participants