Author

Topic: Are historical blocks validated on current rules? (Read 239 times)

sr. member
Activity: 490
Merit: 389
Do not trust the government
By default Bitcoin Core assumes blocks that came before a block with certain hard-coded hex value are valid.
In the latest version, all blocks before block no. 506067 are assumed valid unless specified otherwise with an -assumevalid argument.
No, that is not true. The scripts are assumed to be valid, but the blocks themselves are not. They are still checked for everything else, just the transaction scripts are not verified.

Thanks for clarification Smiley It makes sense
staff
Activity: 3458
Merit: 6793
Just writing some code
By default Bitcoin Core assumes blocks that came before a block with certain hard-coded hex value are valid.
In the latest version, all blocks before block no. 506067 are assumed valid unless specified otherwise with an -assumevalid argument.
No, that is not true. The scripts are assumed to be valid, but the blocks themselves are not. They are still checked for everything else, just the transaction scripts are not verified.
copper member
Activity: 85
Merit: 122
Ah right, forgot about that update. There are also checkpoints, which force selection of a particular chain (go up to block 295000), but IIRC the validation was still performed, unlike with assumevalid (that allows to skip validation but does not the node to accept the chain if a valid longer one with more work is presented).
sr. member
Activity: 490
Merit: 389
Do not trust the government
By default Bitcoin Core assumes blocks that came before a block with certain hard-coded hex value are valid.
In the latest version, all blocks before block no. 506067 are assumed valid unless specified otherwise with an -assumevalid argument.
copper member
Activity: 85
Merit: 122
With that being said, block 501726 was always valid under all consensus rules, even though it was a weird block. Some software might have choked on it, but the network continued to build on top of it.
copper member
Activity: 85
Merit: 122
Yes, the full node doesn't just blindly trust other nodes with whatever blocks they send your way, but actually validates every block and all transactions in it starting from genesis. If a block turns out to be invalid, it is discarded, and the peer giving you such invalid blocks may be banned.

When consensus rules are updated, and a new version is out, the new rules are usually applied starting from specific future point. Within the code, there is a switch saying: if the block height is less than this, validate it using old rules, otherwise with the new ones. Also keep in mind that this creates a hard fork, causing the nodes with the old and new software ban each other and have two different chains.
newbie
Activity: 8
Merit: 1
Let's say I start up a new full node, with nothing but the code & the embedded Genesis block.  My node then asks nearby nodes for blocks to build up my chain.

As I start getting blocks 1, 2, and 3 from 2009, is each block validated using today's current rules?

I'm thinking that there has to have been ancient blocks in the chain that, at the time were valid, but new security rules have since made them invalid.
For example, does famous block 501726 still cause problems?

Jump to: