Opened 8 years ago

Closed 8 years ago

Last modified 8 years ago

#8151 closed defect (implemented)

Dirauths should publicize their flag cutoff values in their votes

Reported by: asn Owned by:
Priority: Medium Milestone: Tor: 0.2.5.x-final
Component: Core Tor/Tor Version:
Severity: Keywords: tor-auth
Cc: karsten Actual Points:
Parent ID: Points:
Reviewer: Sponsor:


To detect sybil attacks faster, it might be a good idea for dirauths to publicize their flag cutoff values in their votes.

This way they can be collected and analyzed, and maybe used by a script like consensus-health to detect anomalies.

(For example, in yesterday's attack, the cutoffs of moria looked like:

Cutoffs: For Stable, 404881 sec uptime, 242577 sec MTBF. For Fast: 1 bytes/sec. For Guard: WFU 95.962%, time-known 110475 sec, and bandwidth 71680 or  58291 bytes/sec. We have enough stability data.

(see the Fast cutoff))

Child Tickets

#8165closedtorspec: Document the new "flag-thresholds" item in votesCore Tor/Tor

Change History (8)

comment:1 Changed 8 years ago by karsten

Cc: karsten added

comment:2 Changed 8 years ago by nickm

Status: newneeds_review

easy enough to do. See branch "bug8151" in my public respository. Needs testing and review.

comment:3 Changed 8 years ago by karsten

Code looks good and runs fine in Shadow. To be precise, I didn't get Tor master running in Shadow, so I ran with your cherry-picked commit. Here's the start of a vote from a test network with only 5 relays:

network-status-version 3
vote-status vote
consensus-methods 1 2 3 4 5 6 7 8 9 10 11 12 13
published 1970-01-01 00:29:21
valid-after 1970-01-01 00:30:00
fresh-until 1970-01-01 00:35:00
valid-until 1970-01-01 00:45:00
voting-delay 20 20
known-flags Authority Exit Fast Guard HSDir Running Stable V2Dir Valid
flag-thresholds stable-uptime=1701 stable-mtbf=850 fast-speed=1024 guard-wfu=87.629% guard-tk=0 guard-bw-inc-exits=1024 guard-bw-exc-exits=1024 enough-mtbf=0
dir-source 4uthority 919CAD4BB055CE7EC5169F19BCA731F3D60EFB19 9112 9111

comment:4 Changed 8 years ago by arma

Looks plausible. We should probably reduce duplication by using this new function for the log_info line too.

comment:5 Changed 8 years ago by arma

(I'm running it on moria1 now, so in another 40 minutes it should be clear if it does what we expect.)

comment:6 Changed 8 years ago by arma

Here's what moria1 says:
flag-thresholds stable-uptime=693369 stable-mtbf=153249 fast-speed=40960 guard-wfu=94.669% guard-tk=691200 guard-bw-inc-exits=174080 guard-bw-exc-exits=184320 enough-mtbf=1

Looks good to me.

comment:7 Changed 8 years ago by nickm

Resolution: implemented
Status: needs_reviewclosed

Okay; checking again and merging into master.

comment:8 Changed 8 years ago by asn

Made #8165 for the torspec side of this.

Note: See TracTickets for help on using tickets.