From 4298d87756e5bdb83276de1f361860c198b3c0c9 Mon Sep 17 00:00:00 2001 From: Nick Mathewson Date: Sun, 18 Oct 2020 16:18:42 -0400 Subject: Split required/recommended protocol lists into multiple lines This should make diffs easier to read. --- src/feature/dirauth/dirvote.h | 49 +++++++++++++++++++++++++++++++++++-------- 1 file changed, 40 insertions(+), 9 deletions(-) diff --git a/src/feature/dirauth/dirvote.h b/src/feature/dirauth/dirvote.h index 1b1c9f2cc7..7cfa72ead5 100644 --- a/src/feature/dirauth/dirvote.h +++ b/src/feature/dirauth/dirvote.h @@ -239,31 +239,62 @@ STATIC microdesc_t *dirvote_create_microdescriptor(const routerinfo_t *ri, * Recommending a new protocol causes old tor versions to log a warning. */ #define DIRVOTE_RECOMMEND_RELAY_PROTO \ - "Cons=1-2 Desc=1-2 DirCache=2 HSDir=2 HSIntro=4 HSRend=2 " \ - "Link=5 LinkAuth=3 Microdesc=1-2 Relay=2" + "Cons=2 " \ + "Desc=2 " \ + "DirCache=1-2 " \ + "HSDir=1 " \ + "HSIntro=3 " \ + "HSRend=1 " \ + "Link=4 " \ + "Microdesc=2 " \ + "Relay=2" + /** The recommended client protocols for this authority's votes. * Recommending a new protocol causes old tor versions to log a warning. */ #define DIRVOTE_RECOMMEND_CLIENT_PROTO \ - "Cons=1-2 Desc=1-2 DirCache=2 HSDir=2 HSIntro=4 HSRend=2 " \ - "Link=5 LinkAuth=3 Microdesc=1-2 Relay=2" + "Cons=1-2 " \ + "Desc=1-2 " \ + "DirCache=2 " \ + "HSDir=2 " \ + "HSIntro=4 " \ + "HSRend=2 " \ + "Link=5 " \ + "LinkAuth=3 " \ + "Microdesc=1-2 " \ + "Relay=2" /** The required relay protocols for this authority's votes. * WARNING: Requiring a new protocol causes old tor versions to shut down. * Requiring the wrong protocols can break the tor network. * See Proposal 303: When and how to remove support for protocol versions. */ -#define DIRVOTE_REQUIRE_RELAY_PROTO \ - "Cons=1 Desc=1 DirCache=1 HSDir=1 HSIntro=3 HSRend=1 " \ - "Link=3-4 Microdesc=1 Relay=1-2" +#define DIRVOTE_REQUIRE_RELAY_PROTO \ + "Cons=1 " \ + "Desc=1 " \ + "DirCache=1 " \ + "HSDir=1 " \ + "HSIntro=3 " \ + "HSRend=1 " \ + "Link=3-4 " \ + "Microdesc=1 " \ + "Relay=1-2" \ + /** The required relay protocols for this authority's votes. * WARNING: Requiring a new protocol causes old tor versions to shut down. * Requiring the wrong protocols can break the tor network. * See Proposal 303: When and how to remove support for protocol versions. */ #define DIRVOTE_REQUIRE_CLIENT_PROTO \ - "Cons=1-2 Desc=1-2 DirCache=1 HSDir=1 HSIntro=3 HSRend=1 " \ - "Link=4 Microdesc=1-2 Relay=2" + "Cons=1-2 " \ + "Desc=1-2 " \ + "DirCache=1 " \ + "HSDir=1 " \ + "HSIntro=3 " \ + "HSRend=1 " \ + "Link=4 " \ + "Microdesc=1-2 " \ + "Relay=2" #endif /* defined(DIRVOTE_PRIVATE) */ -- cgit v1.2.3-54-g00ecf From d872c6925516a571b0ce624e913b620ba9324740 Mon Sep 17 00:00:00 2001 From: Nick Mathewson Date: Sun, 18 Oct 2020 16:09:25 -0400 Subject: Update required/recommended protocol versions. Cons=1 is the old format of consensuses, without ed25519 keys. It is no longer required or recommended. Cons=2 is the new format of consensuses, with ed25519 keys. It is now required. (Similarly for Desc=1,2 and Microdesc=1,2) No supported client or relay versions should be affected by this change, since these versions are supported by clients and relays running 0.2.9 and later. It will only take effect once enough authorities vote for it. Closes ticket 40162. --- changes/ticket40162 | 7 +++++++ src/feature/dirauth/dirvote.h | 16 ++++++++-------- 2 files changed, 15 insertions(+), 8 deletions(-) create mode 100644 changes/ticket40162 diff --git a/changes/ticket40162 b/changes/ticket40162 new file mode 100644 index 0000000000..5a8a76bfd8 --- /dev/null +++ b/changes/ticket40162 @@ -0,0 +1,7 @@ + o Minor features (authorities): + - Authorities now list the directory formats used by currently supported + Tor releases as required. Previously, they listed only the formats + supported by older Tor releases as required. This change makes + the subprotocols "Cons=2 Desc=2 Microdesc=2" required, and makes + "Cons=1 Desc=1 Microdesc=1" no longer required or recommended. + Closes ticket 40162. diff --git a/src/feature/dirauth/dirvote.h b/src/feature/dirauth/dirvote.h index 7cfa72ead5..69c8a025c4 100644 --- a/src/feature/dirauth/dirvote.h +++ b/src/feature/dirauth/dirvote.h @@ -253,8 +253,8 @@ STATIC microdesc_t *dirvote_create_microdescriptor(const routerinfo_t *ri, * Recommending a new protocol causes old tor versions to log a warning. */ #define DIRVOTE_RECOMMEND_CLIENT_PROTO \ - "Cons=1-2 " \ - "Desc=1-2 " \ + "Cons=2 " \ + "Desc=2 " \ "DirCache=2 " \ "HSDir=2 " \ "HSIntro=4 " \ @@ -270,14 +270,14 @@ STATIC microdesc_t *dirvote_create_microdescriptor(const routerinfo_t *ri, * See Proposal 303: When and how to remove support for protocol versions. */ #define DIRVOTE_REQUIRE_RELAY_PROTO \ - "Cons=1 " \ - "Desc=1 " \ + "Cons=2 " \ + "Desc=2 " \ "DirCache=1 " \ "HSDir=1 " \ "HSIntro=3 " \ "HSRend=1 " \ "Link=3-4 " \ - "Microdesc=1 " \ + "Microdesc=2 " \ "Relay=1-2" \ /** The required relay protocols for this authority's votes. @@ -286,14 +286,14 @@ STATIC microdesc_t *dirvote_create_microdescriptor(const routerinfo_t *ri, * See Proposal 303: When and how to remove support for protocol versions. */ #define DIRVOTE_REQUIRE_CLIENT_PROTO \ - "Cons=1-2 " \ - "Desc=1-2 " \ + "Cons=2 " \ + "Desc=2 " \ "DirCache=1 " \ "HSDir=1 " \ "HSIntro=3 " \ "HSRend=1 " \ "Link=4 " \ - "Microdesc=1-2 " \ + "Microdesc=2 " \ "Relay=2" #endif /* defined(DIRVOTE_PRIVATE) */ -- cgit v1.2.3-54-g00ecf From fd58e74ddcb012892bd7e59ef1587fc4faa2ab35 Mon Sep 17 00:00:00 2001 From: Nick Mathewson Date: Fri, 23 Oct 2020 11:23:08 -0400 Subject: Update required/recommended protocol lists more systematically First I began with a set of candidates: The client's _required_ list starts with all the protocols supported by every release in 0.2.9-stable through current master. The client's _required_ list starts with all the protocols supported by every release in 0.3.5-stable through current master. Everybody's _recommended_ list starts with all the protocols supported by every release in 0.3.5-stable through current master. Then I removed the protocol versions that we do not actually want to require or recommend: DirCache=1 (deprecated) HSDir=1, HSIntro=1-3, HSRend=1 (deprecated) (All HS* protocol requirements for clients) Link=1-3 (deprecated) LinkAuth=1 (obsolete) Relay=1 (obsolete) --- changes/ticket40162 | 10 +++---- src/feature/dirauth/dirvote.h | 65 +++++++++++++++++++++---------------------- 2 files changed, 36 insertions(+), 39 deletions(-) diff --git a/changes/ticket40162 b/changes/ticket40162 index 5a8a76bfd8..093042f9af 100644 --- a/changes/ticket40162 +++ b/changes/ticket40162 @@ -1,7 +1,7 @@ o Minor features (authorities): - - Authorities now list the directory formats used by currently supported - Tor releases as required. Previously, they listed only the formats - supported by older Tor releases as required. This change makes - the subprotocols "Cons=2 Desc=2 Microdesc=2" required, and makes - "Cons=1 Desc=1 Microdesc=1" no longer required or recommended. + - Authorities now list a different set of protocols as required and + recommended. These lists are chosen so that only truly recommended + and/or required protocols are included, and so that clients using 0.2.9 + or later will continue to work (even though they are not supported), + whereas only relays running 0.3.5 or later will meet the requirements. Closes ticket 40162. diff --git a/src/feature/dirauth/dirvote.h b/src/feature/dirauth/dirvote.h index 69c8a025c4..a9b356b387 100644 --- a/src/feature/dirauth/dirvote.h +++ b/src/feature/dirauth/dirvote.h @@ -238,30 +238,30 @@ STATIC microdesc_t *dirvote_create_microdescriptor(const routerinfo_t *ri, /** The recommended relay protocols for this authority's votes. * Recommending a new protocol causes old tor versions to log a warning. */ -#define DIRVOTE_RECOMMEND_RELAY_PROTO \ - "Cons=2 " \ - "Desc=2 " \ - "DirCache=1-2 " \ - "HSDir=1 " \ - "HSIntro=3 " \ - "HSRend=1 " \ - "Link=4 " \ - "Microdesc=2 " \ +#define DIRVOTE_RECOMMEND_RELAY_PROTO \ + "Cons=2 " \ + "Desc=2 " \ + "DirCache=2 " \ + "HSDir=2 " \ + "HSIntro=4 " \ + "HSRend=2 " \ + "Link=4-5 " \ + "LinkAuth=3 " \ + "Microdesc=2 " \ "Relay=2" /** The recommended client protocols for this authority's votes. * Recommending a new protocol causes old tor versions to log a warning. */ -#define DIRVOTE_RECOMMEND_CLIENT_PROTO \ - "Cons=2 " \ - "Desc=2 " \ - "DirCache=2 " \ - "HSDir=2 " \ - "HSIntro=4 " \ - "HSRend=2 " \ - "Link=5 " \ - "LinkAuth=3 " \ - "Microdesc=1-2 " \ +#define DIRVOTE_RECOMMEND_CLIENT_PROTO \ + "Cons=2 " \ + "Desc=2 " \ + "DirCache=2 " \ + "HSDir=2 " \ + "HSIntro=4 " \ + "HSRend=2 " \ + "Link=4-5 " \ + "Microdesc=2 " \ "Relay=2" /** The required relay protocols for this authority's votes. @@ -272,28 +272,25 @@ STATIC microdesc_t *dirvote_create_microdescriptor(const routerinfo_t *ri, #define DIRVOTE_REQUIRE_RELAY_PROTO \ "Cons=2 " \ "Desc=2 " \ - "DirCache=1 " \ - "HSDir=1 " \ - "HSIntro=3 " \ - "HSRend=1 " \ - "Link=3-4 " \ + "DirCache=2 " \ + "HSDir=2 " \ + "HSIntro=4 " \ + "HSRend=2 " \ + "Link=4-5 " \ + "LinkAuth=3 " \ "Microdesc=2 " \ - "Relay=1-2" \ + "Relay=2" /** The required relay protocols for this authority's votes. * WARNING: Requiring a new protocol causes old tor versions to shut down. * Requiring the wrong protocols can break the tor network. * See Proposal 303: When and how to remove support for protocol versions. */ -#define DIRVOTE_REQUIRE_CLIENT_PROTO \ - "Cons=2 " \ - "Desc=2 " \ - "DirCache=1 " \ - "HSDir=1 " \ - "HSIntro=3 " \ - "HSRend=1 " \ - "Link=4 " \ - "Microdesc=2 " \ +#define DIRVOTE_REQUIRE_CLIENT_PROTO \ + "Cons=2 " \ + "Desc=2 " \ + "Link=4 " \ + "Microdesc=2 " \ "Relay=2" #endif /* defined(DIRVOTE_PRIVATE) */ -- cgit v1.2.3-54-g00ecf