<p>Bitcoin nodes always choose the chain with most work, a chain with an extra block will have more work.</p>
<p>But what you describe is an alternate chain of the same length. If you added block E to chain ABCD with C as E's parent, the competing chains would be ABCD vs ABCE. In that case, every node calculates the amount of work that went into each chain and picks the one with most work as its active chain.</p>
<p>Your problem is that in the time it takes to mine a new block E with your hashpower, the rest of the network, with much more total hashpower will likely have produced block F with D as its parent, not E. It is probable that ABCDF will quickly replace your shorter ABCE.</p>
<p>Note that miners cannot spend their rewards until a further 100 blocks have been mined on top of their block in the active chain.</p>
<p>I have read that reorganisations of this type, for one or two blocks deep, occur maybe once every few weeks.</p>
<p>When a node removes a block from the active chain, the node takes the transactions in that block and places them into the node's mempool. This means they are eligible to be included in a future block and will be. So no transactions are lost when you evict block D making it a &quot;stale&quot; block.</p>

CC BY-SA 4.0
2023-03-23T09:08:26.043Z
2023-03-23T17:27:21.880Z
2023-03-23T17:27:21.880Z
RedGrittyBrick
<p>Technically they do hash the previous block data, the reason for not deleting this block is that it usually contains relevant information to protect against double spending which is the core of the protocol. Nodes actually do throw away SPENT UTXOs, so in this sense the chain is not a growing constant you can alter your local storage in any way you are comfortable with. The immutability is important because it implies that nodes are not throwing away relevant information that protects against double spending. If you want to risk being double spent against, you can just not run a full node at all.</p>

CC BY-SA 4.0
2023-03-23T18:12:21.110Z
2023-03-23T18:12:21.110Z
Poseidon
<p>I have read that block in blockchain is immutable since the next block is storing the hash of previous block .</p>
<p>What if , to remove a block from the blockchain , I set the &quot;previous hash&quot; of the NEXT BLOCK as the HASH OF THE DATA OF PREVIOUS BLOCK WHICH I AM GOING TO DELETE . That way there won't be any discontinuity in the blockchain and I would have successfully removed a block from blockchain .</p>

<blockchain><blockchain-fork><stale-block>
Deleting data in blockchain
Ayush
# Deleting data in blockchain

(Asked by: username_0 on 2023-03-23)

I have read that block in blockchain is immutable since the next block is storing the hash of previous block .

What if , to remove a block from the blockchain , I set the "previous hash" of the NEXT BLOCK as the HASH OF THE DATA OF PREVIOUS BLOCK WHICH I AM GOING TO DELETE . That way there won't be any discontinuity in the blockchain and I would have successfully removed a block from blockchain .

**Tags:** blockchain, blockchain-fork, stale-block


---

## 2 answers

### Answer by username_1 on 2023-03-23. Score: 2

Bitcoin nodes always choose the chain with most work, a chain with an extra block will have more work.

But what you describe is an alternate chain of the same length. If you added block E to chain ABCD with C as E's parent, the competing chains would be ABCD vs ABCE. In that case, every node calculates the amount of work that went into each chain and picks the one with most work as its active chain.

Your problem is that in the time it takes to mine a new block E with your hashpower, the rest of the network, with much more total hashpower will likely have produced block F with D as its parent, not E. It is probable that ABCDF will quickly replace your shorter ABCE.

Note that miners cannot spend their rewards until a further 100 blocks have been mined on top of their block in the active chain.

I have read that reorganisations of this type, for one or two blocks deep, occur maybe once every few weeks.

When a node removes a block from the active chain, the node takes the transactions in that block and places them into the node's mempool. This means they are eligible to be included in a future block and will be. So no transactions are lost when you evict block D making it a "stale" block.


---

### Answer by username_2 on 2023-03-23. Score: 0

Technically they do hash the previous block data, the reason for not deleting this block is that it usually contains relevant information to protect against double spending which is the core of the protocol. Nodes actually do throw away SPENT UTXOs, so in this sense the chain is not a growing constant you can alter your local storage in any way you are comfortable with. The immutability is important because it implies that nodes are not throwing away relevant information that protects against double spending. If you want to risk being double spent against, you can just not run a full node at all.


---

