Score EnvelopePeerFailure correctly#9528
Open
0u-Y wants to merge 2 commits into
Open
Conversation
pawanjay176
requested changes
Jul 3, 2026
| debug!(?batch_id, ?msg, "Envelope peer failure"); | ||
| let action = PeerAction::LowToleranceError; | ||
| debug!(?batch_id, msg, score_adjustment = %action, "Envelope peer failure"); | ||
| network.report_peer(*peer_id, action, "envelope_peer_failure"); |
Member
There was a problem hiding this comment.
you are reporting the wrong peer here. This is the peer that completed the batch, not the envelope peer. We should probably add the peer_id of the peer to EnvelopePeerFailure variant and penalize that peer instead.
| debug!(?batch_id, msg, "Envelope peer failure"); | ||
| let action = PeerAction::LowToleranceError; | ||
| debug!(?batch_id, msg, score_adjustment = %action, "Envelope peer failure"); | ||
| network.report_peer(*peer_id, action, "envelope_peer_failure"); |
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.
Issue Addressed
Closes #9525
Proposed Changes
EnvelopePeerFailurewas added in #9362 but only logged, without reporting the peer. Since the envelope is requested from the same peer as the block, the failure is directly attributable to that peer.This reports the peer via
report_peerin both the range sync (chain.rs) and backfill sync (backfill_sync/mod.rs) paths. The error wraps envelope/block consistency violations (SlotMismatch,BuilderIndexMismatch,BlockHashMismatch), all of whichEnvelopeError::penalize_peer()already classifies as peer faults, soPeerAction::LowToleranceErroris used, consistent with how clearly attributable faults are scored elsewhere inchain.rs.