[tor-bugs] #20333 [Metrics/metrics-lib]: add descriptor digest to vote and streamline method name

Tor Bug Tracker & Wiki blackhole at torproject.org
Thu May 4 08:07:53 UTC 2017


#20333: add descriptor digest to vote and streamline method name
---------------------------------+-----------------------------------
 Reporter:  iwakeh               |          Owner:  karsten
     Type:  enhancement          |         Status:  needs_review
 Priority:  Medium               |      Milestone:  metrics-lib 1.7.0
Component:  Metrics/metrics-lib  |        Version:
 Severity:  Normal               |     Resolution:
 Keywords:                       |  Actual Points:
Parent ID:                       |         Points:
 Reviewer:                       |        Sponsor:
---------------------------------+-----------------------------------
Changes (by karsten):

 * status:  new => needs_review
 * milestone:  metrics-lib 2.0.0 => metrics-lib 1.7.0


Comment:

 Alright, I worked on a possible patch to move this discussion forward:
  - All methods returning the digest of a given descriptor use a common
 scheme, `getDigestAlgEnc()`, for example, `getDigestSha1Hex()`.
  - All methods returning a digest referencing another descriptor contain a
 word or two explaining what other descriptor they are referencing, but
 they also use `AlgEnc`, for example, `getVoteDigestSha1Hex()`.

 I also added a digest method to votes.

 I did not switch to `digest()`, `digestAlgEnc()`, or `getDigest(Alg)`,
 because I found those names not in line with the other methods.  Let me
 know if you disagree, and why, and let's discuss.

 Assigning to metrics-lib 1.7.0, because this is a backward-compatible
 change that doesn't seem to be too hard to make.

 Please review [https://gitweb.torproject.org/user/karsten/metrics-
 lib.git/log/?h=task-20333 my task-20333 branch].

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


More information about the tor-bugs mailing list