user112444: When you start the initial block download with the latest versions of Bitcoin Core, how does your node know that old blocks were valid according to different rules prior to soft forks?

user47827: A soft fork is a change to the Bitcoin protocol that adds additional restrictions to the rules enforced by full nodes. However, these additional restrictions only apply to blocks from the point of activation. Blocks pre soft fork activation aren't expected to meet the new restrictions. These blocks are validated according to the old protocol rules that continue to be present in the code of a protocol implementation (e.g. Bitcoin Core).

user63872: Old blocks in the chain are still valid under the current consensus rules.
In a broad sense, this is because the code will be written to enact rule changes at specific block heights, and thus older blocks will not be subject to said new rules.
To put it differently: the consensus ruleset doesn't just cover what new blocks are supposed to look like, they also cover what the historical valid chain looks like!
Sometimes, specific exceptions are written in, such as is the case with BIP 30. 

112444: <p>When you start the initial block download with the latest versions of Bitcoin Core, how does your node know that old blocks were valid according to different rules prior to soft forks?</p>
 47827: <p>A soft fork is a change to the Bitcoin protocol that adds additional restrictions to the rules enforced by full nodes. However, these additional restrictions only apply to blocks from the point of activation. Blocks pre soft fork activation aren't expected to meet the new restrictions. These blocks are validated according to the old protocol rules that continue to be present in the code of a protocol implementation (e.g. Bitcoin Core).</p>
 63872: <p>Old blocks in the chain are <em>still valid</em> under the current consensus rules.</p>
<p>In a broad sense, this is because the code will be written to enact rule changes at specific block heights, and thus older blocks will not be subject to said new rules.</p>
<p>To put it differently: the consensus ruleset doesn't just cover what new blocks are supposed to look like, they also cover what the historical valid chain looks like!</p>
<p>Sometimes, specific exceptions are written in, such as <a href="https://github.com/bitcoin/bitcoin/commit/ab91bf39b7c11e9c86bb2043c24f0f377f1cf514" rel="nofollow noreferrer">is the case with BIP 30. </a></p>
