Proposal 160: Authorities vote for bandwidth offsets in consensus

Roger Dingledine arma at
Sun Jun 21 14:05:09 UTC 2009

On Sun, Jun 14, 2009 at 01:05:18AM -0400, Roger Dingledine wrote:
> > * We'd like to avoid having little changes in measured bandwidth
> >   result in changes to the consensus, since we'd like to be able to
> >   transfer consensus diffs.  Thus, let's round our votes to the
> >   first N significant bits.
> >   
> >   In other words, if we've observed a bandwidth of 28789 bytes for a
> >   node, that's  111 0000 0111 0101.   We round that down to 111 0000
> >   0000 0000, and declare 26872.
> > 
> >   This is better than rounding to the nearest 1k, since a 1k change is
> >   very significant for low values, and relatively frequent for high
> >   values.
> Ok, but another constraint here is that users want to look at the numbers
> in the consensus and find them intuitive. Can we take the resulting
> number (26872) and round it off to 26? That will take care of an unending
> stream of users wondering why the heck it says 26872. As a side effect,
> the status stanzas get smaller too.

Mike and I decided that for now the algorithm can be: take the first
two or three significant digits, and zero out (rounding up or down)
the rest of the digits.

In the future the voters should consider the current value in the
consensus and only vote a change if it has changed "enough" -- either
a significant fraction of the vote, or a significant fraction of the
total network capacity. More spec'ing needs to be done there.

What really needs to get solidified is the client side, since
that's harder to change. Right now the consensus uses bandwidths in
kilobytes. That is, they drop the last 3 digits (technically they divide
by 1024, but I'm going to pretend that's the same). Mike on the other
hand would rather have the bandwidth in the consensus be bytes -- it
doesn't hurt to have "000" in each status (since we use compression),
and it might give us some flexibility later.

In the interest of getting 0.2.1.x out the door, I say we leave it as
KB for now. I've pushed a patch to my "consensus-bandwidths" branch on
moria that makes clients start using it. Nick, please merge to master
and maint-0.2.1 whenever you like.

Then we can migrate to a different format later -- for example bundled
with the switch to the microdesc consensus flavor.


More information about the tor-dev mailing list