version messages are empty, but before releasing in order to anticipate protocol
upgrades, we should include the protocol version. This is for the moment inside
but should be moved to
version since it allows immediately dropping the connection if the
protocol version is incorrect (and indeed is the main purpose of the version message).
Additionally it should include further info which makes debugging connections and negotiation easier.
|version||Identifies protocol version being used by the node|
|nonce||Random nonce, randomly generated everytime a version packet is sent. This nonce is used to detect connections to self.|
|connect_recv_addr||Network address of the node receiving this message (before resolving)|
|resolv_recv_addr||Network address of the node receiving this message (after resolving)|
|(services, version)||List of features to be enabled for this connection|
resolv_recv_addr is optional depending on some transports which may not have such an address.
(services, version) field can be used to enable certain features in protocols, or even to upgrade protocols to new versions.
When protocols are first attached, they can add their own data to this field which will be communicated in the subsequent version exchange.
Any further negotiation needed can be done using protocol specific messages afterwards.