<p>Four methods have been used to decide whether a softfork should apply:</p>

<ul>
<li><p>The softfork applies to all blocks, past and future.<br>
Example: The softfork to remove the <a href="https://en.bitcoin.it/wiki/Value_overflow_incident" rel="nofollow noreferrer">integer overflow bug.</a></p></li>
<li><p>The softfork applies to all blocks with a timestamp after a flag day.<br>
Example: The initial form of <a href="https://github.com/bitcoin/bips/blob/master/bip-0030.mediawiki" rel="nofollow noreferrer">BIP30</a> was applied to all blocks with a <a href="https://github.com/bitcoin/bitcoin/commit/ab91bf39b7c11e9c86bb2043c24f0f377f1cf514" rel="nofollow noreferrer">timestamp later than 1331769600.</a> (March 15, 2012, 00:00 UTC)</p></li>
<li><p>The softfork applies to all blocks except some grandfathered-in blocks.<br>
Example: The current form of BIP30 is applied to all blocks, <a href="https://github.com/bitcoin/bitcoin/commit/ab91bf39b7c11e9c86bb2043c24f0f377f1cf514" rel="nofollow noreferrer">except two that violate it.</a></p></li>
<li><p>The softfork applies to all blocks created after a successful miner vote. A Bitcoin client can determine if a softfork applies purely by looking at the blockchain.<br>
Example: <a href="https://github.com/bitcoin/bips/blob/master/bip-0034.mediawiki" rel="nofollow noreferrer">BIP34</a>, which required block height to be placed in the coinbase in all new blocks.</p></li>
</ul>

CC BY-SA 3.0
2016-11-22T19:19:16.913Z
Or in short: every recent softfork has included a trigger condition that only depends on the chain itself. Thus, during historical validation, you know which rules to apply where.
Pieter Wuille
CC BY-SA 3.0
2016-11-22T19:08:26.927Z
2017-01-28T23:16:52.620Z
2017-01-28T23:16:52.620Z
Nick ODell
<p>Let's say I run a bitcoin client for the first time. It downloads a copy of the blockchain from the very beginning and starts validating all the transactions included in all the blocks. </p>

<p>Since there have been some softforks during Bitcoin's timelife, how does the client know which validation rules needs to apply to validate each transaction?</p>

<p>Even if there are some checkpoints so that there is no need to validate the whole blockchain, how does the client handle different rules for different transactions?</p>

<p>Are there different sets of rules included in the source code, together with block heights indicating when they should be used?</p>

<transaction-verification>
How are past transactions validated (when there have been softforks)?
cpsola
# How are past transactions validated (when there have been softforks)?

(Asked by: username_0 on 2016-11-22)

Let's say I run a bitcoin client for the first time. It downloads a copy of the blockchain from the very beginning and starts validating all the transactions included in all the blocks.

Since there have been some softforks during Bitcoin's timelife, how does the client know which validation rules needs to apply to validate each transaction?

Even if there are some checkpoints so that there is no need to validate the whole blockchain, how does the client handle different rules for different transactions?

Are there different sets of rules included in the source code, together with block heights indicating when they should be used?

**Tags:** transaction-verification


---

## 1 answers

### Answer by username_1 on 2016-11-22. Score: 4 | Accepted answer

Four methods have been used to decide whether a softfork should apply:

* The softfork applies to all blocks, past and future.  
  Example: The softfork to remove the [integer overflow bug.](https://en.bitcoin.it/wiki/Value_overflow_incident)
* The softfork applies to all blocks with a timestamp after a flag day.  
  Example: The initial form of [BIP30](https://github.com/bitcoin/bips/blob/master/bip-0030.mediawiki) was applied to all blocks with a [timestamp later than 1331769600.](https://github.com/bitcoin/bitcoin/commit/ab91bf39b7c11e9c86bb2043c24f0f377f1cf514) (March 15, 2012, 00:00 UTC)
* The softfork applies to all blocks except some grandfathered-in blocks.  
  Example: The current form of BIP30 is applied to all blocks, [except two that violate it.](https://github.com/bitcoin/bitcoin/commit/ab91bf39b7c11e9c86bb2043c24f0f377f1cf514)
* The softfork applies to all blocks created after a successful miner vote. A Bitcoin client can determine if a softfork applies purely by looking at the blockchain.  
  Example: [BIP34](https://github.com/bitcoin/bips/blob/master/bip-0034.mediawiki), which required block height to be placed in the coinbase in all new blocks.

> **Comments:**
> **username_2**: Or in short: every recent softfork has included a trigger condition that only depends on the chain itself. Thus, during historical validation, you know which rules to apply where.  

---

