Circuit Build Timeout code needs cleanup
There's two places where we time out circuits: circuit_expire_building
and circuit_build_times_handle_completed_hop()
. circuit_expire_building
is filled with 19 years of cruft and complexity, and only operates on the second resolution, instead of milliseconds.
These probably only affect timeout in rare cases -- #40157 (closed) seems to show that with fixes from #40168 (closed), then we get very close to the target 20% timeout. But there's so much old cruft here that we should clean it up anyway. It might affect UX very poorly in some edge cases.
This is especially true for onion services, which rely primarily on circuit_expire_building()
. There's likely many bad performance consequences of this, for them.
Edited by Mike Perry