]> git.ipfire.org Git - thirdparty/tor.git/commitdiff
vote AuthDirMaxServersPerAddr in consensus params
authorRoger Dingledine <arma@torproject.org>
Sun, 12 Feb 2023 20:50:55 +0000 (15:50 -0500)
committerRoger Dingledine <arma@torproject.org>
Mon, 13 Feb 2023 18:54:29 +0000 (13:54 -0500)
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.

In particular, the value should make its way to the
https://consensus-health.torproject.org/#consensusparams page.

Once enough dir auths vote this param, they should also compute a
consensus value for it in the consensus document. Nothing uses this
consensus value yet, but we could imagine having dir auths consult it
in the future.

Implements ticket 40753.

changes/ticket40753 [new file with mode: 0644]
src/feature/dirauth/dirvote.c

diff --git a/changes/ticket40753 b/changes/ticket40753
new file mode 100644 (file)
index 0000000..c5dc76b
--- /dev/null
@@ -0,0 +1,5 @@
+  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.
index 1bb4fd7de15545530b7f4ce8b5b6c95e3bd5c8e9..0591125d51edf7f0290ea23fd7a63cf7ea4002fb 100644 (file)
@@ -4878,6 +4878,14 @@ dirserv_generate_networkstatus_vote_obj(crypto_pk_t *private_key,
       smartlist_split_string(v3_out->net_params,
                              paramline->value, NULL, 0, 0);
     }
+
+    /* for transparency and visibility, include our current value of
+     * AuthDirMaxServersPerAddr in our consensus params. Once enough dir
+     * auths do this, external tools should be able to use that value to
+     * help understand which relays are allowed into the consensus. */
+    smartlist_add_asprintf(v3_out->net_params, "AuthDirMaxServersPerAddr=%d",
+                           d_options->AuthDirMaxServersPerAddr);
+
     smartlist_sort_strings(v3_out->net_params);
   }
   v3_out->bw_file_headers = bw_file_headers;