5

Does block verification time (by all nodes in the network) takes up a large portion of the total block propagation time? What is the percentage, on average?

1 Answer 1

7

It depends significantly if you're asking about the average, N-th percentile time, or a worst case including the possibility of maliciously constructed blocks.

Nodes use the first copy of a block they receive, obviously. A consequence of this is that block propagation along a slower path will be outpaced by block propagation on a faster path. As a result, overall propagation time depends mostly on the behavior of fastest paths and there are many optimizations in the Bitcoin network to make the fastest paths usually quite fast.

On the vast majority of blocks >99% of the transactions in the block are known in advance and already validated. With validation already cached the only further validation required are trivial tests such as preventing double-spends within a block and verifying that block time/height are consistent with transaction lock-times.

On blocks consisting of known transactions relay among BIP152 HB-mode peers occurs without most of the validation (only POW and the hash root are checked, which takes under 1ms on a typical fast host). Similarly, fibre forwarding doesn't need to wait for validation (or complete reception, for that matter) even when many transactions aren't known in advance.

As a result on average the amount of time used for validation in propagation in the network today is probably closer to 0% than to 1%. I would expect based on data from matt's relay network that the 99.9th percentile would have a couple percent in validation.

In the worst case, however, no transactions would be known or already validated and, also in the worst case, a block could require minutes of processing to validate. Fibre would still forward fairly quickly though still several times slower than typical due to the additional data needed. In such a worst case situation the vast majority of the propagation time would be spent on validation, even where Fibre propagation is used (which doesn't need to wait for validation even when the data is unknown), just due the final receiving node's own validation.

This other answer may be of interest to you: https://bitcoin.stackexchange.com/a/80928/52021

The community has spent a fair amount of effort optimizing the non-malicious block case both because it was clear what needed to be done there and because providing equitable access to very fast propagation is essential to avoiding creating an advantage for larger miners. Arguably, however, for many concerns the worst case performance is more critical. Fibre makes some advance on the non-validation related worst case performance, and not making the worst case worse was a major design goal in segwit but the worst case remains a more difficult and somewhat less well addressed problem.

11
  • Thanks for this great answer. What is a maliciously constructed block?
    – James C.
    Jan 28, 2019 at 10:05
  • 3
    A block that instead of processing normal transactions is stuffed full of transactions which are specifically created to be expensive for the network to deal with. For example, by containing transactions which were not previously relayed to eliminate caching gains, expensive script operations, or quadratic sig-hashing.
    – G. Maxwell
    Jan 28, 2019 at 10:12
  • Maybe one advantage of having an optimal average case is that it makes the adversarial case stand out that much more? Everybody will very quickly know that something is up and take their precautions. There's no hiding in the noise or plausible deniability for the adversary. Even if he's still anonymous.
    – Jannes
    Jan 29, 2019 at 1:32
  • 3
    Most transactions are relayed on the network, received, and validated on most nodes before they end up in blocks. They don't need to be validated again except for trivial consistency checks. They all have to validate them, but usually they are no longer on the critical path for block validation. Security depends on the worst case, however, which would be when they are not known in advance, so processing delays are still important but they're important even though on average they don't take any time during propagation.
    – G. Maxwell
    Jan 29, 2019 at 10:04
  • 1
    Attacker spins up 1,000,000 'nodes', and as a result any 20% you select will almost always be attacker nodes. If that sort of thing worked there would be no reason for mining in Bitcoin at all.
    – G. Maxwell
    Feb 15, 2019 at 3:39

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service and acknowledge you have read our privacy policy.

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