Skip to content

params, core: add IsSeiAmsterdam for Sei's Amsterdam subset - #106

Open
shemnon wants to merge 1 commit into
shemnon/con-512-upgrade-sei-chain-to-the-sei-go-ethereum-fork-of-v1177from
shemnon/con-528-sei-amsterdam
Open

shemnon wants to merge 1 commit into
shemnon/con-512-upgrade-sei-chain-to-the-sei-go-ethereum-fork-of-v1177from
shemnon/con-528-sei-amsterdam

Conversation

@shemnon

@shemnon shemnon commented Oct 16, 2026

Copy link
Copy Markdown

Stacked on #104: review only this PR's commit. GitHub retargets it to main once #104 merges.

Sei adopts four Amsterdam EIPs without the rest of the fork (CON-528). SeiAmsterdamTime opts them in on top of Osaka. AmsterdamTime stays unset, so BAL, state gas, SLOTNUM and the other Amsterdam changes stay off.

  • EIP-7708: ETH transfer and SELFDESTRUCT transfer logs
  • EIP-7954: upstream 64 KiB code / 128 KiB initcode limits
  • EIP-8024: DUPN, SWAPN, EXCHANGE via an Osaka + 8024 jump table
  • EIP-8246: SELFDESTRUCT to self keeps the balance; Finalise uses the Amsterdam path, whose BAL recording stays off without IsAmsterdam
  • IsSeiAmsterdam requires Osaka; the fork-order check enforces it

Tests

  • core/vm/eips_sei_test.go: rules and fork order, the instruction set (Osaka plus 8024 only; SLOTNUM undefined), code size limits, SELFDESTRUCT balance and transfer log
  • core/evm_sei_test.go: transfer logs

Sei adopts four Amsterdam EIPs without the rest of the fork (CON-528).
SeiAmsterdamTime opts them in on top of Osaka; AmsterdamTime stays unset,
so BAL, state gas, SLOTNUM and the other Amsterdam changes stay off.

- EIP-7708: ETH transfer and SELFDESTRUCT transfer logs
- EIP-7954: upstream 64 KiB code / 128 KiB initcode limits
- EIP-8024: DUPN, SWAPN, EXCHANGE via an Osaka + 8024 jump table
- EIP-8246: SELFDESTRUCT to self keeps the balance; Finalise uses the
  Amsterdam path, whose BAL recording stays off without IsAmsterdam
- IsSeiAmsterdam requires Osaka; fork-order check enforces it
@cursor

cursor Bot commented Oct 16, 2026 •

Copy link
Copy Markdown

PR Summary

Medium Risk
Touches consensus-critical EVM transfers, SELFDESTRUCT finalization, and opcode tables, but only when SeiAmsterdamTime is set and with broad unit coverage.

Overview
Adds SeiAmsterdamTime and IsSeiAmsterdam so Sei can turn on a subset of Amsterdam EIPs on top of Osaka without enabling full Amsterdam (AmsterdamTime stays off—no BAL in Prepare, no SLOTNUM, no EIP-8037/8038 state gas).

Fork wiring: ChainConfig gains SeiAmsterdamTime (requires Osaka at or before it), Rules.IsSeiAmsterdam, and config fork-order / compatibility checks. The EVM selects a new seiAmsterdamInstructionSet (Osaka + EIP-8024 only) ahead of the Osaka table.

Behavior gated like Amsterdam where intended:

  • EIP-7708: ETH transfer logs in Transfer and SELFDESTRUCT-to-other (IsAmsterdam || IsSeiAmsterdam).
  • EIP-7954: Amsterdam 64 KiB / 128 KiB code and initcode limits in CheckMaxCodeSize / CheckMaxInitCodeSize.
  • EIP-8246: No balance burn on SELFDESTRUCT-to-self; Finalise uses the Amsterdam finalization path (balance-only accounts after self-destruct); hooked state skips selfdestruct-burn tracing when Sei Amsterdam is active.

Tests cover rules/fork order, instruction set diff vs Osaka, code limits, transfer logs, and SELFDESTRUCT balance/logs.

Reviewed by Cursor Bugbot for commit d7e9860. Bugbot is set up for automated code reviews on this repo. Configure here.

@seidroid seidroid 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.

This PR gates EIP-7708, 7954, 8024 and 8246 behind the new IsSeiAmsterdam flag (Osaka plus the subset). Every gated site checks the flag consistently. The fork-order check makes Osaka a requirement. BAL recording stays off because Prepare still only allocates stateAccessList under IsAmsterdam. The tests cover rules, the jump table, code-size limits, the SELFDESTRUCT balance and the transfer logs. I found no issues introduced by the PR.

Findings: 0 blocking | 0 non-blocking | 0 posted inline

Blockers

  • None at the file/PR level.

Non-blocking

  • None at the file/PR level.

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.

1 participant