← Back to Pull requests

fix(l1): flush frame receipts with the storage codec #7082

Open
unknown opened this pull request with 229 lines diff across 2 files
View on GitHub
unknown unknown commented on Aug 01, 2026 10:29 UTC
Author

Motivation

The block-data buffer flush writes receipts with the consensus codec (encode_to_vec), while add_receipt, add_receipts and 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 succeeded and leads with cumulative_gas_used. decode_storage therefore reads a gas value where it expects a bool and fails with MalformedBoolean. 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_getTransactionByHash for the frame transaction in it, but eth_getTransactionReceipt returned null on ethrex. eth_getBlockReceipts surfaced the real cause:

Internal Error: Error decoding field 'succeeded' of type bool: MalformedBoolean

Tests

flushed_frame_receipt_survives_the_storage_codec stores a frame receipt through store_block_updates, forces a flush so the buffer can no longer answer, and reads it back. Verified in both directions: it fails with MalformedBoolean on 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_getTransactionReceipt still returns null for those blocks until the node resyncs. Non-frame receipts encode identically under both codecs, so nothing before Hegota is affected.

Diff: 229 lines (+171 / -58) across 2 files Reviewer: ElFantasma Review duration: 112552m
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
0.44
Model 2 · Review Depth (DistilBERT)
Depth Score: 0.02 · 1 substantive comment(s)
0.02
Model 3 · Review Timing & Attention
Session adequacy: 100% · Reviewer familiarity: 35%
44%
Bedrock Claude 3 · Risk Narration
(disconnected)
Groq
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
Reviewers
Assignees
Unassigned
Labels
risk: low confidence: 44.7% reviewed
Vouch Risk Breakdown
AI-powered review risk analysis
Change Risk
Change Risk · Model 1 (XGBoost)
Predicted defect probability (0.00–1.00) based on diff churn, modified sensitive files, and author risk history.
Score: 44.0% (MEDIUM) · Higher = larger blast radius
44.0%
Review Confidence
Review Confidence · Models 2 & 3
Scrutiny score (0.00–1.00) combining DistilBERT semantic review depth with reviewer familiarity and session dwell time.
Score: 44.7% · Lower = rushed or shallow review
44.7%
Residual Risk
Residual Risk · Core Equation
Residual = Change × (1 − Confidence)
Unmitigated risk surviving review. ≥ 0.65 triggers an automated re-queue to protect production.
Score: 24.3% · Safe to merge
24.3%