Why is syncing the last 5000 blocks so much more CPU-intensive?

2

1

I deleted my block chain and I'm currently syncing again. Just as I did last time, I noticed that from a certain point, my CPU usage raises to almost 100% and stays so for much longer than the usual peaks before this.

I think it's around the last 5000 blocks.

It also sometimes just stops, I don't know if that is for saving resources or something else, but sometimes it just stops (both CPU and network traffic go to nearly nothing) and almost no new blocks are added.

Is there a reason for this different behavior while syncing the last 5000 blocks?

Steven Roose

Posted 2013-04-18T22:46:54.863

Reputation: 10 855

Did you find out more about this? I'm experiencing the same thingAnthony 2016-03-20T19:44:42.513

Answers

5

Up until the last checkpoint, your client knows that all transactions are properly signed. After the last checkpoint, your client has to validate each input to each transaction by matching it against the corresponding output and executing the script, typically involving an ECDSA verify.

David Schwartz

Posted 2013-04-18T22:46:54.863

Reputation: 46 931

And how are these checkpoints defined?Steven Roose 2013-04-21T18:24:31.850

They're included in the source code. Whoever provided you the source code vouches that all blocks prior to the last checkpoint contain only valid transactions.David Schwartz 2013-04-21T18:34:15.557

Is that what this is? : 2016-03-20 17:49:12 Pre-allocating up to position 0x1000000 in blk00437.dat 2016-03-20 17:49:19 Pre-allocating up to position 0x2000000 in blk00437.dat 2016-03-20 17:49:22 Pre-allocating up to position 0x3000000 in blk00437.dat 2016-03-20 17:49:24 Pre-allocating up to position 0x4000000 in blk00437.dat 2016-03-20 17:49:25 Pre-allocating up to position 0x5000000 in blk00437.datAnthony 2016-03-20T19:45:36.183

0

Might be that there's a lot more transactions in later blocks.

Shamoon

Posted 2013-04-18T22:46:54.863

Reputation: 2 689

1I considered that, but I think it's not that. New blocks are also coming in faster than the ones before (the very early sparse blocks not taken into account). It calmed down now, but blocks are added really slow. Maybe it was just imagination or coïncidenceSteven Roose 2013-04-18T23:04:51.627