Subject: Re: [Bitcoin-development] Network propagation speeds

From: Peter Todd <[email-masked]>
Date: Sun, 24 Nov 2013 12:13:10 -0500

On Sun, Nov 24, 2013 at 05:20:22PM +0100, Christian Decker wrote:
> Since this came up again during the discussion of the Cornell paper I
> thought I'd dig up my measurement code from the Information
> Propagation paper and automate it as much as possible.
> 
> The result is the Network Propagation page on bitcoinstats.com
> (http://bitcoinstats.com/network/propagation/). It takes a daily
> snapshot of the situation, then calculates the time until blocks and
> transactions reach a certain percentile of the nodes in the network.
> There is also a detailed page showing the density function describing
> at what times nodes learn about the existence of a block/transaction
> (for example yesterdays distribution:
> http://bitcoinstats.com/network/propagation/2013/11/23).
> 
> I intend to add more information and plots over time, but I wanted to
> push this out quickly as there were some people asking for it. Hope
> this helps getting the blockchain fork rate down :-)

Do you have the resources to save the raw log data? You'll also need to
save transaction timestamp data - whether or not a given node has a
transaction already matters re: propagation.

Of course given pool centralization the moment pools start peering
directly with each other all these stats might not mean all that much.

Note that the number that's important isn't seconds, rather rather
seconds/actual block interval as long as hashing power is growing.
Unfortunately actually determining that is tricky - block interval is
inherently noisy so you'll want to use a fairly agressively smoothed
average.

So here's a rough calculation: right now blocks are happening roughly
%15 faster than they would at equilibrium, and blockchain.info reports
about 2 orphans a day. 2/166=1.2% orphan rate.

Now with a simplistic model where it takes exactly t seconds for a block
to propagate to 100% of the hashing power, and until then 0% has it,
you'd get:

    orphan rate = t / actual block interval -> t = rate * interval

Or 6.2 seconds with our orphan rate data. Now whether or not
blockchain.info succesfully captures all orphans I don't know, but given
you're reporting 4.5 to 9.4 seconds for 50th and 75th percentile
respectively that number 6.2s seems "ballpark" reasonable - remember
that hashing power is definitely not distributed evenly among the nodes
you are sampling from.

Which is another point... it may be the case that your propagation data
doesn't actually give any insight into real-world orphan rates because
the distribution of hashing power is concentrated into pools.

-- 
'peter'[:-1]@petertodd.org
00000000000000064bb57c6681a117371f06c4efe26917d9179a56cc20cff9f2