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

bug(l1): connection attempt on already connected peer due to revalidation #1684

Open
fmoletta opened this issue Jan 10, 2025 · 0 comments
Open
Assignees
Labels
bug Something isn't working L1 network Issues related to network communication

Comments

@fmoletta
Copy link
Contributor

During peer revalidation we ping the least recently pinged peers and expect them to reply with a pong message. When a peer replies with pong we also try to initiate a connection with it. If a peer we are already connected to were to fall under this revalidation then we would attempt to initiate a second connection with the peer to which the peer would reply to by disconnecting from us.
Here are some logs to illustrate the problem:

025-01-09T19:24:05.888572Z  INFO ethrex_net::kademlia: Snap Peers: 2 / Active Peers 2 / Total Peers: 101
2025-01-09T19:24:05.888674Z  INFO ethrex_net::kademlia: Active Peers ID: 0xa343…5072, 0xac90…5e2b
2025-01-09T19:24:05.888748Z  INFO ethrex_net::sync: Requesting Block Headers from 0xde8f…79e7
2025-01-09T19:24:05.889382Z  INFO ethrex_net: Running peer revalidation
2025-01-09T19:24:05.891256Z  INFO ethrex_net: Pinging peer 0xa343…5072 to re-validate!
2025-01-09T19:24:05.892743Z  INFO ethrex_net: Pinging peer 0x0010…e3e7 to re-validate!
2025-01-09T19:24:05.894219Z  INFO ethrex_net: Pinging peer 0x743d…7122 to re-validate!
2025-01-09T19:24:05.894262Z  INFO ethrex_net: Peer revalidation finished
2025-01-09T19:24:05.926046Z  INFO ethrex_net: Peer 0xa343…5072 answered ping with pong
2025-01-09T19:24:05.929520Z  INFO ethrex_net: Peer 0x743d…7122 answered ping with pong
2025-01-09T19:24:05.958563Z  INFO ethrex_net: Starting Peer as Initiator
2025-01-09T19:24:05.970228Z  INFO ethrex_net: Starting Peer as Initiator
2025-01-09T19:24:06.006510Z ERROR ethrex_net::rlpx::connection: Handshake failed: (Peer disconnected due to: Already connected), discarding peer 0xa343…5072

We should read the spec in order to handle this case accordingly

@fmoletta fmoletta added bug Something isn't working L1 labels Jan 10, 2025
@mpaulucci mpaulucci added the network Issues related to network communication label Jan 10, 2025
@mpaulucci mpaulucci added this to the [L1] 4 - P2P Network milestone Jan 10, 2025
@Arkenan Arkenan self-assigned this Jan 10, 2025
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
bug Something isn't working L1 network Issues related to network communication
Projects
Status: No status
Development

No branches or pull requests

3 participants