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
When a peer is initiating a connection with us (RlpxAgent handleIncomingConnection() there is a very good chance that they have gone through the bonding process in the discovery layer. When filter on ForkId is enabled there is a good chance that we have received the ForkId from that peer. That ForkId should be used to check whether that peer is on the same chain and whether we want to connect to it
Alternatively we could try to find the peer in the PeerTable before we are doing the Handshake. The Handshake for inbound connections is started in NettyConnectionInitializer, in the method inboundChannelInitializer()
The problem with that is that we do not know the peer id at that point, only the IP address. We could search the PeerTable using the IP address, but there could potentially be multiple nodes using the same IP address.
The benefit of doing that would be that we potentially don't do a handshake with a peer on a different chain. Handshake uses ECIES, which is expensive.
The text was updated successfully, but these errors were encountered:
Description
When a peer is initiating a connection with us (RlpxAgent handleIncomingConnection() there is a very good chance that they have gone through the bonding process in the discovery layer. When filter on ForkId is enabled there is a good chance that we have received the ForkId from that peer. That ForkId should be used to check whether that peer is on the same chain and whether we want to connect to it
This task is related to #5272
Alternatively we could try to find the peer in the PeerTable before we are doing the Handshake. The Handshake for inbound connections is started in NettyConnectionInitializer, in the method inboundChannelInitializer()
The problem with that is that we do not know the peer id at that point, only the IP address. We could search the PeerTable using the IP address, but there could potentially be multiple nodes using the same IP address.
The benefit of doing that would be that we potentially don't do a handshake with a peer on a different chain. Handshake uses ECIES, which is expensive.
The text was updated successfully, but these errors were encountered: