[Author Prev][Author Next][Thread Prev][Thread Next][Author Index][Thread Index]
Re: [tor-bugs] #26155 [Core Tor/Tor]: Bandwidth file Timestamp is the latest scanner result, not the file creation time
#26155: Bandwidth file Timestamp is the latest scanner result, not the file
creation time
----------------------------------+------------------------------------
Reporter: teor | Owner: teor
Type: defect | Status: needs_review
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: | Points:
Reviewer: | Sponsor:
----------------------------------+------------------------------------
Old description:
> The bandwidth file timestamp should be the last time a relay was scanned.
> But we say it's the file creation time, which is wrong.
>
> in torflow, the timestamp is actually the oldest of the most recent
> timestamps for all scanners:
> https://gitweb.torproject.org/torflow.git/tree/NetworkScanners/BwAuthority/aggregate.py#n409
> (This is buggy in small networks, because the unmeasured node scanner may
> end up in a state where is never has any nodes to scan. But we won't fix
> this issue.)
>
> Here's how I suggest we fix this issue:
>
> Replace the initial Timestamp with:
> {{{
> Timestamp NL
>
> [At start, exactly once.]
>
> The Unix Epoch time in seconds of the most recent scanner result.
>
> If there are multiple scanners which can fail independently,
> implementations
> SHOULD take the most recent timestamp from each scanner and use the
> oldest value. This ensures all the scanners continue running.
>
> If there are scanners that do not run continuously, they SHOULD be
> excluded
> from the timestamp calculation,
>
> It does not follow the KeyValue format for backwards
> compatibility with version 1.0.0.
> }}}
>
> Add a file creation date:
> {{{
> "file_created=" DateTime NL
>
> [Zero or one time.]
>
> The date and time timestamp in ISO 8601 format and UTC time zone
> when the file was created.
>
> This Line has been added in version 1.1.0 of this specification.
> }}}
>
> Add a latest bandwidth in human-readable format:
> {{{
> "latest_bandwidth=" DateTime NL
>
> [Zero or one time.]
>
> The date and time timestamp in ISO 8601 format and UTC time zone
> of the most recent scanner result.
>
> This time MUST be identical to the initial Timestamp line.
>
> This duplicate value is included to make the format easier for people
> to read.
>
> This Line has been added in version 1.1.0 of this specification.
> }}}
New description:
The bandwidth file timestamp should be the last time a relay was scanned.
But we say it's the file creation time, which is wrong.
in torflow, the timestamp is actually the oldest of the most recent
timestamps for all scanners:
https://gitweb.torproject.org/torflow.git/tree/NetworkScanners/BwAuthority/aggregate.py#n409
(This is buggy in small networks, because the unmeasured node scanner may
end up in a state where is never has any nodes to scan. But we are not
fixing torflow bugs.)
Here's how I suggest we fix the spec issue:
Replace the initial Timestamp with:
{{{
Timestamp NL
[At start, exactly once.]
The Unix Epoch time in seconds of the most recent scanner result.
If there are multiple scanners which can fail independently,
implementations
SHOULD take the most recent timestamp from each scanner and use the
oldest value. This ensures all the scanners continue running.
If there are scanners that do not run continuously, they SHOULD be
excluded
from the timestamp calculation,
It does not follow the KeyValue format for backwards
compatibility with version 1.0.0.
}}}
Add a file creation date:
{{{
"file_created=" DateTime NL
[Zero or one time.]
The date and time timestamp in ISO 8601 format and UTC time zone
when the file was created.
This Line has been added in version 1.1.0 of this specification.
}}}
Add a latest bandwidth in human-readable format:
{{{
"latest_bandwidth=" DateTime NL
[Zero or one time.]
The date and time timestamp in ISO 8601 format and UTC time zone
of the most recent scanner result.
This time MUST be identical to the initial Timestamp line.
This duplicate value is included to make the format easier for people
to read.
This Line has been added in version 1.1.0 of this specification.
}}}
--
Comment (by teor):
Clarify what we are fixing
--
Ticket URL: <https://trac.torproject.org/projects/tor/ticket/26155#comment:2>
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