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.