tor

The Tor anonymity network
git clone https://git.dasho.dev/tor.git
Log | Files | Refs | README | LICENSE

commit 0cdd5a79002166e8eb88929dcbc6b87c00292be5
parent 67bfb87dcbbdd7808446dc452f028b857701f2fc
Author: Nick Mathewson <nickm@torproject.org>
Date:   Tue, 15 Aug 2023 10:12:25 -0400

Implement proposal 301-dont-vote-on-package-fingerprints.txt

This commit adds a new consensus method which, when present, causes
authorities not to consider package fingerprints when computing a
consensus. It builds on earlier work which dropped support for putting
these lines into the votes.

Diffstat:
Achanges/prop301 | 6++++++
Msrc/feature/dirauth/dirvote.c | 6+++++-
Msrc/feature/dirauth/dirvote.h | 8+++++++-
3 files changed, 18 insertions(+), 2 deletions(-)

diff --git a/changes/prop301 b/changes/prop301 @@ -0,0 +1,6 @@ + o Removed features (directory authority): + - We include a new consensus method that removes support for + computing "package" lines in consensus documents. This feature was + never used, and support for + including it in our votes was removed in 0.4.2.1-alpha. + Finishes implementation of proposal 301. diff --git a/src/feature/dirauth/dirvote.c b/src/feature/dirauth/dirvote.c @@ -1631,7 +1631,11 @@ networkstatus_compute_consensus(smartlist_t *votes, n_versioning_servers); client_versions = compute_consensus_versions_list(combined_client_versions, n_versioning_clients); - packages = compute_consensus_package_lines(votes); + + if (consensus_method < MIN_METHOD_TO_OMIT_PACKAGE_FINGERPRINTS) + packages = tor_strdup(""); + else + packages = compute_consensus_package_lines(votes); SMARTLIST_FOREACH(combined_server_versions, char *, cp, tor_free(cp)); SMARTLIST_FOREACH(combined_client_versions, char *, cp, tor_free(cp)); diff --git a/src/feature/dirauth/dirvote.h b/src/feature/dirauth/dirvote.h @@ -53,7 +53,7 @@ #define MIN_SUPPORTED_CONSENSUS_METHOD 28 /** The highest consensus method that we currently support. */ -#define MAX_SUPPORTED_CONSENSUS_METHOD 33 +#define MAX_SUPPORTED_CONSENSUS_METHOD 34 /** * Lowest consensus method where microdescriptor lines are put in canonical @@ -80,6 +80,12 @@ */ #define MIN_METHOD_TO_SUPPRESS_MD_PUBLISHED 33 +/** + * Lowest (supported) consensus method for which we do not include + * any "package" lines. + **/ +#define MIN_METHOD_TO_OMIT_PACKAGE_FINGERPRINTS 34 + /** Default bandwidth to clip unmeasured bandwidths to using method >= * MIN_METHOD_TO_CLIP_UNMEASURED_BW. (This is not a consensus method; do not * get confused with the above macros.) */