0

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 .

2 Answers 2

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 A🡐B🡐C🡐D with C as E's parent, the competing chains would be A🡐B🡐C🡐D vs A🡐B🡐C🡐E. 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 A🡐B🡐C🡐D🡐F will quickly replace your shorter A🡐B🡐C🡐E.

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.

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.

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.