Assign canonical names to most/all subprotocol versions?
Now that we have decided in prop346 that every subprotocol version denotes a feature flag, maybe we should assign mnemonic names to those flags for reference in the specs and the code?
For example, we might decide to give them names like:
Subprotocol version | Mnemonic |
---|---|
"HSIntro=5" | EST_INTRO_DOS_EXT |
"Relay=4" | NTOR_V3 |
"FlowCtrl=1" | AUTHENTICATED_SENDME |
"FlowCtrl=2" | XON_XOFF |
These mnemonic names would not appear on the wire; they would only be for helping us write code and specs.
Having explicit names in the code would make it harder to accidentally write errors where we say "FlowCtrl=2" when we mean "FlowCtrl=1". If we also use these names in the specs, we can cross-link features more easily, and give every feature a single name for reference.
What do you think? If this seems like a good idea, we could try to do it for every subprotocol version, or we could do it only for those versions where we find that we need it in practice.