Skip to content

evmigration: 3-month migration window for testnet & mainnet#178

Merged
akobrin1 merged 4 commits into
masterfrom
evm-mainnet-params
Jun 24, 2026
Merged

evmigration: 3-month migration window for testnet & mainnet#178
akobrin1 merged 4 commits into
masterfrom
evm-mainnet-params

Conversation

@akobrin1

@akobrin1 akobrin1 commented Jun 24, 2026

Copy link
Copy Markdown
Contributor

Summary

Two related changes:

  1. Migration window — sets the x/evmigration migration_end_time deadline automatically for testnet and mainnet to 3 calendar months from the upgrade block, applied in the v1.20.0 upgrade handler. Previously testnet used a fixed 7-day window and mainnet was left at 0 (set manually near launch). Devnet is unchanged (keeps its 2-day rehearsal window).
  2. Docs — refreshes the account migration user guide and its screenshots.

Changes

Migration window (201e66b)

  • app/upgrades/v1_20_0/upgrade.go — replaced autoMigrationWindow(chainID) time.Duration with autoMigrationEndTime(chainID, blockTime) (time.Time, bool). Devnet still uses a fixed 2*24h window; testnet and mainnet now use blockTime.AddDate(0, 3, 0). Calendar-month arithmetic must operate on the block time directly because a month is not a constant time.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 ...LeavesMigrationEndTimeZeroOnMainnet to ...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 obsolete evmigration-4ex).

Verification

  • go build ./app/upgrades/... — passes
  • go test ./app/upgrades/v1_20_0/... (migration-end-time tests) — passes
  • golangci-lint run ./app/upgrades/v1_20_0/... — 0 issues

🤖 Generated with Claude Code

akobrin1 and others added 2 commits June 24, 2026 16:21
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>

@chatgpt-codex-connector chatgpt-codex-connector Bot left a comment

Copy link
Copy Markdown

Choose a reason for hiding this comment

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

💡 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".

Comment thread app/upgrades/v1_20_0/upgrade.go Outdated
a-ok123
a-ok123 previously approved these changes Jun 24, 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

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.0 upgrade 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.

Comment thread app/upgrades/v1_20_0/upgrade.go Outdated
Comment thread app/upgrades/v1_20_0/upgrade_test.go Outdated
Comment thread docs/evm-integration/user-guides/migration.md Outdated
Comment thread docs/evm-integration/user-guides/migration.md Outdated
…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>
@akobrin1 akobrin1 requested a review from a-ok123 June 24, 2026 20:41
@akobrin1 akobrin1 merged commit 7b8a028 into master Jun 24, 2026
24 checks passed
@akobrin1 akobrin1 deleted the evm-mainnet-params branch June 24, 2026 23:09
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