Generalizing feature negotiation when new p2p connections are setup



Summary:

Suhas Daftuar, a Bitcoin developer has proposed a new BIP (Bitcoin Improvement Proposal) aimed at codifying the idea that Bitcoin network clients should ignore unknown messages received before a VERACK. In February 2020, he had proposed a feature negotiation to take place prior to the VERACK message being received by each side in his proposal for WTXID-based transaction relay, now known as BIP 339. Since then, the implementation of BIP 339 has been merged into Bitcoin Core, although it has not yet been released. Daftuar believes that software upgrading past protocol version 70016 was already planning to either implement BIP 339 or ignore the wtxidrelay message proposed in it. He suggests that when proposing future protocol upgrades that would benefit from feature negotiation at the time of connection, it would be nice to use the same method as proposed in BIP 339, without even needing to bump the protocol version. Therefore, having an understanding that this is the standard of how other network clients operate would be helpful. However, the requirement to ignore unknown (invalid) messages is not only a protocol-breaking change but poor protocol design. The purpose of version negotiation is to determine the set of valid messages. Changes to version negotiation itself are very problematic. The only limitation presented by versioning is that the system is sequential. Clients that do not wish to implement them are faced with a problem when wanting to support later features, which can be resolved by making such features optional at the new protocol level. This allows each client to limit its communication to the negotiated protocol and allows ignoring of known but unsupported/disabled features.


Updated on: 2023-06-14T15:05:35.635079+00:00