Twitxy Saved

Eric Voskuil

Verified account This account is verified. Learn more

@evoskuil

github.com/evoskuil Joined December 2008
115 Following 12K Followers 48K Posts

Latest posts 5

Eric Voskuil Verified account @evoskuil
Performance is in parallelism. Take these numbers and apply GPU speed. Signature verification cost goes to ~zero. Bitcoin Server is approaching bandwidth limited with full validation. Record time to 950k blocks is presently 26 minutes. Making Bitcoin fast again.
Eric Voskuil Verified account @evoskuil 10h
Right, sequential block validation results in CPU starvation. That's not as visible when running on low capacity hardware, which is why we have always tested at a minimum of 64 threads, and now 128. At lower power other things dominate. It's like testing for bandwidth limitation on a very slow network. Of course that will always look network limited.

bitcoind, which is very efficient at single block validation after 17 years of tuning, uses only 15% mean CPU in full validation on the machine in the OP, bs uses 88% mean. If we run that on Lopp's benchmark or a RPi they are much closer. It's a question of scalability, which means proportional increase in performance for a given increase in hardware capacity. With 4x the threads, work should proceed 4x faster.

So despite there being thousands of signatures in a given block, that's not nearly enough to saturate even a RPi5 with 4 cores, as you can see here: libbitcoin.org/sync.html#full…

What people miss when they make that assumption, is the spin up and down of of CPUs at the beginning and the end of each block. It creates a sawtooth CPU pattern, where most of the run the CPU is idle. bitcoind even reads ahead up to 1024 blocks, to prevent starvation, but even when the blocks are all present (reindex) there is significant starvation (shown on same link above).

The only way it scales is concurrent validation across large numbers of blocks. The chain will keep getting longer, and thread count will keep increasing. That scales, but only if you validation blocks in parallel. The amount of work in a single block never increases, and making that faster just asymptotically approaches something slightly faster than the bitcoind curve.
View quoted post on X