[tor-bugs] #24256 [Metrics/Onionoo]: Add a new "outdated" field to distinguish between outdated and too new tor versions

Tor Bug Tracker & Wiki blackhole at torproject.org
Wed Mar 28 17:04:56 UTC 2018


#24256: Add a new "outdated" field to distinguish between outdated and too new tor
versions
-----------------------------+--------------------------------
 Reporter:  arma             |          Owner:  karsten
     Type:  enhancement      |         Status:  needs_revision
 Priority:  Medium           |      Milestone:
Component:  Metrics/Onionoo  |        Version:
 Severity:  Normal           |     Resolution:
 Keywords:                   |  Actual Points:
Parent ID:  #25199           |         Points:
 Reviewer:  iwakeh           |        Sponsor:
-----------------------------+--------------------------------
Changes (by iwakeh):

 * status:  needs_review => needs_revision


Comment:

 Replying to [comment:23 karsten]:
 > Alright, I made most of the changes/fixes you suggested, except for the
 first: the reason is that `equals()` ''is'' being used (in
 `recommendedVersions.contains(this)`)

 Thanks! And true, 'equals' is used and 'hashCode' should give the same
 result for equal objects.

 > ... and that I don't see a good reason against using a standard
 interface like `Comparator` in this case. Please take another look at my
 updated branch. Thanks!

 I don't mind standard interfaces, but here the standard interface is a way
 bigger promise than we want to keep.  It is broken, because it is
 inconsistent with the implementation of equals and hashCode.  I put up a
 very simple example test [https://gitweb.torproject.org/user/iwakeh
 /metrics-web.git/commit/?h=examples-for-discussion here] demonstrating
 this (not for merge; this should be replaced by tests checking the
 intended behavior).

 We only need an order for valid tor versions for deciding the status of
 valid tor versions.  Invalid versions are never recommendable, I assume,
 but currently they are classified as obsolete. Is that intended?

 Another question is, if tor versions like '01.01' and '1.1' have the same
 'age'?  Method compareTo would currently return 0.  If that is correct,
 these should be equal, too.  Could it help to 'normalize' valid versions,
 i.e., turn '1.01' into '1.1'?

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


More information about the tor-bugs mailing list