Stop checking routerinfos for addresses when we use microdescs for circuits

Directory mirrors and clients that FetchUselessDescriptors check for IPv4 and IPv6 addresses in the following order:

  • routerinfos (descriptors)
  • routerstatus (consensus)
  • microdescriptors

But they should check using the following order:

  • bridge routerinfos (descriptors)
  • routerstatus (consensus) If using microdescriptors for circuits:
  • microdescriptors Otherwise:
  • routerinfos (descriptors)

There is code that implements this algorithm in commits decb0636e2, 1d1c927b9a, and 4979ec3c17 of my bug23975_tree branch.

But this adds overhead to every address lookup when building circuits.

Maybe we can make it faster by:

  • not parsing routerinfos or microdescs if we aren't using them for circuits, or
  • putting a canonical address in node_t, updating it whenever ri, rs, or md change, and always using it
To upload designs, you'll need to enable LFS and have an admin enable hashed storage. More information