[tor-bugs] #3723 [Core Tor/Tor]: Report version of bwscanners in votes
Tor Bug Tracker & Wiki
blackhole at torproject.org
Mon May 28 17:35:50 UTC 2018
#3723: Report version of bwscanners in votes
--------------------------+------------------------------------
Reporter: mikeperry | Owner: (none)
Type: enhancement | Status: new
Priority: Medium | Milestone: Tor: 0.3.5.x-final
Component: Core Tor/Tor | Version:
Severity: Normal | Resolution:
Keywords: | Actual Points:
Parent ID: #25925 | Points:
Reviewer: | Sponsor:
--------------------------+------------------------------------
Changes (by teor):
* milestone: Tor: unspecified => Tor: 0.3.5.x-final
Comment:
Replying to [comment:12 juga]:
> To which Tor version should we backport this?, 0.3.2 too since it's the
ealier version dirauths are running?
New features do not get backported, they get merged to master.
Since there is an 0.3.4 alpha release, it is closed to new features.
So the earliest release this feature will be in is 0.3.5.
> Would be the place to put the one i'm using in this commit?:
https://github.com/juga0/tor/commit/dd19df3a042e9b9bbf29fdb73d717a78f7dc5e57
#diff-141d60fb101694336aa8683a8e2a1541R241
That is almost the right place.
Please add the new "bandwidth-file" line to the end of the authority
header, after the shared random information.
We add new lines to the end of the section, to avoid merge conflicts.
> In which structure should the timestamp (and version) be stored so that
dirvote.c can read it?.
Please add every header key_value to the bandwidth-file line, not just
timestamp and version.
This means that new header lines are automatically added to the vote.
You can add these key_values to a space-separated string.
I suggest that you modify dirserv_read_measured_bandwidths() to store the
headers in a string, add a function that gets that string, and include the
string in the vote.
1. Set the bandwidth-file string to NULL at the start of the function,
freeing it if was not NULL:
https://github.com/torproject/tor/blob/1eede00a4bd9a7de2acf77393f2fc57aa3196d08/src/or/dirserv.c#L2584
2. Once you know the time is a number, read the rest of the header lines,
and add them to the bandwidth-file string:
https://github.com/torproject/tor/blob/1eede00a4bd9a7de2acf77393f2fc57aa3196d08/src/or/dirserv.c#L2615
3. When voting, add a bandwidth-file line if the bandwidth-file string is
not NULL:
https://github.com/juga0/tor/commit/dd19df3a042e9b9bbf29fdb73d717a78f7dc5e57
#diff-141d60fb101694336aa8683a8e2a1541R210
You will also need to change the dir-spec. I will open a child ticket.
--
Ticket URL: <https://trac.torproject.org/projects/tor/ticket/3723#comment:13>
Tor Bug Tracker & Wiki <https://trac.torproject.org/>
The Tor Project: anonymity online
More information about the tor-bugs
mailing list