blockchain – Do nodes periodically verify block hashes?

0
15


It’s pointless to recalculate block headers often. Each time a brand new block is introduced, the block header’s hash should meet the problem requirement to be acceptable. The mix of committing to the previous block’s hash and the brand new block’s hash assembly the problem requirement, interprets to an inductive dedication to all prior blocks in the very best chain, in addition to a proof of labor. After this low-cost verify, the block can be examined to stick to all different consensus necessities.

When a brand new block arrives, it checks whether or not this block extends its greatest chain or it constitutes an alternate chaintip with extra work. If that’s the case, the node extends its greatest chain, or reorganizes to the brand new greatest chain’s tip.

If as an alternative a block is printed, that “adjustments a predecessor of the very best chain tip”, this could produce a definite block header from the unique, and the brand new block would represent an alternate chaintip at a decrease peak than the very best chaintip. (And the attacker must spend the identical quantity of proof of labor to make the modified block move the problem requirement.) Because the successor of the unique block commits to the hash of the very best chain, and all additional successors every inductively decide to the unique block by committing to a successor of the unique block, the very best chaintip would have extra work than the choice chaintip, until the attacker builds extra blocks on high of their various block to outpace the prior greatest chaintip.

Anyway, we solely must verify every block as soon as, after which merely hold the block header chain in reminiscence and prolong from there, and it’s pointless to revalidate blocks later, as a result of we already know that something that’s a part of our greatest chain has been checked earlier than and can’t be modified with out altering the header’s hash.

LEAVE A REPLY

Please enter your comment!
Please enter your name here