You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
{{ message }}
Repository navigation
Penalize peers whose fetched data column sidecars fail the chain checks #815
The problem. A DataColumnsByRoot or DataColumnsByRange answer goes through column_checks::check_and_forward (crates/net/p2p/src/beacon/column_checks.rs:322), which takes no PeerId. Both response handlers know the peer and drop it at the call:
handle_data_column_sidecars_range_response (crates/net/p2p/src/req_resp/handlers.rs:2466, call at :2505);
handle_data_column_sidecars_response (handlers.rs:2530, call at :2567).
A fetched sidecar can be refused on KZG proofs, inclusion proof, header signature, proposer or shape. Such a sidecar is counted in lean_data_columns_rejected_total and nothing else. The peer that served it is not scored, disconnected or deprioritized. Column lookups pick peers at random on retry, so a peer serving forged columns stays as likely to be asked again as any other.
The cost today. Each forged column costs the node CPU. #754 verifies a block's columns in KZG sub-batches of at most 16 and re-checks a failed batch column by column. One forged column per sub-batch then costs about 64 ms of CPU per 16 columns at 9 blobs, against about 51 ms for checking them one at a time as main did. Both figures are computed from measured single-thread batch timings. That is bounded, but nothing stops it repeating.
Why it is out of #754's scope. The gap predates the PR: main's per-sidecar checks did not penalize the sender either. #754 changes how the checks are paid for, not what happens to the source.
What a fix would look like.
Carry the source of a check_and_forward call into the group's verdicts: a peer for req/resp answers, and gossip, parked replay or this node's own for the rest.
On a Reject outcome from a peer's answer (not an Ignore, and not a parked replay, whose original sender is long gone), report that peer. That could mean a disconnect, or the same suspicion and backoff range sync applies to peers that serve bad data, so it is not asked again for a while.
A test can feed a forged column through a fake by-root answer and assert the peer is reported.
Related.#803 (open) holds a refused sidecar against its sender for the rest of that one by-root lookup, so the lookup stops asking that peer. It does not score the peer or carry over to later lookups.
Activity