Opened 9 months ago

Closed 8 months ago

Last modified 6 months ago

#27336 closed enhancement (implemented)

Does sbws need a node cap?

Reported by: teor Owned by: juga
Priority: Medium Milestone: sbws: 1.0.x-final
Component: Core Tor/sbws Version:
Severity: Normal Keywords: sbws-1.0-must-closed-moved-20181128
Cc: pastly, juga, teor Actual Points:
Parent ID: #27107 Points:
Reviewer: Sponsor:

Description (last modified by teor)

Torflow caps individual nodes at 5% of the consensus weight.

When Tor gets better multithreading, we might need to implement a cap.

https://gitweb.torproject.org/torflow.git/tree/NetworkScanners/BwAuthority/aggregate.py#n44

Edit: fix short sentence.

Child Tickets

Attachments (1)

20180826_120539.png (34.7 KB) - added by juga 9 months ago.
sbws capped to 0.05 * sum all the relays' bandwidth

Download all attachments as: .zip

Change History (11)

comment:1 Changed 9 months ago by teor

Description: modified (diff)

Since we're using observed bandwidths, we must limit the maximum node bandwidth.

5% is ok, but 1% might be better, because the largest relay is only 0.5%.

comment:2 Changed 9 months ago by teor

Milestone: sbws 1.1sbws 1.0 (MVP must)
Parent ID: #27107

Changed 9 months ago by juga

Attachment: 20180826_120539.png added

sbws capped to 0.05 * sum all the relays' bandwidth

comment:3 Changed 9 months ago by juga

I think (but i'm not sure), that tot_net_bw [0] is not being applied.
Also, since new_bw it's used in the non-pid part as the final value to write in the file, i thought tot_net_bw it just the sum of all the final relays' bandwidth that are going to be written in the file.

In previous experiments, i capped to 0.05 * sum final bandwidths, and the result makes sense, see the attchemnt.

[0] https://gitweb.torproject.org/torflow.git/tree/NetworkScanners/BwAuthority/aggregate.py#n758

comment:4 Changed 9 months ago by pastly

Can you make the dots smaller please? I'd like to be able to at least somewhat see the blue dots behind the orange ones.

pyplot.scatter(..., s=5, ...)

https://matplotlib.org/api/_as_gen/matplotlib.pyplot.scatter.html

(I don't know if 5 is a good size. Trial and error is required to find a good size)

comment:5 in reply to:  1 Changed 9 months ago by teor

Replying to teor:

Since we're using observed bandwidths, we must limit the maximum node bandwidth.

5% is ok, but 1% might be better, because the largest relay is only 0.5%.

sbws needs to cap, so that relays can't gain too much bandwidth by changing their observed bandwidths.
This is a security requirement. If torflow doesn't do it, that's a bug in torflow.

Replying to juga:

I think (but i'm not sure), that tot_net_bw [0] is not being applied.

It looks like the NODE_CAP is applied unconditionally in torflow:
https://gitweb.torproject.org/torflow.git/tree/NetworkScanners/BwAuthority/aggregate.py#n778

But from the graph, there doesn't seem to be a cap on torflow's bandwidths.

Also, since new_bw it's used in the non-pid part as the final value to write in the file, i thought tot_net_bw it just the sum of all the final relays' bandwidth that are going to be written in the file.

In previous experiments, i capped to 0.05 * sum final bandwidths, and the result makes sense, see the attchemnt.

Great!

[0] https://gitweb.torproject.org/torflow.git/tree/NetworkScanners/BwAuthority/aggregate.py#n758

The cap must be configurable, so that we can turn it off in test networks, or adjust it if it is a problem.

comment:6 Changed 9 months ago by juga

Implementation is ready, but #27135, #27386 need to be fixed first and i'll wait for #27398 to be fixed too to make PRs

comment:7 Changed 9 months ago by juga

Status: newneeds_review

comment:8 Changed 8 months ago by juga

Owner: set to juga
Status: needs_reviewaccepted

comment:9 Changed 8 months ago by juga

Resolution: implemented
Status: acceptedclosed

Removed child #27363 since it does not need to be implemented for the MVP

comment:10 Changed 6 months ago by teor

Keywords: sbws-1.0-must-closed-moved-20181128 added
Milestone: sbws 1.0 (MVP must)sbws: 1.0.x-final

Move all closed sbws 1.0 must tickets to sbws 1.0.x-final

Note: See TracTickets for help on using tickets.