Generalizing feature negotiation when new p2p connections are setup



Summary:

The proposal is to replace VERACK with HANDSHAKEACK after feature negotiation in Protocol >= 70016. This change should make it clear that more than just the version is being acked. The sequencing of messages has minimal impact, but it is suggested that verack come before feature negotiation to divorce the idea that protocol number and feature support are tied. Once this change is made, Verack can be replaced with HANDSHAKENACK or HANDSHAKEACK to signal success or failure to agree on a connection. AJ suggests using a FEATURE wrapper for all messages during this period, which would allow for a semantic for ACKing that a feature is enabled. This would clarify whether a node ignored a feature because it's unknown or disabled. It is proposed that a message called SYNC be added, indicating the end of a list of features and a request to send ACKs or NACKs back. This allows for multi-round negotiation where the set of features offered may be expanded based on the presence of other features. This multi-round negotiation makes it an actual negotiation rather than a pure announcement system. Although it may not be used much in the near term, it makes sense to define it correctly now and build for the future.


Updated on: 2023-06-14T15:04:17.841190+00:00