fix(slasher): do not file data-withholding offenses while peerless - #25179
Closed
spalladino wants to merge 1 commit into
Closed
spalladino wants to merge 1 commit into
spalladino wants to merge 1 commit into
Conversation
The data-withholding watcher infers an offense from the absence of a checkpoint's txs in the local pool. That is only valid evidence if the node could have received those txs in the first place: a node whose p2p stack is down sees every checkpoint's txs as missing and accuses entire committees of withholding data. The watcher now checks p2p connectivity once per tick, and while p2p is enabled with zero connected peers it skips the slots that would otherwise be probed. The skip is permanent — those slots are marked as checked and never backfilled — because after peers return, txs from those checkpoints may already have been evicted from the pool as mined, so a late probe would still report them missing. An unknown must not become an offense. The gate is vacuous when p2p is disabled by configuration (sandbox and single-node setups report `enabled: false`), so behavior there is unchanged. The degraded-state warning is logged only on the transition into and out of the state, since the watcher ticks several times per slot. Part of A-1701.
This was referenced Aug 11, 2026
Contributor
Author
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.
The data-withholding watcher infers an offense from the absence of a
checkpoint's txs in the local pool. That is only valid evidence if the node
could have received those txs in the first place: a node whose p2p stack is
down sees every checkpoint's txs as missing and accuses entire committees of
withholding data.
The watcher now checks p2p connectivity once per tick, and while p2p is
enabled with zero connected peers it skips the slots that would otherwise be
probed. The skip is permanent — those slots are marked as checked and never
backfilled — because after peers return, txs from those checkpoints may
already have been evicted from the pool as mined, so a late probe would still
report them missing. An unknown must not become an offense.
The gate is vacuous when p2p is disabled by configuration (sandbox and
single-node setups report
enabled: false), so behavior there is unchanged.The degraded-state warning is logged only on the transition into and out of
the state, since the watcher ticks several times per slot.
Part of A-1701.
Part of a stacked-PR chain (bottom → top) hardening the node against running with a dead p2p stack; each PR targets the branch below it and the bottom targets
merge-train/spartan-v5:GET /statussendTxwhen the node has no peers to propagate the tx