Open daira opened 2 years ago
I would like to make sure I understand this:
"In Zcash’s approach, a given peer protocol version implies support for all features added up to that version — so the space of feature combinations only grows at most linearly. "
Each pair of nodes negotiates a network versioned protocol.
If the peers' versions aren't equal, the lower number is the protocol used (selected during peer protocol negotiation).
Each protocol version contains an increasing set of features. That is, each version is a superset (non-strict) of the preceding version.
Since the lower version is used all features of the lower version are available which are guaranteed to be a subset (non-strict) of the higher versions feature set. Since the feature set is fixed for a given pair there's no need to consider different possible sets of features for a P2P connection, there's 1 well-defined set. The set of the lower protocol-version.
Since ZIP155 addvr2
is a new P2P network feature, it implies a new protocol version.
Any node running a lower version of the protocol will not support that feature, and since the lower-version of the protocol is used for a specific connection, the higher protocol-version node in the pair will used the subset of features implied by the lower-version number (for the P2P connection, i.e. node-pair under consideration).
In other words, by using the protocol-versioning approach, the network guarantees that nodes do not attempt to use (new) unavailable features with (older) less featureful peers. addrv2
is precisely such a feature.
This implies a stateful relationship between nodes, i.e. nodes must remember each other, but that's true in bitcoin anyway since nodes...
This is necessary to support Tor v3 onion addresses. Tor v2 onion addresses are being deprecated according to this timeline.
Copied from the forum:
[...]