0

I am working on a blockchain learning project and i have a general question about block immutability. I know that when a block data is altered the chain becomes invalid am wondering what happens if I revert that change does the chain become valid again? see the following scenarios

Chain =Array('Block1'=>100,'Block2'=>200)

If I make a change eg

Chain[Block2]=300

Our chain is now invalid.

My question is if I reverted this change eg

Chain[Block2]=200

Is our chain now valid again or once a block is altered the chain permanently remains invalid

0

your scheme is too basic but once you revert the value to the initial state 200 the chain is valid (if we suppose the network has reached consensus on the chain with Chain[Block2]=200).

the chain validity is ensured by the validation of the hashes of block's headers from block 0=>1=>2 and so forth. so the chain is a structure enabling us to check chunk by chunk the integrity of the data making it easier. the chain itself is not read only, you can edit it as you wish but you should just ensure the succession of the blocks hashes, in this case if you keep the similar copy as the network (Longest chain) you are synced otherwise you will built a forked chain which the rest of the network will decide to accept or not.

  • thanks this helps. i know this is a very basic block scheme. but as mentioned this is for academic learning purpose, not an actual real chain – user1108509 Apr 10 '18 at 2:12
0

Hmmm ... I think a quick answer to the question, as asked, will add confusion. I suspect some hidden assumptions. To try to unfold that ...

  1. A block is a well-ordered set of transactions.
  2. The transactions are inputs, signed by senders.
  3. Importantly, the state is left to clients to compute on their own. You can't "Now, it's 200". You can only say "0x123" signed a transaction to "0xabc" with function signature "plus100". That needs to be signed by 0x123 and then mined in a way the rest of the network will accept.

  4. You can't just change it, or, if you do, it's meaningless because the majority of the network will ignore you.

  5. A block must include a solution, a.k.a. proof of work. Not easy.

You can do changes on the side including disregard of the consensus mechanism but you would be off on a fork that other nodes would agree is wrong. It will have no effect outside of your world with your modified client and stange chain.

Hope it helps.

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service, privacy policy and cookie policy

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