In the consensus files there are bandwidth specifications for every router. This (consensus) data originates from the directory authorities votes, which contain a bandwidth as well as measured bandwidth specification for every router.

The calculation for these different bandwidth data is kind of complex. My question is, how the bandwidth for the votes is calculated.

The vote measured bandwidth is being

computed by multiplying the previous published consensus bandwidth by the ratio of the measured average node stream capacity to the network average.1

The consensus bandwidth is the median of the voted measured bandwidth data, if 3 or more directory authorities have measured bandwidth data for this relay.

For the voted bandwidth data, dirspec is unspecific:

The bandwidth in a "w" line should be taken as the best estimate of the router's actual capacity that the authority has. For now, this should be the lesser of the observed bandwidth and bandwidth rate limit from the router descriptor. It is given in kilobytes per second, and capped at some arbitrary value (currently 10 MB/s).1

I already looked at or/dirserv.c as well as or/dirvote.c to finde an answer, how this bandwidth data for the votes is being computed. I even parsed some archive data, and it looks like, as there is a dependency between the bandwidth data from the votes and the advocated Bandwidth form the router status files (sever-descriptors).

If someone can explain how and even why this bandwidth data is computed, I would be very happy.


The default directory authorities are located (as of version (git-d015c70a118e4357)) in file or/config.c:

/** List of default directory authorities */

static const char *default_authorities[] = {
  "moria1 orport=9101 "
    "v3ident=D586D18309DED4CD6D57C18FDB97EFA96D330566 "
    " 9695 DFC3 5FFE B861 329B 9F1A B04C 4639 7020 CE31",
  "tor26 orport=443 "
    "v3ident=14C131DFC5C6F93646BE72FA1401C02A8DF2E8B4 "
    " 847B 1F85 0344 D787 6491 A548 92F9 0493 4E4E B85D",
  "dizum orport=443 "
    "v3ident=E8A9C45EDE6D711294FADF8E7951F4DE6CA56B58 "
    " 7EA6 EAD6 FD83 083C 538F 4403 8BBF A077 587D D755",
  "Tonga orport=443 bridge "
    " 4A0C CD2D DC79 9508 3D73 F5D6 6710 0C8A 5831 F16D",
  "gabelmoo orport=443 "
    "v3ident=ED03BB616EB2F60BEC80151114BB25CEF515B226 "
    " F204 4413 DAC2 E02E 3D6B CF47 35A1 9BCA 1DE9 7281",
  "dannenberg orport=443 "
    "v3ident=585769C78764D58426B8B52B6651A5A71137189A "
    " 7BE6 83E6 5D48 1413 21C5 ED92 F075 C553 64AC 7123",
  "urras orport=80 "
    "v3ident=80550987E1D626E3EBA5E5E75A458DE0626D088C "
    " 0AD3 FA88 4D18 F89E EA2D 89C0 1937 9E0E 7FD9 4417",
  "maatuska orport=80 "
    "v3ident=49015F787433103580E3B66A1707A00E60F2D15B "
    " BD6A 8292 55CB 08E6 6FBE 7D37 4836 3586 E46B 3810",
  "Faravahar orport=443 "
    "v3ident=EFCBE720AB3A82B99F9E953CD5BF50F7EEFC7B97 "
    " CF6D 0AAF B385 BE71 B8E1 11FC 5CFF 4B47 9237 33BC",
  "longclaw orport=443 "
    "v3ident=23D15D965BC35114467363C165C4F724B64B4F66 "
    " 74A9 1064 6BCE EFBC D2E8 74FC 1DC9 9743 0F96 8145",

The bandwidths are computed by downloading files through a relay and sending them to the directory authorities. The data is computed so that information about how the relay can be used within the network becomes available to the remainder of the nodes.

I am still looking into the exact details of what files and from where are they being downloaded.


See this question for more details.

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service, privacy policy and cookie policy

Not the answer you're looking for? Browse other questions tagged or ask your own question.