Report version of bwscanners in votes
Each directory authority should list the git version of the bandwidth scanners in their votes. This ticket has two parts:
-
Edit aggregate.py to output a line with the git commit that it is from.
-
Alter the tor voting to add an "opt" line or other ignored keyword that lists the version from the bwscan file.
There should be no consensus process for this. We just want a comment in the vote documents, basically.
- Show closed items
Activity
-
Newest first Oldest first
-
Show all activity Show comments only Show history only
- Mike Perry changed milestone to %Tor: 0.3.5.x-final
changed milestone to %Tor: 0.3.5.x-final
- Author
Trac:
Cc: N/A to karsten, aagbsn - Author
Trac:
Priority: normal to major - Author
Trac:
Owner: mikeperry to aagbsn
Status: new to assigned This is a feature that belongs in the new bwauth replacement project, see #13630 (moved).
Trac:
Reviewer: N/A to N/A
Severity: N/A to Blocker
Parent: N/A to #13630 (moved)
Sponsor: N/A to N/AHi juga, this is the ticket for putting the bandwidth authority version in votes.
We are working on the file format in #25869 (moved) and https://github.com/torproject/torspec/pull/4
I think we should:
- add a "timestamp=" to the timestamp
- turn the entire bwfile header into a single line
- put it all in the vote as a line with a new keyword, "bandwidth-file"
For bandwidth file format 1.0.0, the line would be: bandwidth-file timestamp=1234567890
For bandwidth file format 1.1.0, the line would be: bandwidth-file timestamp=1234567890 version=1.1.0 software=sbws software_version=0.1.0
If we implement the feature in this way, then Tor will automatically add new fields to the bandwidth-file line.
Trac:
Cc: karsten, aagbsn to juga, karsten, aagbsn
Component: Core Tor/Torflow to Core Tor/Tor
Milestone: N/A to Tor: unspecifiedThis is about the format of the vote line, not the format of the v3bwfile header, which is multiple lines.
Replying to teor:
Hi juga, this is the ticket for putting the bandwidth authority version in votes.
We are working on the file format in #25869 (moved) and https://github.com/torproject/torspec/pull/4
I think we should:
- add a "timestamp=" to the timestamp
- turn the entire bwfile header into a single line
- put it all in the vote as a line with a new keyword, "bandwidth-file"
For bandwidth file format 1.0.0, the line would be: bandwidth-file timestamp=1234567890
For bandwidth file format 1.1.0, the line would be: bandwidth-file timestamp=1234567890 version=1.1.0 software=sbws software_version=0.1.0
If we implement the feature in this way, then Tor will automatically add new fields to the bandwidth-file line.
Trac:
Parent: #13630 (moved) to 25925Trac:
Parent: 25925 to #25925 (moved)To which Tor version should we backport this?, 0.3.2 too since it's the ealier version dirauths are running?
Would be the place to put the one i'm using in this commit?: https://github.com/juga0/tor/commit/dd19df3a042e9b9bbf29fdb73d717a78f7dc5e57#diff-141d60fb101694336aa8683a8e2a1541R241
In which structure should the timestamp (and version) be stored so that dirvote.c can read it?.
Replying to 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.
-
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
-
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
-
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.
Trac:
Milestone: Tor: unspecified to Tor: 0.3.5.x-final-
Since it is not being backported i based it on master, now in my branch
ticket3723
After looking more to
dirvote.c
i thought it was better to usesmartlist_t
instead of string, and get it converted to string informat_networkstatus_vote
.Since
dirserv_read_measured_bandwidths
is call fromdirserv_generate_networkstatus_vote_obj
, i don't need a different function to obtain the headers.Since i didn't found specific tests for
dirserv_generate_networkstatus_vote_obj
andformat_networkstatus_vote
, i'm not sure how to add tests for the vote document.This code break other tests, hints?.
Trac:
Keywords: N/A deleted, tor-dirauth addedTrac:
Reviewer: N/A to teor