Repository navigation
feat(evm): activate Osaka and Sei's Amsterdam subset at v6.9 - #4562
Conversation
The v6.9 binary turns on Osaka and the Sei Amsterdam EIPs agreed in CON-528, using the fork's IsSeiAmsterdam flag. Activation follows the Pectra pattern: fork times are constants in the binary. - OsakaTime and SeiAmsterdamTime in x/evm, giga xevm and evm-only configs - CheckTx/ante: EIP-7825 gas cap and the 96 KiB initcode limit - Sei StateDB keeps a self-destructed account's balance (EIP-8246) - Behavior tests for EIP-7708, 7939, 8024, 7954 and the gas cap; tests pinning burns, log indexes and the 24 KiB limit updated
EIP-8246 keeps a self-destructed account's balance, so deleting its Sei address association would strand that balance at a Sei address the EVM no longer resolves. - Under IsSeiAmsterdam, SelfDestruct leaves the association in place - Applies only to contracts created in the same tx (EIP-6780)
…ethereum Tracks the fork's switch to the upstream EIP-7954 limits (64 KiB code, 128 KiB initcode) and drops sei-chain's copies of its fork logic. - types.EthereumRules(blockTime) replaces IsOsaka/IsSeiAmsterdam - Initcode checks in ante and CallEVM use vm.CheckMaxInitCodeSize - osaka_time and sei_amsterdam_time added to the ChainConfig proto - evm-only config sets SeiAmsterdamTime from OsakaTime - Tests and CHANGELOG moved to the 64/128 KiB limits
…sion The executor refuses a transaction above params.MaxTxGas under Osaka, so CheckTx now refuses it too instead of letting it into a block. - Applies once Osaka is scheduled, so pre-fork admissions cannot land in a post-fork block
Under Osaka, gas estimation is capped at the EIP-7825 limit, so the infinite loop runs out of gas before the shrunk timeout fires.
Points the replace at sei-protocol/go-ethereum d7e986033 (#106).
PR SummaryHigh Risk Overview EIP-8246 changes self-destruct handling in
Reviewed by Cursor Bugbot for commit 1126e99. Bugbot is set up for automated code reviews on this repo. Configure here. |
|
The latest Buf updates on your PR. Results from workflow Buf / buf (pull_request).
|
There was a problem hiding this comment.
This change turns on Osaka and Sei's Amsterdam subset (EIP-7708, 7954, 8024, 8246) using binary-constant fork times, applies the EIP-7825 gas cap and the new initcode limit in CheckTx, DeliverTx ante and evm-only admission, and keeps the balance and address association of a self-destructed account. Nothing blocks: the gates read the same DefaultChainConfig that every executor uses, the fee-charged CosmWasm→EVM path correctly skips the cap, and the x/evm and giga StateDB twins match; codex's reading reported nothing, and the one point here that it did not raise is the go-ethereum pin, kept as a suggestion.
Non-blocking
1 finding on the changed lines, as inline comments.
- The new keeper behavior tests cover 7708, 7939, 8024 and 7954, but nothing in this repo exercises P256VERIFY at 0x100 or the EIP-7823/7883 MODEXP bounds and repricing through Sei's EVM, which adds custom precompiles of its own. A small call test for each would catch a regression in how the custom precompile set merges with geth's Osaka set.
seidroid review · decision approve · session c125127f1b4c4509a5662202d7c0364a · turn resp_claude_8621557e08b2a665059da849e941914f · item 1e7d7775aa1c5011b54904e0dea2a7c1
Findings: 0 blocking | 2 non-blocking | 1 posted inline
| github.com/btcsuite/btcd => github.com/btcsuite/btcd v0.23.2 | ||
| github.com/confio/ics23/go => github.com/cosmos/cosmos-sdk/ics23/go v0.8.0 | ||
| github.com/ethereum/go-ethereum => github.com/sei-protocol/go-ethereum v1.15.8-wip.0.20261013200537-44a0f43a0911 | ||
| github.com/ethereum/go-ethereum => github.com/sei-protocol/go-ethereum v1.15.8-wip.0.20261016212634-d7e986033e5a |
There was a problem hiding this comment.
suggestion — This pins consensus-critical EVM code (IsSeiAmsterdam, the EIP-8246 SELFDESTRUCT path, the 7708 logs) to d7e986033e5a. That commit is the head of sei-protocol/go-ethereum#106, which is still open and unmerged. If that branch is squashed or rebased, this pin points at a commit the fork no longer has, and the code that ships in v6.9 is not the code that was reviewed. Merge #106 and repin to the merged commit before this lands.
CheckTx reported the initcode and EIP-7825 rejections as code 1 with no codespace, so RPC clients saw ": unknown". - Initcode over the limit wraps ErrTxTooLarge - Gas over the EIP-7825 cap wraps ErrOutOfGas, like the block max gas check - The go-ethereum reason is kept as the wrap text
A rejected broadcast was rebuilt from its code alone under the sdk codespace, dropping the reason and misreading codes from other codespaces. - Return CheckTx's log when present, else the registered error for its real codespace and code - TestSendRawTransaction no longer expects the misread "invalid sequence" - eth_getBlockByNumber spec: Sei now reports "intrinsic gas too low" like geth
Value moved by the payable Sei precompiles now produces Transfer logs, matching the value-carrying frames in the trace. - TransferWithoutEvents runs core.Transfer with Cosmos events suppressed, so the payment to bank, staking, gov and wasmd is logged - the payment refund logs inside its synthetic CALL frame; HandlePaymentUsei and HandlePaymentUseiWei take the EVM instead of its depth - bank sendNative logs the caller-to-receiver transfer
There was a problem hiding this comment.
Cursor Bugbot has reviewed your changes using default effort and found 1 potential issue.
❌ Bugbot Autofix is OFF. To automatically fix reported issues with cloud agents, enable autofix in the Cursor dashboard.
Want higher recall? High effort reviews run extra passes and find more bugs. A team admin can switch effort levels in the Cursor dashboard.
Reviewed by Cursor Bugbot for commit 1847aeb. Configure here.
| if value != nil && !useiAmt.IsZero() { | ||
| useiAmtAsWei := useiAmt.Mul(state.SdkUseiToSweiMultiplier).BigInt() | ||
| coin, err := pcommon.HandlePaymentUsei(ctx, p.evmKeeper.GetSeiAddressOrDefault(ctx, p.address), creatorAddr, useiAmtAsWei, p.bankKeeper, p.evmKeeper, hooks, evm.GetDepth()) | ||
| coin, err := pcommon.HandlePaymentUsei(ctx, p.evmKeeper.GetSeiAddressOrDefault(ctx, p.address), creatorAddr, useiAmtAsWei, p.bankKeeper, p.evmKeeper, hooks, evm) |
There was a problem hiding this comment.
Wasmd omits actual transfer logs
Medium Severity
instantiate and execute now emit EIP-7708 payment and refund logs via HandlePaymentUsei, but never log the native usei that wasmdKeeper then sends to the CosmWasm contract. Indexers see a round-trip that nets to zero while the contract actually receives the funds, unlike sendNative which logs that third transfer. Receipt logs are consensus-relevant, so this gap would be frozen at v6.9.
Additional Locations (1)
Reviewed by Cursor Bugbot for commit 1847aeb. Configure here.
Reverts 1847aeb. Value sent to the bank, staking, gov and wasmd precompiles stays unlogged; giga's precompile conversions will add the transfer logs. - CHANGELOG notes the precompile exception under EIP-7708
A creation tx over the initcode limit passed CheckTx, then the executor rejected it and no receipt was stored, so the hash never resolved. - parseTx checks initcode size against the last committed block's rules - CHANGELOG notes eth_sendRawTransaction now returns the CheckTx log


Stacked on #4505 (go-ethereum v1.17.7), so this diff shows only the fork activation; it retargets to
mainonce #4505 merges. v6.9 ships Osaka plus the four Amsterdam EIPs agreed in CON-528 (7708 transfer logs, 7954 64 KiB code / 128 KiB initcode, 8024 DUPN/SWAPN/EXCHANGE, 8246 SELFDESTRUCT without burn), using theIsSeiAmsterdamflag from sei-protocol/go-ethereum#106.AmsterdamTimestays unset, so BAL, state gas, SLOTNUM and the rest of Amsterdam stay off.Activation follows the Pectra pattern:
OsakaTimeandSeiAmsterdamTimeare constants in the binary, andtypes.EthereumRules(blockTime)derives fork rules from go-ethereum rather than duplicating them. CheckTx and the ante handler, plus evm-only admission, reject transactions over the EIP-7825 gas cap and initcode over the new limit, so nothing admitted pre-fork lands in a block that refuses it. Under EIP-8246 a self-destructed account keeps its balance, and the Sei address association is no longer deleted on SELFDESTRUCT, so that balance stays reachable.This is consensus-breaking at the upgrade height and adds
osaka_timeandsei_amsterdam_timeto the ChainConfig proto. Review most closely the StateDB self-destruct paths inx/evm/stateand its giga twin, and the updated tests that previously pinned burns, log indexes and the 24 KiB limit. It is tested separately from #4505 so it can be dropped from v6.9 without affecting the binary upgrade. Validated with the x/evm, evmrpc, app, giga, precompiles and evmonlyapp suites, including new behavior tests for 7708, 7939, 8024, 7954 and the gas cap.