evmigration: 3-month migration window for testnet & mainnet#178
Conversation
Auto-derive evmigration migration_end_time on testnet and mainnet from the upgrade block time using a 3-calendar-month window (AddDate(0, 3, 0)) rather than the previous testnet=7 days and mainnet=manual-zero behavior. Devnet keeps its short 2-day rehearsal window. autoMigrationWindow is replaced by autoMigrationEndTime so the deadline can use calendar-month arithmetic on the block time directly (a month is not a fixed Duration). Also condense the v1.20.0 CHANGELOG into reader-facing highlights instead of a commit-log dump, and sync docs/evm-integration/architecture/rollout.md. Co-Authored-By: Claude Opus 4.8 (1M context) <noreply@anthropic.com>
Update the user-facing account migration guide and its screenshot assets (evmigration-1..25; remove the obsolete evmigration-4ex). Co-Authored-By: Claude Opus 4.8 (1M context) <noreply@anthropic.com>
There was a problem hiding this comment.
💡 Codex Review
Here are some automated review suggestions for this pull request.
Reviewed commit: 201e66b1f9
ℹ️ About Codex in GitHub
Your team has set up Codex to review pull requests in this repo. Reviews are triggered when you
- Open a pull request for review
- Mark a draft as ready
- Comment "@codex review".
If Codex has suggestions, it will comment; otherwise it will react with 👍.
Codex can also answer questions or update the PR. Try commenting "@codex address that feedback".
There was a problem hiding this comment.
Pull request overview
Updates the v1.20.0 upgrade behavior so x/evmigration’s migration_end_time is automatically set to a finite window on testnet and mainnet (3 calendar months from the upgrade block time), while keeping devnet’s shorter rehearsal window. Also refreshes rollout/migration documentation and condenses the v1.20.0 changelog entries.
Changes:
- Replace duration-based migration window logic with an end-time derivation using
AddDate(0, 3, 0)for testnet/mainnet and a fixed 2-day window for devnet. - Update
v1.20.0upgrade tests to assert the 3-month end time on both testnet and mainnet. - Refresh evmigration rollout notes, user migration guide, and simplify the v1.20.0 changelog section.
Reviewed changes
Copilot reviewed 5 out of 31 changed files in this pull request and generated 4 comments.
Show a summary per file
| File | Description |
|---|---|
| docs/evm-integration/user-guides/migration.md | Refreshes the Portal-based migration walkthrough and screenshots. |
| docs/evm-integration/architecture/rollout.md | Updates rollout parameter guidance to reflect the new 3-month window on testnet/mainnet. |
| CHANGELOG.md | Condenses v1.20.0 notes and documents the new auto-derived migration end time behavior. |
| app/upgrades/v1_20_0/upgrade.go | Implements auto-derived migration_end_time using block-time calendar arithmetic. |
| app/upgrades/v1_20_0/upgrade_test.go | Updates assertions for testnet/mainnet migration end time behavior. |
💡 Add Copilot custom instructions for smarter, more guided reviews. Learn how to get started.
…on window The app-level ChainID captured during setupUpgrades comes from the --chain-id flag, which defaults to the non-empty "lumera" and so never falls back to the genesis chain ID (SDK v0.53.6 DefaultBaseappOptions only consults genesis when the flag is empty). On the common `lumerad start` path that default never matches the mainnet prefix, leaving migration_end_time silently 0 despite the docs promising a finite mainnet window. Read the network from the SDK context (ctx.ChainID()), which carries the genesis-derived chain ID from the block header and is authoritative at upgrade time. Tests now seed the context with the real chain ID while passing the misleading "lumera" default in params, and add a negative case proving the bare default leaves the deadline unset. Co-Authored-By: Claude Opus 4.8 (1M context) <noreply@anthropic.com>
…ation.md spacing - upgrade.go: reword the window comment to say recognized Lumera networks derive a deadline (unrecognized chain IDs are left with none), matching autoMigrationEndTime's ok==false branch. - upgrade_test.go: use the repo-canonical lumera-testnet-2 chain ID. - migration.md: add missing spaces around bold/code spans on the screenshot bullets so they render correctly. Co-Authored-By: Claude Opus 4.8 (1M context) <noreply@anthropic.com>
Summary
Two related changes:
x/evmigrationmigration_end_timedeadline automatically for testnet and mainnet to 3 calendar months from the upgrade block, applied in thev1.20.0upgrade handler. Previously testnet used a fixed 7-day window and mainnet was left at0(set manually near launch). Devnet is unchanged (keeps its 2-day rehearsal window).Changes
Migration window (
201e66b)app/upgrades/v1_20_0/upgrade.go— replacedautoMigrationWindow(chainID) time.DurationwithautoMigrationEndTime(chainID, blockTime) (time.Time, bool). Devnet still uses a fixed2*24hwindow; testnet and mainnet now useblockTime.AddDate(0, 3, 0). Calendar-month arithmetic must operate on the block time directly because a month is not a constanttime.Duration.app/upgrades/v1_20_0/upgrade_test.go— testnet assertion updated to+3 months; the mainnet test now asserts the 3-month deadline (renamed from...LeavesMigrationEndTimeZeroOnMainnetto...SetsMainnetMigrationEndTime). Devnet test untouched.docs/evm-integration/architecture/rollout.md— synced the three places describing the old testnet/mainnet behavior.CHANGELOG.md— condensed the v1.20.0 section from 44 commit-log bullets to 16 reader-facing entries grouped by theme; folded in the new migration-window behavior.Docs refresh (
1ff3203)docs/evm-integration/user-guides/migration.md— updated account migration guide (+120/-74).docs/evm-integration/assets/— refreshed/added screenshots (evmigration-1...25; removed obsoleteevmigration-4ex).Verification
go build ./app/upgrades/...— passesgo test ./app/upgrades/v1_20_0/...(migration-end-time tests) — passesgolangci-lint run ./app/upgrades/v1_20_0/...— 0 issues🤖 Generated with Claude Code