Contains 3 small improvements to BIP324:
- Since (in the V1 protocol) message type strings must be followed by only 0 bytes after the first 0, the first 16 bytes of an incoming V1 connection are predictable (network magic + “version\x00\x00\x00\x00\x00”). The current BIP text states to only compare the first 12 bytes instead of 16. This is in theory a semantics change, but wouldn’t be observable except with negligible probability (v2 nodes that use 12 vs 16 can communicate with each other, and each can communicate with v1). However, there are possible future extensions that could make this observable (specifically, see footnote 19), so it seems worthwhile to still switch to 16.
- Related to the previous point, it is also possible to detect incoming v1 connections of the wrong network: if the network magic does not match, but the version message type string after it does. Without this, an incoming connection from a v1 peer will get sent key + garbage, which in turn will almost certainly cause them to disconnect immediately, and changing this should not make much of a difference, but it allows for faster disconnect in this situation.
- Drop the BIP330 message types from the short encodings list in the BIP. It feels like it shouldn’t be BIP324’s goal to predict future protocol improvements.