Peering - disconnect peers that have multiple discovery ports#7089
Peering - disconnect peers that have multiple discovery ports#7089pinges merged 11 commits intobesu-eth:mainfrom
Conversation
Signed-off-by: stefan.pingel@consensys.net <stefan.pingel@consensys.net>
Signed-off-by: stefan.pingel@consensys.net <stefan.pingel@consensys.net>
Signed-off-by: stefan.pingel@consensys.net <stefan.pingel@consensys.net>
Signed-off-by: stefan.pingel@consensys.net <stefan.pingel@consensys.net>
|
very cool find @pinges - are there more tests you wanted to add? |
|
11 holesky nodes - 10 of them get to 100% peers within 2h the 11th one eventually gets to 100% peers (although it does take ~7h) Current behaviour on holesky is > 90% of nodes get stuck at 0 peers indefinitely (require setting static peers to sync) See #6805 |
macfarla
left a comment
There was a problem hiding this comment.
needs a changelog entry
macfarla
left a comment
There was a problem hiding this comment.
just needs a changelog entry
| private final LHMWithMaxSize<String, Integer> ipAddressCheckMap = | ||
| new LHMWithMaxSize<>(DEFAULT_BUCKET_SIZE * N_BUCKETS); | ||
| private final CircularFifoQueue<String> invalidIPs = | ||
| new CircularFifoQueue<>(DEFAULT_BUCKET_SIZE * N_BUCKETS); |
There was a problem hiding this comment.
curious - why these specific collection types?
There was a problem hiding this comment.
CircularFifo is a simple queue with a maximum size.
LHMWithMaxSize is a private class, it is a LinkedHashMap that I have extended to have a maximum size.
Lukas complained about the name of the class and I will rename it :-)
Signed-off-by: Sally MacFarlane <macfarla.github@gmail.com>
| private final Map<Bytes, Integer> distanceCache; | ||
| private BloomFilter<Bytes> idBloom; | ||
| private int evictionCnt = 0; | ||
| private final LHMWithMaxSize<String, Integer> ipAddressCheckMap = |
There was a problem hiding this comment.
I think we should rename LHMWithMaxSize as LinkedHashMapWithMaxSize to be clearer.
Signed-off-by: stefan.pingel@consensys.net <stefan.pingel@consensys.net>
…me IP and TCP port with different discovery ports (besu-eth#7089) Find and remove peers from the peer table that share the same IP and TCP port with different discovery ports --------- Signed-off-by: stefan.pingel@consensys.net <stefan.pingel@consensys.net> Signed-off-by: Sally MacFarlane <macfarla.github@gmail.com> Co-authored-by: Sally MacFarlane <macfarla.github@gmail.com> Signed-off-by: Justin Florentine <justin+github@florentine.us>
…me IP and TCP port with different discovery ports (besu-eth#7089) Find and remove peers from the peer table that share the same IP and TCP port with different discovery ports --------- Signed-off-by: stefan.pingel@consensys.net <stefan.pingel@consensys.net> Signed-off-by: Sally MacFarlane <macfarla.github@gmail.com> Co-authored-by: Sally MacFarlane <macfarla.github@gmail.com>
…me IP and TCP port with different discovery ports (besu-eth#7089) Find and remove peers from the peer table that share the same IP and TCP port with different discovery ports --------- Signed-off-by: stefan.pingel@consensys.net <stefan.pingel@consensys.net> Signed-off-by: Sally MacFarlane <macfarla.github@gmail.com> Co-authored-by: Sally MacFarlane <macfarla.github@gmail.com> Signed-off-by: Justin Florentine <justin+github@florentine.us>




PR description
In discovery we seemed to see a lot of "misconfigured" nodes that share the same IP address and TCP port, but use different discovery ports. This PR checks for these nodes and removes them from the peer table.
Fixes #6805