#22735: prop224: HS desc overlap period func uses absolute times instead of slots ------------------------------------------+-------------------------------- Reporter: asn | Owner: Type: task | Status: new Priority: Medium | Milestone: Tor: | 0.3.2.x-final Component: Core Tor/Tor | Version: Severity: Normal | Resolution: Keywords: prop224 prop224-extra tor-hs | Actual Points: Parent ID: #21888 | Points: 1 Reviewer: | Sponsor: SponsorR-can ------------------------------------------+-------------------------------- Changes (by asn):
* keywords: prop224 prop224-extra => prop224 prop224-extra tor-hs Old description: > The function that decides whether we are in HS desc overlap mode > currently uses the following logic: > {{{ > tor_gmtime_r(&consensus->valid_after, &valid_after_tm); > if (valid_after_tm.tm_hour > 0 && valid_after_tm.tm_hour < 12) { > return 1; > } > }}} > > While that logic is accurate wrt prop224 section 2.2.4, it's actually not > a good idea since it uses absolute times, and it will fail to work as > intended in the testnet. > > We should refactor that logic to use the slot based system that we use > for time periods and shared randomness, since semantically the HS desc > overlap period is just the period between publishing a fresh SRV and > starting the new time period. New description: The function that decides whether we are in HS desc overlap mode currently uses the following logic: {{{ tor_gmtime_r(&consensus->valid_after, &valid_after_tm); if (valid_after_tm.tm_hour > 0 && valid_after_tm.tm_hour < 12) { return 1; } }}} While that logic is accurate wrt prop224 section 2.2.4, it's actually not a good idea since it uses absolute times, and it will fail to work as intended in the testnet. We should refactor that logic to use the slot based system that we use for time periods and shared randomness, since semantically the HS desc overlap period is just the period between publishing a fresh SRV and starting the new time period. We should also change the spec to reflect the new logic. -- -- Ticket URL: <https://trac.torproject.org/projects/tor/ticket/22735#comment:1> Tor Bug Tracker & Wiki <https://trac.torproject.org/> The Tor Project: anonymity online _______________________________________________ tor-bugs mailing list tor-bugs@lists.torproject.org https://lists.torproject.org/cgi-bin/mailman/listinfo/tor-bugs