test: load the frame transaction fixtures by mapping their fork name - #12854
test: load the frame transaction fixtures by mapping their fork name#12854Marchhill wants to merge 4 commits into
Conversation
The EIP-8141 fixture suites declare their network as Bogota, which SpecNameParser did not map, so every file failed to load. The failure surfaced as an unrelated Hash256 conversion error because ConvertToBlockchainTests wrapped both deserialization and conversion in the HalfBlockchainTestJson shape fallback: the unmapped fork name threw during conversion, and the retry against the trimmed shape then failed on its differently typed postState. Narrow the fallback to deserialization and name the fork in the exception.
|
Claude finished @Marchhill's task in 5m 19s —— View job Review: PR #12854
VerdictThe core change is right, and the diagnosis in the commit message checks out. I traced the masking path: I also checked the narrowing doesn't lose a load-bearing path. For the fallback to have been useful across conversion, the standard deserialize would have to succeed and the half-shape deserialize succeed on the same JSON — mutually exclusive, since a dict One Medium, on test strength rather than production behaviour. Nothing Critical or High. No security or performance surface — all three files are test-path or a cold parser behind a
Two things about scope, for the reviewerNeither is a defect — both follow from decisions the PR body already states — but they change what "loads" means here. No fixture class is registered. The description contradicts itself. "all 159 blockchain cases load and execute" sits against Remarks' "96 of the 159 cases are still rejected … before they execute." The Remarks version is the accurate one; the summary line reads as a stronger claim than the branch supports. What I could not verifyBuild and test execution were blocked — Blocking on the Medium only in the sense that the new test doesn't yet guard what its name promises — a one-line change to |
…o claude/eip8141-fixture-suite
Bind both deserialization failures so a fixture matching neither shape reports both causes, and include the substituted fork name in the parser error.
|
Claude finished @Marchhill's task in 2m 59s —— View job Review: PR #12854 (follow-up round)
VerdictAll three points from the last round are addressed, and I re-verified each rather than taking the replies at face value:
I also re-checked the narrowing for a lost path, since the follow-up commit restructured it: On the declined drift test: the reasoning holds up. Nothing Critical, High, or Medium. One Low, on the shape this round left behind.
On the missing test: the PR body's claim — "A fixture matching neither shape now surfaces both causes instead of discarding the standard-shape one" — is the one assertion in this PR with no test behind it. What I could not verifyBuild and test execution are still blocked in this environment — Not blocking. The two scope notes from the last round still stand and are unchanged by this commit: no fixture class is registered in |
Both overloads carried the same shape-fallback block verbatim; the string overload has a single caller, so it can transcode and forward instead.
Changes
BogotainSpecNameParser, so the EIP-8141 fixture suites — which declare that network — load instead of failing every file.HalfBlockchainTestJsonshape fallback inConvertToBlockchainTeststo deserialization only. It previously wrapped conversion too, so an unmapped fork name was reported as an unrelatedHash256conversion error against the trimmed shape rather than as itself. A fixture matching neither shape now surfaces both causes instead of discarding the standard-shape one.NotSupportedExceptioninstead of throwing it bare.Before this change the whole suite failed to load; after it, all 159 blockchain cases load and execute.
Fixtures come from the
tests-frames-devnet@v0.0.0release (fixtures_frames-devnet.tar.gz). Note that EIP-8141 merged to theeips/amsterdam/eip-8141branch rather than master, and the pyspecDEFAULT_ARCHIVE_VERSIONpin contains none of these tests, so wiring this into CI needs a second archive pin.Types of changes
What types of changes does your code introduce?
Testing
Requires testing
If yes, did you write tests?
Notes on testing
SpecNameParserTestscovers both the mapping and the exception message. Both assertions were revert-checked: removing the mapping and restoring the bare throw fails them.Documentation
Requires documentation update
Requires explanation in Release Notes
Remarks
The state-test path does not gate anything — do not wire it into CI
TransactionJsonhas noframes/signaturesfields, so a frame transaction cannot be represented in a state-test fixture. The 40 EIP-8141 state-test files therefore load to zero cases, and the runner exits 0. Anything that runs that path today reports a pass while asserting nothing. Only the blockchain-test path, which decodes block RLP and so exercises the real frame decoder, is meaningful. Supporting state tests means adding the frame fields to the loader; until then that path should be treated as unwired, not as green.Loading is only half the story
This branch composes
Bogotaon Osaka, whereas the fixtures compose it on Amsterdam, so 96 of the 159 cases are still rejected atBlockLevelAccessListHashNotEnabledbefore they execute. That fork-composition question is deliberately left open here.Frame targets under EIP-7702 delegation
With
Bogotacomposed on Amsterdam for measurement, the delegated-target cases fail on every branch tried, including one carrying devnet-8 gas and the frame entry charge.ExecuteFrameresolves the target's code withwhich follows the delegation for code but discards the delegation address, so the delegation target's access cost is never charged. Affects
test_delegated_target_entry_charge(cold and warm),test_delegated_to_precompile_targetandtest_verify_frame_delegated_to_precompile_target.