Repository navigation
fix(consensus): do not cache rejections caused by unhashed payload fields - #219
Merged
Merged
Conversation
…elds NextL1MsgIndex is excluded from the header hash and the withdraw trie root travels in the engine payload, so neither is covered by the block hash or the sequencer signature. A peer can relay a validly signed block with either field corrupted; reth rejected it and recorded the hash in its invalid-header cache, and since that hash also identifies the honest block, the follower then refused the honest block as "links to previously rejected block" until the entry was hit 128 times or the node restarted. Neither re-submitting the honest block nor deriving it from L1 could recover; geth re-derives the field and accepts the honest block. Report both mismatches as typed MorphConsensusError variants and classify them as transient in MorphConsensus::is_transient_error, so reth still rejects the corrupted copy but leaves the hash out of the cache. Messages are unchanged, so the node's retry classifier keeps matching them. Claude-Session: https://claude.ai/code/session_013oN3EyKzA7m5ykYdT5g6WL
|
Warning Review limit reachedYou've used all free OSS reviews for now. Wait for the free limit to reset to keep reviewing this public repository. Next included review available in 46 minutes. View limit details
Warning Billing warning: we have not been able to collect payment for this subscription for more than 72 hours. Please update the payment method or pay any pending invoices in Billing to avoid service interruption. Thanks for using CodeRabbit! It's free for OSS, and your support helps us grow. If you like it, consider giving us a shout-out. |
dylanCai9
approved these changes
Nov 10, 2026
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
Summary
NextL1MsgIndexis excluded from the header hash (headerHashingin morph-geth,hash_slowhere) and the withdraw trie root travels inExecutableL2Data, so neither is covered by the block hash or the sequencer signature: any peer can relay a validly signed block with either field corrupted.ConsensusErrorand recorded the block hash ininvalid_headers. That hash also identifies the honest block, so the follower afterwards refused the honest block aslinks to previously rejected blockwithout executing it, until the entry was hit 128 times or the node restarted. Re-submitting the honest block or rebuilding it from L1 (newSafeL2Block) hit the same cache. geth re-derives the field and accepts the honest block (measured in the audit: same input sequence, geth stops at N, reth at N−1).MorphConsensusErrorvariants (InvalidNextL1MessageIndex, newWithdrawTrieRootMismatch) and classify them as transient inMorphConsensus::is_transient_errorby downcastingConsensusError::Other, so reth still rejects the corrupted copy but keeps the hash out of the cache. Error messages are unchanged; the node'sretryableErrorclassifier still matchesinvalid block.NextL1MsgIndex.Tests
invalid_payload_recovery::corrupted_next_l1_msg_index_does_not_poison_the_honest_block(two nodes): the follower rejects the corrupted copy naming the field and then accepts the honest block with the same hash. With the previousis_transient_errorthis test fails withnewPayload returned INVALID: links to previously rejected block.MorphConsensusError::is_unhashed_field_errorclassification;is_transient_erroris true for both mismatches and false forTimestampIsInPastandInvalidL1MessageOrder.make lint,cargo test --doc --all,make test(909 passed),make test-e2e(129 passed).Notes
https://claude.ai/code/session_013oN3EyKzA7m5ykYdT5g6WL