Opened 4 years ago

Closed 2 years ago

#16529 closed defect (user disappeared)

stable flag calculation

Reported by: cypherpunks Owned by:
Priority: Low Milestone: Tor: unspecified
Component: Core Tor/Tor Version:
Severity: Normal Keywords: tor-03-unspecified-201612
Cc: Actual Points:
Parent ID: Points:
Reviewer: Sponsor:


once again, please enlighten how stable flag calculation works.

node should be (see mailing list)
CWis20 41C526E3C1441A3CDE9B605002643B94F3750E8C

we have

$ curl -s -o - '' | jq --raw-output '.relays[] | .nickname,.first_seen,.last_seen,.flags[]'
2015-07-02 20:00:00
2015-07-08 20:00:00

first seen on 2015-07-02 20:00:00

$ curl -s --compressed -o - | \
sed 's/.*<a href=\"\([^"]*\).*/\1/' | \
egrep '2015-07-07-(19|20)' | \
xargs -i{} curl -s --compress -o -{} | \
grep -A1 -e '^r CWis20' -e 'valid-after'

valid-after 2015-07-07 19:00:00
fresh-until 2015-07-07 20:00:00
r CWis20 QcUm48FEGjzem2BQAmQ7lPN1Dow DBVW0Got4hh3U7o6itrG8+NId6g 2015-07-07 01:22:46 443 80
s Fast Running V2Dir Valid
valid-after 2015-07-07 20:00:00
fresh-until 2015-07-07 21:00:00
r CWis20 QcUm48FEGjzem2BQAmQ7lPN1Dow I/5vfvcsIo2LKWmi17aKmhbTCkk 2015-07-07 19:23:29 443 80
s Fast HSDir Running Stable V2Dir Valid

first Stable flag at 2015-07-07 20:00:00 (5 days after first seen)

$ curl -s --compressed -o - | \
sed 's/.*<a href=\"\([^"]*\).*/\1/' | \
grep 2015-07-07-20 | \
xargs -i{} curl -s --compress -o -{} | \
grep '^flag-thresholds' | \
sort -t= -n -k2
flag-thresholds stable-uptime=818532 stable-mtbf=1475068 fast-speed=85000 guard-wfu=98.000% guard-tk=691200 guard-bw-inc-exits=2097000 guard-bw-exc-exits=1945000 enough-mtbf=1 ignoring-advertised-bws=0
flag-thresholds stable-uptime=861077 stable-mtbf=1948931 fast-speed=102000 guard-wfu=98.000% guard-tk=691200 guard-bw-inc-exits=2560000 guard-bw-exc-exits=2097000 enough-mtbf=1 ignoring-advertised-bws=0
flag-thresholds stable-uptime=890305 stable-mtbf=2029744 fast-speed=93000 guard-wfu=98.000% guard-tk=691200 guard-bw-inc-exits=2411000 guard-bw-exc-exits=2097000 enough-mtbf=1 ignoring-advertised-bws=0
flag-thresholds stable-uptime=891459 stable-mtbf=2007627 fast-speed=93000 guard-wfu=98.000% guard-tk=691200 guard-bw-inc-exits=2465000 guard-bw-exc-exits=2097000 enough-mtbf=1 ignoring-advertised-bws=0
flag-thresholds stable-uptime=962383 stable-mtbf=2124393 fast-speed=59000 guard-wfu=98.000% guard-tk=691200 guard-bw-inc-exits=3460000 guard-bw-exc-exits=2730000 enough-mtbf=1 ignoring-advertised-bws=1
flag-thresholds stable-uptime=962384 stable-mtbf=2124558 fast-speed=74000 guard-wfu=98.000% guard-tk=691200 guard-bw-inc-exits=3960000 guard-bw-exc-exits=3240000 enough-mtbf=1 ignoring-advertised-bws=1
flag-thresholds stable-uptime=1005509 stable-mtbf=2023456 fast-speed=84000 guard-wfu=98.000% guard-tk=691200 guard-bw-inc-exits=4730000 guard-bw-exc-exits=3930000 enough-mtbf=1 ignoring-advertised-bws=1
flag-thresholds stable-uptime=1018793 stable-mtbf=2208701 fast-speed=65000 guard-wfu=98.000% guard-tk=691200 guard-bw-inc-exits=4370000 guard-bw-exc-exits=3240000 enough-mtbf=1 ignoring-advertised-bws=1

Stable flag consensuse should occur after stable-uptime 962383 sec (11.1 days), right?

But node CWis20 41C526E3C1441A3CDE9B605002643B94F3750E8C get Stable flag after only 5 days?

Child Tickets

Change History (5)

comment:1 Changed 4 years ago by cypherpunks

Summary: stable flag calulationstable flag calculation

comment:2 Changed 4 years ago by teor

Milestone: Tor: 0.2.???
Status: newneeds_information

From torspec/dir-spec.txt:

"Stable" -- A router is 'Stable' if it is active, and either its Weighted
MTBF is at least the median for known active routers or its Weighted MTBF
corresponds to at least 7 days. Routers are never called Stable if they are
running a version of Tor known to drop circuits stupidly. (
through are stupid this way.)

To calculate weighted MTBF, compute the weighted mean of the lengths
of all intervals when the router was observed to be up, weighting
intervals by $\alphan$, where $n$ is the amount of time that has
passed since the interval ended, and $\alpha$ is chosen so that
measurements over approximately one month old no longer influence the
weighted MTBF much.

As far as I understand, the stable flag is awarded after 7 days or 'more stable than the median', whichever is less. Tor's definition of median is the low-median, and it uses the MTBF, so the actual threshold would be 2023456 seconds.

Given this definition, is getting the stable flag after 5 days still an issue?

comment:3 Changed 3 years ago by teor

Milestone: Tor: 0.2.???Tor: 0.3.???

Milestone renamed

comment:4 Changed 3 years ago by nickm

Keywords: tor-03-unspecified-201612 added
Milestone: Tor: 0.3.???Tor: unspecified

Finally admitting that 0.3.??? was a euphemism for Tor: unspecified all along.

comment:5 Changed 2 years ago by nickm

Resolution: user disappeared
Severity: Normal
Status: needs_informationclosed
Note: See TracTickets for help on using tickets.