Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Consider removing P2P duplicate connection disconnect #1243

Open
heifner opened this issue Mar 7, 2025 · 0 comments
Open

Consider removing P2P duplicate connection disconnect #1243

heifner opened this issue Mar 7, 2025 · 0 comments
Labels

Comments

@heifner
Copy link
Member

heifner commented Mar 7, 2025

The net_plugin attempts to disconnect all but one of duplicate connections to a peer. The idea is that if peer A is configured to connect to peer B and peer B is configured to connect to peer A; each peer A and B will only have one connection to each other.

PeerA
p2p-peer-address = peerb:9876

PeerB
p2p-peer-address = peera:9876

PeerA <- connected -> PeerB
PeerB <- connected -> PeerA

The deduplication logic of net_plugin has never worked reliably. There are currently three different schemes that have been tried: proto_dup_goaway_resolution, proto_dup_node_id_goaway, and current scheme.

The current scheme still leaves duplicates in some race conditions. A simpler approach was recently attempted. See #1108. However, this approach had a race condition so that it would sometimes disconnect both connections; reverted in #1186. The issue is that the connection and handshake messages can be sent from each node at the same time. Both nodes can consider the other a duplicate at the same time and both disconnect.

In addition, EOSUSA has reported that the current de-duplication logic is causing continuous disconnect/reconnect from their proxy.

Image

With the addition of the new block nack feature of net_plugin, the benefit from removing duplicate connections is reduced. At this point, I wonder if we shouldn't just remove this feature as it seems to be causing more harm than good.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
Projects
Status: Todo
Development

No branches or pull requests

2 participants