Disable exploratory client circuit builds during botnet
When clients find that they're failing a lot of circuits, they back off from their computed cbt value, which puts them in the "launch a bunch of test circuits so we can get a better estimate of our cbt" phase. By default they launch 100 circuits, one per circuit_build_times_test_frequency(), from circuit_build_needed_circs() which calls circuit_predict_and_launch_new() which does
if (num < MAX_UNUSED_OPEN_CIRCUITS-2 &&
get_options()->LearnCircuitBuildTimeout &&
circuit_build_times_needs_circuits_now(&circ_times)) {
flags = CIRCLAUNCH_NEED_CAPACITY;
log_info(LD_CIRC,
"Have %d clean circs need another buildtime test circ.", num);
circuit_launch(CIRCUIT_PURPOSE_C_GENERAL, flags);
I think while our network is overloaded (#9657 (moved)), we should turn this behavior off.
To do it, we need to set
cbtdisabled=1
cbtmincircs=1
in our consensus params.
(We need to set both because there's a bug where it doesn't look at cbtdisabled when making the decision. But I'll open that as a separate ticket.)