Mismatch between dir-spec.txt and routerparse.c
In #5041 (moved) we learned that leaving out contact lines from votes is permitted by the spec, but not by the code. I briefly compared dir-spec.txt and routerparse.c to find more mismatches between spec and code. Here's what I found:
-
protocolslines are specified in dir-spec.txt and written to server descriptors, but they are not parsed in routerparse.c. -
consensus-methodlines are specified as "Exactly once for consensuses" but implemented using theT01macro in routerparse.c. -
contactlines are specified as "At most once" for votes and authority sections of consensuses, but are implemented using theT1andT1Nmacro in routerparse.c. -
legacy-key-dirlines are specified aslegacy-keyin dir-spec.txt. -
slines are specified as "At most once" in dir-spec.txt, but are implemented using theT1macro in routerparse.c.
I didn't prepare a patch, because I didn't know whether to fix spec or code. If someone tells me, I can prepare one.