bitcoin-dev

BIP151 protocol incompatibility

BIP151 protocol incompatibility

Original Postby Jonas Schnelli

Posted on: February 14, 2017 20:58 UTC

The conversation is discussing the implementation of BIP151, which improves security in communication between Bitcoin nodes by encrypting messages.

The issue raised is that it's not backward compatible, meaning compatibility checks may fail with older versions. However, the BIP is still backward compatible as all SPV clients and full node implementations would still work if BIP151 has been implemented. Encryption negotiation must be done before the version handshake for security, and the requesting peer needs to initiate encryption. If the connecting peer does not request encryption, the responding peer will not enforce or ask for encryption.There is a debate about the interpretation of the terms "requesting" and "responding" peers, but it's clear from the BIP that the request for encryption should come before any other message. Allowing invalid messages in a protocol can lead to protocol incompatibility and encourages DOS attacks. The current flexibility exists because we do not drop unknown messages, but this could be up to the implementation. The purpose of version negotiation is to identify invalid messages, and anything that doesn't match the agreed version is dropped.