lighthouse
lighthouse copied to clipboard
Add randomization in sync retry batch peer selection
Issue Addressed
When retrying a batch, peers are prioritized by:
- They have some failures
- Count of active requets
- 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