Skip to content

fix(tests,fw): Fill reserve-bal. related coverage gaps, fix impl - #67

Merged
pdobacz merged 7 commits into
forks/monad_ninefrom
fix/value-above-balance
Oct 20, 2026
Merged

pdobacz merged 7 commits into
forks/monad_ninefrom
fix/value-above-balance

Conversation

@pdobacz

@pdobacz pdobacz commented Oct 19, 2026 •

Copy link
Copy Markdown
Collaborator

Related to:

  • handling on the boundary of gas fees solvency
  • overall balance solvency rules
  • 7702 authorizations handling

Each addition to tests accompanied by fixes to the spec implementation in a separate commit.

NOTE to review: the changes under src/ethereum/forks... are 4x the same thing for 4 forks (eight->eleven)

Based on top of #53, merged that one first

RetriggerView in GreptileConfidence Score: 5/5

The PR appears safe to merge; no actionable issues were found.

Summary

This PR updates Monad Eight through Eleven to check whether a sender can pay the effective gas fee, then fail execution if the remaining balance cannot cover the value sent.

  • Transactions now check gas costs before checking sent value.
  • Any recovered authorization signer now counts in the reserve window.

Diagram

%%{init: {'theme': 'neutral'}}%%
flowchart TD
    A[Check transaction] --> B{Balance covers effective gas fees?}
    B -- No --> C[Reject transaction]
    B -- Yes --> D[Charge fees and advance sender nonce]
    D --> E[Record recovered authorization signers]
    E --> F{Remaining balance covers value?}
    F -- No --> G[Return failed receipt without running code]
    F -- Yes --> H[Transfer value and run code]
    H --> I[Check reserve balance and settle transaction]
Loading

Reviews (2) · Last reviewed commit: "fix(forks): record every recovered autho..." · Reviewed by Greptile

@pdobacz
pdobacz requested review from QEDK and mijovic as code owners October 19, 2026 14:55
Base automatically changed from eips/monad_next/eip-7708+7843+7981+7997+8024+8246 to forks/monad_nine October 20, 2026 10:16
The short cases fail until the spec checks only the gas fees at inclusion.

Co-Authored-By: Claude <claude-fable-5-1>
…lance

The client checks only the gas fees at inclusion and fails the top-level frame on the value.

Co-Authored-By: Claude <claude-fable-5-1>
The fee-cap cases fail until the inclusion check uses the effective gas price.

Co-Authored-By: Claude <claude-fable-5-1>
The client only requires the balance to cover the gas fees it charges, not the max fee per gas.

Co-Authored-By: Claude <claude-fable-5-1>
The nonce and missing-contract checks also pass when the create is skipped instead of halting the frame.

Co-Authored-By: Claude <claude-fable-5-1>
The in-window cases fail until the spec records every recovered authority.

Co-Authored-By: Claude <claude-fable-5-1>
…window

The clients mark an authority before any validity check, so a skipped one counts.

Co-Authored-By: Claude <claude-fable-5-1>
@pdobacz
pdobacz force-pushed the fix/value-above-balance branch from d5506d2 to 1b93e1d Compare October 20, 2026 10:21
@pdobacz
pdobacz merged commit 11cd781 into forks/monad_nine Oct 20, 2026
5 checks passed
@pdobacz
pdobacz deleted the fix/value-above-balance branch October 20, 2026 10:28
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