I'm confused about forking. What happens to the 'old' version of a blockchain and related transactions/data in case of a fork. Can they still be deleted or does the new branch still depend on them to ensure continuity?

  • What type of fork are you asking about? There are short-lived forks where some blocks are orphaned (made stale) either accidentally or on purpose; there are soft forks that change the consensus rules in a backwards compatible way; and there are hard forks that change the consensus rules in a backwards-incompatible way. Commented Jun 6, 2018 at 15:11
  • 1
    I'm curious about this in relation to both soft and hard forks. Thanks! Commented Jun 7, 2018 at 9:43

2 Answers 2


What happens to the 'old' version of a blockchain and related transactions/data in case of a fork. Can they still be deleted

In the case of a soft fork, historic data must be kept. In the case of a hard fork, it's not strictly necessary to keep historic data but it is almost always retained.

Going in to a bit more detail: a soft fork changes the rules everyone follows in a backwards-compatible way by only making the rules more strict. For example, miners have access to a field called the "coinbase" into which they used to be able to put any arbitrary series of 2 to 100 bytes; later a rule was added that specified in the BIP34 soft fork that the first few bytes of that field had to be the current block's height (distance from the first block). This is more strict, so everyone who follows the new rule also automatically follows the old rules. This is backwards compatible because anyone who followed the old rules and isn't already violating the new rules can continue to use their software as normal.

However, for that backwards compatibility to hold true, the data available in the block chain has to not only remain available but stay in basically the same format. You can sometimes do tricks with that, as segwit did by moving signatures to a new field in transactions, but there's a limit to the scope of changes you can reasonably make.

For hard forks, there rules are changed in a backwards-incompatible way so everyone needs to upgrade anyway. This gives you a blank slate upon which to make any change to the system you want. Regarding old block chain history, what you can do is commit to the current state of the system and throw out all history used to arrive at that state.

For example, imagine Alice mines a bitcoin and then pays that bitcoin to Bob. The block chain will include both the mining transaction and the payment transaction, but if everyone is upgrading anyway, it's simple to just say "Bob starts with 1 bitcoin" and throw away Alice's mining transaction.

If you were to throw away historic data and keep just the current state after a Bitcoin hard fork, you could reduce the current block chain size by about 98%, down to just a few gigabytes.

However, I'm not aware of any hard fork of Bitcoin or an altcoin that ever threw out the historic data and simply committed to the current state. I don't know why that's the case.

  • If you discard the earlier transactoin and start with new state, wouldnt that effect the 1:1 coin distribution scheme that comes with each hard fork. Commented Jun 12, 2018 at 10:14

"What happens to old transactions in case of a fork?" nothing. the "old" transactions will still be available. otherwise it is not a fork. both branches of the fork will have the same history until the moment of the fork.

"Can they still be deleted or does the new branch still depend on them to ensure continuity?" today's state is that transactions will not be deleted in general. the old transactions are required to ensure integrity because you need them to track the history of your bitcoins and to re-validate the hash-values of all blocks.

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service and acknowledge you have read our privacy policy.

Not the answer you're looking for? Browse other questions tagged or ask your own question.