user80457: I have a question about an implementation detail - when are old blocks verified by each full node? I.e. when will I be "caught" if I change the contents of an old block (and thus break the hash chain)
From what I've seen, the possible answers include: when it's downloaded and when you do a -rescan.
However, does a full node regularly verify the integrity of the chain from start to finish?
(I'm aware that changing the history on my node doesn't do any good, as those verifying my future transactions will have the correct chain and thus refuse any attempts to double spend)

user12983: 
when are old blocks verified by each full node? 

never unless rescan=1 command-line option passed to

From what I've seen, the possible answers include: when it's downloaded and when you do a -rescan.

yes, on downloading also of course
one of my .dat files is broken (some garbage in contents) but bitcoin-qt works well because it uses UTXO, not blocks themselves

if I change the contents of an old block (and thus break the hash chain)

this depends what do you mean.

user5406: Full nodes verify the complete blockchain history on the initial block download (IBD) or on a reindex. As the node is synchronizing with the network, they keep updating the overview of spendable balances, the Unspent Transaction Output Set.
When a node gets disconnected or turned off, they can pick up from their last known state and continue updating the UTXO Set with the changes from the new blocks that have since been published.
The history only needs to be checked once. If another node changes the content of an old block, this will not change the state of any other nodes. Other nodes will only ever discard information that they have already validated when they learn about and reorganize to a heavier chain.
If you change a block in the past, you will still not be able to get your node to accept that new information, unless you additionally manipulate your own node's UTXO Set or the software you're running on your node to accept it.
However, this would be a pointless exercise, as nobody else would accept your changed block unless it is backed by being part of a heavier chaintip.

80457: <p>I have a question about an implementation detail - when are old blocks verified by each full node? I.e. when will I be "caught" if I change the contents of an old block (and thus break the hash chain)</p>

<p>From what I've seen, the possible answers include: when it's downloaded and when you do a -rescan.</p>

<p>However, does a full node regularly verify the integrity of the chain from start to finish?</p>

<p>(I'm aware that changing the history on my node doesn't do any good, as those verifying my future transactions will have the correct chain and thus refuse any attempts to double spend)</p>
 12983: <blockquote>
  <p>when are old blocks verified by each full node? </p>
</blockquote>

<p>never unless rescan=1 command-line option passed to</p>

<blockquote>
  <p>From what I've seen, the possible answers include: when it's downloaded and when you do a -rescan.</p>
</blockquote>

<p>yes, on downloading also of course</p>

<p>one of my .dat files is broken (some garbage in contents) but bitcoin-qt works well because it uses UTXO, not blocks themselves</p>

<blockquote>
  <p>if I change the contents of an old block (and thus break the hash chain)</p>
</blockquote>

<p>this depends what do you mean.</p>
 5406: <p>Full nodes verify the complete blockchain history on the initial block download (IBD) or on a <code>reindex</code>. As the node is synchronizing with the network, they keep updating the overview of spendable balances, the Unspent Transaction Output Set.</p>

<p>When a node gets disconnected or turned off, they can pick up from their last known state and continue updating the UTXO Set with the changes from the new blocks that have since been published.</p>

<p>The history only needs to be checked once. If another node changes the content of an old block, this will not change the state of any other nodes. Other nodes will only ever discard information that they have already validated when they learn about and reorganize to a heavier chain.</p>

<p>If you change a block in the past, you will still not be able to get your node to accept that new information, unless you additionally manipulate your own node's UTXO Set or the software you're running on your node to accept it.</p>

<p>However, this would be a pointless exercise, as nobody else would accept your changed block unless it is backed by being part of a heavier chaintip.</p>
