lighthouse icon indicating copy to clipboard operation
lighthouse copied to clipboard

Add randomization in sync retry batch peer selection

Open dapplion opened this issue 1 year ago • 0 comments

Issue Addressed

When retrying a batch, peers are prioritized by:

  1. They have some failures
  2. Count of active requets
  3. Break tie with NodeID value

While the prioritization is okay, breaking ties by NodeID is not fair and prioritizes peers that just happen to have a peer ID if a smaller value or those that have farmed peer IDs with smaller values.

Proposed Changes

Add a random u32 before sorting batch retry peers

dapplion avatar May 22 '24 13:05 dapplion