fix: populate participating_peers to enable correct peer penalization#8526
fix: populate participating_peers to enable correct peer penalization#8526sashass1315 wants to merge 2 commits intosigp:unstablefrom
Conversation
|
Thanks for the PR, please rebase your changes on |
|
I think the concept of participating_peers in backfill sync doesn't make sense. If the hash chain is correct and the crypto passes validation that batch can be considered permanently ok. If backfill sync fails later for some reason, peers from previous batches don't need to be penalized. participating_peers existing in backfill sync feels like a copy-pasta from forward sync back in the day. |
I’ve removed participating_peers from BackFillSync and updated on_batch_process_result so that now only penalize the peer that provided the faulty batch (similar to range sync) |
Backfill intended to penalize only peers that actually participated in serving batches, but
participating_peerswas never populated. This meant no peers were penalized on terminal faulty failure. This change records the block peer on successful batch downloads in on_block_response() and records the peer on error in inject_error() after registering a failed download. This restores the intended behavior without altering APIs or broader flow.