diff options
author | Nick Mathewson <nickm@torproject.org> | 2021-11-09 13:43:48 -0500 |
---|---|---|
committer | Nick Mathewson <nickm@torproject.org> | 2021-11-09 13:43:48 -0500 |
commit | 96f1e69f24ec5c056964b44cb8538004649c504d (patch) | |
tree | 6bbf5f621bd666f863c9db6d214aca666bbab2ed /src/feature/nodelist | |
parent | 1d2c918dfdfc1356890775bc57358b3523830224 (diff) | |
download | tor-96f1e69f24ec5c056964b44cb8538004649c504d.tar.gz tor-96f1e69f24ec5c056964b44cb8538004649c504d.zip |
Implement proposal 275: don't put "published" times in md consensus
When a new consensus method is negotiated, these values will all get
replaced with "2038-01-01 00:00:00".
This change should be safe because:
* As of 0.2.9.11 / 0.3.0.7 / 0.3.1.1-alpha, Tor takes no action
about published_on times in the future.
* The only remaining parties relying on published_on values are (we
believe) relays running 0.3.5.x, which rely on the values in a NS
consensus to see whether their descriptors are out of date. But
this patch only changes microdesc consensuses.
* The latest Tor no longer looks at this field in consensuses.
Why make this change? In experiments, replacing these values with a
fixed value made the size of compressed consensus diffs much much
smaller. (Like, by over 50%!)
Implements proposal 275; Implements #40130.
Diffstat (limited to 'src/feature/nodelist')
-rw-r--r-- | src/feature/nodelist/fmt_routerstatus.c | 2 |
1 files changed, 1 insertions, 1 deletions
diff --git a/src/feature/nodelist/fmt_routerstatus.c b/src/feature/nodelist/fmt_routerstatus.c index 07b4e63472..e068c87c9b 100644 --- a/src/feature/nodelist/fmt_routerstatus.c +++ b/src/feature/nodelist/fmt_routerstatus.c @@ -58,7 +58,7 @@ routerstatus_format_entry(const routerstatus_t *rs, const char *version, char digest64[BASE64_DIGEST_LEN+1]; smartlist_t *chunks = smartlist_new(); - if (declared_publish_time != -1) { + if (declared_publish_time >= 0) { format_iso_time(published, declared_publish_time); } else if (vrs) { format_iso_time(published, vrs->published_on); |