Skip to content

alloy-op-evm,kona: cover SDM refund settlement and gas accounting - #22613

Open
nonsense wants to merge 2 commits into
developfrom
nonsense/sdm-fault-proof-mips-coverage
Open

alloy-op-evm,kona: cover SDM refund settlement and gas accounting#22613
nonsense wants to merge 2 commits into
developfrom
nonsense/sdm-fault-proof-mips-coverage

Conversation

@nonsense

@nonsense nonsense commented Aug 21, 2026

Copy link
Copy Markdown
Contributor

Summary

  • add a Kona executor test for a successful non-empty SDM PostExec payload
  • refund one gas unit from each of eight regular transactions and assert the resulting receipt, gas accounting, balance transfers, and block commitment changes
  • make operator_fee_charge return zero before Isthmus before accessing Isthmus-only L1 block fields, with unit-test coverage
  • apply SDM refunds after the EIP-7623 calldata floor by discounting both total gas spent and the stored floor gas
  • add an alloy-op-evm test that crosses above, at, and below the calldata floor while preserving the native EVM refund and keeping execution-result, block, and receipt gas accounting aligned

Why

The executor tests covered empty PostExec payloads and invalid non-empty payloads, but not successful settlement with non-zero refunds. Exercising that path with the existing pre-Isthmus fixture also exposed that operator-fee calculation could read missing Isthmus-only fields even though operator fees do not exist before Isthmus.

SDM refunds are applied after EVM execution, including after EIP-7623's calldata floor. When a refund lowered canonical gas below that floor, the generic execution-result view remained clamped to the original floor and diverged from canonical block and receipt gas accounting. Discounting the stored floor by the same post-execution refund preserves the intended ordering and keeps all gas views consistent.

Testing

  • cargo nextest run --release -p kona-executor
  • cargo nextest run --release -p op-revm test_operator_fee_charge_formulas
  • cargo nextest run -p alloy-op-evm
  • cargo clippy -p alloy-op-evm --all-targets --all-features -- -D warnings
  • cargo check -p alloy-op-evm --no-default-features

@nonsense
nonsense force-pushed the nonsense/sdm-fault-proof-mips-coverage branch 2 times, most recently from d6c166c to 73ddd09 Compare August 24, 2026 17:57
@nonsense nonsense changed the title sdm: prove premium blocks through Cannon MIPS kona: test non-zero SDM settlement Aug 24, 2026
@nonsense
nonsense marked this pull request as ready for review August 24, 2026 18:08
@nonsense
nonsense requested a review from a team as a code owner August 24, 2026 18:09
@nonsense
nonsense force-pushed the nonsense/sdm-fault-proof-mips-coverage branch from 73ddd09 to 53408c1 Compare August 24, 2026 18:29
@nonsense nonsense changed the title kona: test non-zero SDM settlement alloy-op-evm,kona: cover SDM refund settlement and gas accounting Aug 24, 2026
@einar-oplabs einar-oplabs self-assigned this Aug 24, 2026
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.

2 participants