[tor-bugs] #26155 [Core Tor/Tor]: Bandwidth file Timestamp is the latest scanner result, not the file creation time

Tor Bug Tracker & Wiki blackhole at torproject.org
Thu May 31 20:12:53 UTC 2018


#26155: Bandwidth file Timestamp is the latest scanner result, not the file
creation time
----------------------------------+------------------------------------
 Reporter:  teor                  |          Owner:  teor
     Type:  defect                |         Status:  needs_revision
 Priority:  Medium                |      Milestone:  Tor: 0.3.5.x-final
Component:  Core Tor/Tor          |        Version:
 Severity:  Normal                |     Resolution:
 Keywords:  tor-spec, tor-bwauth  |  Actual Points:
Parent ID:  #25925                |         Points:
 Reviewer:                        |        Sponsor:
----------------------------------+------------------------------------

Comment (by juga):

 Replying to [comment:11 teor]:

 > Can you tell me what you decided to do about these issues:

 > > 2. don't generate the file, delete any existing file - tor will warn
 that the file is missing

 This is what i decided. In the code is in https://github.com/pastly
 /simple-bw-scanner/pull/175/files#diff-
 5d572187bd8e5853f29b5e173a4fa8efR119.

 However, i don't delete any existing files because i don't understand the
 logic.
 If previous files were generated by the same code, they will have the
 correct timestamp of previous results.

 > > I suggest that we say that generators SHOULD NOT generate a file,

 i say MUST NOT: https://github.com/torproject/torspec/pull/10/files#diff-
 824f4c7404328d8aa1101d74ba36884dR132

 > and SHOULD delete any existing file, because it is the least confusing
 option.

 but not this because of what commented above.

 > > If you want, you can also say that:
 > > * generators SHOULD wait until enough relays are measured before
 generating the file (option 2)
 > > * generators MAY use a placeholder timestamp (option 1j, but the time
 MUST be at least 5 days in the past to avoid silent failures.
 > > * generators MUST NOT generate an empty file (option 3), because it
 triggers a bug in tor.

 i say "MUST NOT generate the file", though i don't mention "empty" nor
 that it triggers a bug. Is it needed?.

 > > The earliest_bandwidth and latest_bandwidth are optional.

 Optional is implicit by "zero or one time":
 https://github.com/torproject/torspec/pull/10/files#diff-
 824f4c7404328d8aa1101d74ba36884dR173

 > > If there is no valid value for these lines, the generator SHOULD leave
 them out.

 If file is not created when there are not results (no "latest_bandwidth"),
 then "file_created" won't exist. Same for "latest_bandwidth". Is it needed
 to say so?

--
Ticket URL: <https://trac.torproject.org/projects/tor/ticket/26155#comment:12>
Tor Bug Tracker & Wiki <https://trac.torproject.org/>
The Tor Project: anonymity online


More information about the tor-bugs mailing list