Using a ConsensusParams directive to set AuthDirMaxServersPerAddr on an authority results in a broken networkstatus
Discovered here in shadow simulations: jnewsome/sponsor-61-sims#19 (closed)
Discovered the issue on tor-0.4.8.12, but looking through the changelog I suspect this is the root cause:
Changes in version 0.4.8.1-alpha - 2023-06-01
...
o Minor features (directory authorities):
- Directory authorities now include their AuthDirMaxServersPerAddr
config option in the consensus parameter section of their vote.
Now external tools can better predict how they will behave.
Implements ticket 40753.
If we use the directive "ConsensusParams AuthDirMaxServersPerAddr=8" on the authority, it results in the error:
[err] format_networkstatus_vote(): Bug: Generated a networkstatus vote we couldn't parse: <<network-status-version 3
...
params AuthDirMaxServersPerAddr=0 AuthDirMaxServersPerAddr=8 ...
I think what's happening is that AuthDirMaxServersPerAddr=0
is coming from the config parameter (which is defaulted to 0 because of TestingTorNetwork
), which then conflicts with the AuthDirMaxServersPerAddr=8