-
Notifications
You must be signed in to change notification settings - Fork 99
Description
What is wrong
Up until now we've done direct coordinated upgrades to the protocol. I believe the only protocol upgrade so far has been Addition of Ping Extensions
This approach is fragile and only really viable in the current mode of network operation where "we" are running the vast majority of the network.
In the near term future, the network will transition to a more decentralized structure with operators being distributed and us no longer having clear and clean communication channels for coordinated upgrades.
How can this be fixed.
During the summit in Berlin we came to loose agreement on the following.
- We will start versioning our wire protocol.
- Upgrades will happen in a rolling manner.
For versioning, we will use whole number versions. We will call the current version of the protocol version 2
. Any breaking change to the networking protocol or otherwise, change that is deemed necessary for versioning to be used will bump this version by incrementing it.
Signaling of supported versions will be done via a field in the ENR. The key for this field will be the ascii characters "pv"
. The equivalent bytes in hex is 0x7076
. The value of this field will be a sorted SSZ encoded list with the serialization List[uint8, limit=16]
.
Portal clients can use the base discovery v5 protocol to exchange ENR records, after which, they should compare their own supported versions with the supported versions of this potential peer. Communication between two peers will use the highest mutually supported protocol version. In the event that two peers have no overlap between their supported versions, the peer should not be communicated with and should not be placed in sub-protocol routing tables.
Wire protocol versions are "global" and apply to all portal sub protocols.