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
feat: limit and randomize peer discovery to 25 peers (#640)
Implements peer limiting and randomization to improve network peer distribution:
- Limits peer responses to 25 peers (configurable via MAX_PEERS constant)
- Randomizes peer selection on each load/discovery to avoid always returning the same peers
- Updates PeerSnapshotServiceImpl to shuffle and limit peers from snapshot files
- Updates PeerDiscoveryManager to shuffle and limit discovered peers from cardano-node
- Maintains deterministic in-memory cache between refreshes
- Updates tests to reflect new peer limiting and randomization behavior
This prevents excessive peer lists and naturally distributes connections across the network
without needing to track peer performance metrics.
🤖 Generated with [Claude Code](https://claude.com/claude-code)
Co-authored-by: Mateusz Czeladka <mateusz.czeladka@cardanofoundation.org>
Co-authored-by: Claude <noreply@anthropic.com>
Copy file name to clipboardExpand all lines: yaci-indexer/src/test/java/org/cardanofoundation/rosetta/yaciindexer/service/PeerDiscoveryManagerTest.java
0 commit comments