Skip to content

fix(tests): EIP-6780, EIP-7702, fork inheritance, chain_id - #44

Merged
QEDK merged 4 commits into
forks/monad_ninefrom
fix/monad-fill-validation
Aug 19, 2026
Merged

fix(tests): EIP-6780, EIP-7702, fork inheritance, chain_id#44
QEDK merged 4 commits into
forks/monad_ninefrom
fix/monad-fill-validation

Conversation

@pdobacz

@pdobacz pdobacz commented Aug 19, 2026

Copy link
Copy Markdown
Collaborator

Some fixes from upstream #42 missed initially, 4 independent commits with respective desciptions

Greptile Summary

The PR aligns Monad transaction validation with explicit chain-ID extraction, fixes multiple-fork EIP inheritance, and adjusts EIP-6780/EIP-7702 tests.

  • Unions enabled EIPs from every direct non-EIP fork base.
  • Adds explicit chain-ID mismatch errors and derives legacy signing hashes from the transaction’s encoded chain ID across Monad forks.
  • Makes self-destruct test gas fork-aware and raises a set-code test transaction’s fee cap.

Confidence Score: 4/5

The oversized legacy chain-ID conversion should be fixed before merging because it can abort transition processing instead of rejecting the transaction normally.

The new extraction path accepts a U256 transaction field but narrows the derived chain ID to U64 without mapping overflow into the transaction-validation exception hierarchy.

Files Needing Attention: src/ethereum/forks/monad_eight/transactions.py, src/ethereum/forks/monad_next/transactions.py, src/ethereum/forks/monad_nine/transactions.py, src/ethereum/forks/monad_ten/transactions.py

Important Files Changed

Filename Overview
packages/testing/src/execution_testing/forks/base_fork.py Extends enabled-EIP inheritance to all direct non-EIP bases without sharing mutable subclass state.
src/ethereum/forks/monad_eight/transactions.py Adds chain-ID extraction and sender recovery changes, but oversized legacy chain IDs can escape as ValueError.
src/ethereum/forks/monad_eight/fork.py Validates the extracted transaction chain ID before sender recovery.
src/ethereum/forks/monad_next/transactions.py Mirrors the chain-ID extraction path and its oversized-value failure.
src/ethereum/forks/monad_nine/transactions.py Mirrors the chain-ID extraction path and its oversized-value failure.
src/ethereum/forks/monad_ten/transactions.py Mirrors the chain-ID extraction path and its oversized-value failure.
tests/cancun/eip6780_selfdestruct/test_dynamic_create2_selfdestruct_collision.py Replaces a fork-specific gas branch with the shared fork_extra_gas adjustment.
tests/prague/eip7702_set_code_tx/test_set_code_txs_2.py Supplies a higher fee cap for a transaction following an artificially full block.

Fix all with Greploop Fix All in Claude Code

Prompt To Fix All With AI
### Issue 1
src/ethereum/forks/monad_eight/transactions.py:641
**Oversized chain ID escapes validation**

When a legacy EIP-155 transaction encodes a chain ID greater than `2^64-1`, this `U64` conversion raises `ValueError` instead of an `InvalidTransaction` exception, causing transition tooling to abort rather than record the transaction as rejected. The identical conversion also affects the Monad Next, Nine, and Ten implementations.

---

For each issue above, determine whether it is valid and should be fixed. If so, fix it directly.

Reviews (1): Last reviewed commit: "fix(monad): reject transactions carrying..." | Re-trigger Greptile

Greptile also left 1 inline comment on this PR.

The monad access and storage repricing overran the hardcoded 100k, so the CREATE2 deployments ran out of gas and the scenarios degraded silently.

Co-Authored-By: Claude <claude-opus-5>
Monad counts the gas limit towards the block gas used, so the automatic gas limits fill block 1 and raise the base fee past the default fee cap.

Co-Authored-By: Claude <claude-opus-5>
MONAD_NINE reported only Prague's EIPs, so the EIP-7883 tests priced modexp with the pre-Osaka formula the spec no longer charges.

Co-Authored-By: Claude <claude-opus-5>
Port the upstream chain identifier check, which the monad forks never had: typed transactions went unvalidated and legacy ones failed as a bad signature.

Co-Authored-By: Claude <claude-opus-5>
@pdobacz
pdobacz requested review from QEDK and mijovic as code owners August 19, 2026 12:54
@pdobacz pdobacz changed the title f(tests): EIP-6780, EIP-7702, fork inheritance, chain_id fix(tests): EIP-6780, EIP-7702, fork inheritance, chain_id Aug 19, 2026
Comment thread src/ethereum/forks/monad_eight/transactions.py

@QEDK QEDK left a comment

Copy link
Copy Markdown
Member

Choose a reason for hiding this comment

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

LGTM.

@QEDK
QEDK merged commit cdeeacb into forks/monad_nine Aug 19, 2026
5 checks passed
@QEDK
QEDK deleted the fix/monad-fill-validation branch August 19, 2026 16:34
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