[Author Prev][Author Next][Thread Prev][Thread Next][Author Index][Thread Index]

[tor-bugs] #22735 [Core Tor/Tor]: prop224: HS desc overlap period func uses absolute times instead of slots



#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        |   Keywords:  prop224 prop224-extra
Actual Points:                |  Parent ID:  #21888
       Points:  1             |   Reviewer:
      Sponsor:  SponsorR-can  |
------------------------------+-----------------------------------
 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.

--
Ticket URL: <https://trac.torproject.org/projects/tor/ticket/22735>
Tor Bug Tracker & Wiki <https://trac.torproject.org/>
The Tor Project: anonymity online
_______________________________________________
tor-bugs mailing list
tor-bugs@xxxxxxxxxxxxxxxxxxxx
https://lists.torproject.org/cgi-bin/mailman/listinfo/tor-bugs