<p>Nodes do not validate blocks from genesis each time a new block is received.</p>

<p>During the initial sync, nodes will validate, at the very minimum, the headers from the genesis block upto the current chain head - this allows them to find the best chain (by amount of work done). They also usually verify the utxo set.</p>

<p>When a new block is received, simply validating it against the previous block hash and the current utxo set is enough, as your previous block is already verified, which means all blocks before that are also verified.</p>

<p>If you happen to lose your local copy of the chainstate and only have raw blocks left, then you would need to revalidate from genesis.</p>

CC BY-SA 4.0
2019-07-01T08:34:52.653Z
2019-07-01T08:34:52.653Z
Raghav Sood
<p>For example, I have a nth block and when n + 1 th block is propagated, i have to compare with n+1 block's previous hash and nth block's hash for validation. It is pretty trivial.  </p>

<p>But do i have to compare hash value for validation from genesis block to n + 1 block?</p>

<p>like comparing 0 and 1, 1 and 2, 2, and 3 ... n and n + 1</p>

<p>One of the most famous pseudo block chain code in github
<a href="https://github.com/dvf/blockchain/blob/master/blockchain.py#L37" rel="nofollow noreferrer">https://github.com/dvf/blockchain/blob/master/blockchain.py#L37</a>, block is validated from genesis block.</p>

<p>Bitcoin use similar way to validate a new block?</p>

CC BY-SA 4.0
2019-07-01T08:03:16.230Z
Related? https://bitcoin.stackexchange.com/questions/72910/verifying-old-blocks
MCCCS
<bitcoin-core><blockchain><mining-theory><validation>
When a new block is propagated, nodes validate from genesis block to propagated block?
HSKim
# When a new block is propagated, nodes validate from genesis block to propagated block?

(Asked by: username_0 on 2019-07-01)

For example, I have a nth block and when n + 1 th block is propagated, i have to compare with n+1 block's previous hash and nth block's hash for validation. It is pretty trivial.

But do i have to compare hash value for validation from genesis block to n + 1 block?

like comparing 0 and 1, 1 and 2, 2, and 3 ... n and n + 1

One of the most famous pseudo block chain code in github
<https://github.com/dvf/blockchain/blob/master/blockchain.py#L37>, block is validated from genesis block.

Bitcoin use similar way to validate a new block?

**Tags:** bitcoin-core, blockchain, mining-theory, validation

> **Comments:**
> **username_1**: Related? https://bitcoin.stackexchange.com/questions/72910/verifying-old-blocks  

---

## 1 answers

### Answer by username_2 on 2019-07-01. Score: 2 | Accepted answer

Nodes do not validate blocks from genesis each time a new block is received.

During the initial sync, nodes will validate, at the very minimum, the headers from the genesis block upto the current chain head - this allows them to find the best chain (by amount of work done). They also usually verify the utxo set.

When a new block is received, simply validating it against the previous block hash and the current utxo set is enough, as your previous block is already verified, which means all blocks before that are also verified.

If you happen to lose your local copy of the chainstate and only have raw blocks left, then you would need to revalidate from genesis.


---

