fix(l1): flush frame receipts with the storage codec #7082
All Vouch review confidence checks passed
Residual risk 0.24 = Change Risk (0.44) × (1 − Review Confidence (0.45)).
Review depth and reviewer attention state are adequate.
Model 1 · Change Risk (XGBoost)
Score: 0.44 · 229 lines diff across 2 files
Model 2 · Review Depth (DistilBERT)
Depth Score: 0.02 · 1 substantive comment(s)
Model 3 · Review Timing & Attention
Session adequacy: 100% · Reviewer familiarity: 35%
Bedrock Claude 3 · Risk Narration
(disconnected)
Groq Risk Narration
AWS Bedrock is currently disconnected. Generate high-confidence PR triage narration on-demand using Groq.
Model 1 · Change Risk Attribution
SHAP Weights
Shallow Review Depth
shallow_review_depth
0.344
Diff Size
diff_size
0.325
Real PR Conversation Timeline
1 comments
"Review active on #7082"
general
weight: 0.35
ElFantasma
Motivation
The block-data buffer flush writes receipts with the consensus codec (
encode_to_vec), whileadd_receipt,add_receiptsand the read path (get_receipt_by_block_hash) all use the storage codec. For non-frame receipts the two encodings coincide, so the mismatch never showed.An EIP-8141 frame receipt is different: its consensus layout omits the top-level
succeededand leads withcumulative_gas_used.decode_storagetherefore reads a gas value where it expects a bool and fails withMalformedBoolean. The receipt is served correctly from the buffer and becomes permanently unreadable the moment the block is flushed.Description
One line: the flush path now uses
encode_storage(), matching every other writer and the reader.How was it found
On a Nethermind + ethrex devnet. Both clients agreed on block 69 byte for byte — same block hash, state root, receipts root and block access list hash — and both served
eth_getTransactionByHashfor the frame transaction in it, buteth_getTransactionReceiptreturnednullon ethrex.eth_getBlockReceiptssurfaced the real cause:Tests
flushed_frame_receipt_survives_the_storage_codecstores a frame receipt throughstore_block_updates, forces a flush so the buffer can no longer answer, and reads it back. Verified in both directions: it fails withMalformedBooleanon the previous line and passes with the fix.The fix is forward-only. Frame receipts already written by the old path stay on disk in the consensus encoding and keep failing to decode, so
eth_getTransactionReceiptstill returns null for those blocks until the node resyncs. Non-frame receipts encode identically under both codecs, so nothing before Hegota is affected.