MerosCrypto / Meros

An instant and feeless cryptocurrency for the future, secured by the Merit Caching Consensus Mechanism.
https://meroscrypto.io
Other
82 stars 19 forks source link

VarInt flag for whether or not a node is a server is poor design. #270

Closed kayabaNerve closed 3 years ago

kayabaNerve commented 3 years ago

Any node, which they do by default, can claim to be a server. If they claim to be one, Meros will send it around when asked for peers. That said, this doesn't handle cases when it isn't (port isn't open) OR when it is, yet routing isn't symmetric (so the IP they appear to have isn't an IP that can be used to reach them).

This flag should be removed. When accepting a new connection, nodes should try to connect to the other to check if they do have a server socket open or not, and if they do, note it.

Protocol label attached because the Handshake protocol documentation does detail this bit.