From a2ab949a13106fcafe1caaa6699424e53255525a Mon Sep 17 00:00:00 2001 From: Nick Mathewson Date: Thu, 5 Oct 2023 08:14:36 -0400 Subject: [PATCH] Remove MIN_METHOD_FOR_CANONICAL_FAMILIES_IN_MICRODESCS --- src/feature/dirauth/dirvote.c | 14 ++++---------- src/feature/dirauth/dirvote.h | 6 ------ 2 files changed, 4 insertions(+), 16 deletions(-) diff --git a/src/feature/dirauth/dirvote.c b/src/feature/dirauth/dirvote.c index 81d8cffd25..fa919fbf48 100644 --- a/src/feature/dirauth/dirvote.c +++ b/src/feature/dirauth/dirvote.c @@ -3945,14 +3945,10 @@ dirvote_create_microdescriptor(const routerinfo_t *ri, int consensus_method) } if (family) { - if (consensus_method < MIN_METHOD_FOR_CANONICAL_FAMILIES_IN_MICRODESCS) { - smartlist_add_asprintf(chunks, "family %s\n", family); - } else { - const uint8_t *id = (const uint8_t *)ri->cache_info.identity_digest; - char *canonical_family = nodefamily_canonicalize(family, id, 0); - smartlist_add_asprintf(chunks, "family %s\n", canonical_family); - tor_free(canonical_family); - } + const uint8_t *id = (const uint8_t *)ri->cache_info.identity_digest; + char *canonical_family = nodefamily_canonicalize(family, id, 0); + smartlist_add_asprintf(chunks, "family %s\n", canonical_family); + tor_free(canonical_family); } if (summary && strcmp(summary, "reject 1-65535")) @@ -4050,8 +4046,6 @@ static const struct consensus_method_range_t { int high; } microdesc_consensus_methods[] = { {MIN_SUPPORTED_CONSENSUS_METHOD, - MIN_METHOD_FOR_CANONICAL_FAMILIES_IN_MICRODESCS - 1}, - {MIN_METHOD_FOR_CANONICAL_FAMILIES_IN_MICRODESCS, MIN_METHOD_FOR_UNPADDED_NTOR_KEY - 1}, {MIN_METHOD_FOR_UNPADDED_NTOR_KEY, MAX_SUPPORTED_CONSENSUS_METHOD}, diff --git a/src/feature/dirauth/dirvote.h b/src/feature/dirauth/dirvote.h index 9faea988d0..64afc2612c 100644 --- a/src/feature/dirauth/dirvote.h +++ b/src/feature/dirauth/dirvote.h @@ -55,12 +55,6 @@ /** The highest consensus method that we currently support. */ #define MAX_SUPPORTED_CONSENSUS_METHOD 34 -/** - * Lowest consensus method where microdescriptor lines are put in canonical - * form for improved compressibility and ease of storage. See proposal 298. - **/ -#define MIN_METHOD_FOR_CANONICAL_FAMILIES_IN_MICRODESCS 29 - /** Lowest consensus method where an unpadded base64 onion-key-ntor is allowed * See #7869 */ #define MIN_METHOD_FOR_UNPADDED_NTOR_KEY 30