ethereum / devp2p

Ethereum peer-to-peer networking specifications
990 stars 275 forks source link

Inconsistency among different clients on when to use a specific diconnect reason #221

Open smartprogrammer93 opened 1 year ago

smartprogrammer93 commented 1 year ago

As an example to this, when Geth disconnects a peer with a different network id with diconnection reason 0x10 (Other), whereas Nethermind disconnects a peer with a different network id with disconnection reason 0x03 (Useless Peer).

Because of this we are not able to know if the reason is NetworkId,or forkId for example. I think we need to relock at the disconnection reasons and work on a list that covers all cases.

if changing or adding to these messages is not an option or adding to then maybe we can come up with way for clients to send a details message explaining the reason for disconnection

fjl commented 1 year ago

We can definitely clarify the situations in which those reasons should be returned. If you feel like certain reasons should be there, just send a pull request to update the spec in rlpx.md. This kind of change does not require a version update as long as we don't break backwards-compatibility too much.