How can I modify stored data in blockchain??

0 votes

How can I alter a data stored in a block.  consider this code snippet,

{
    studentId:600,
    marks:300
}

Suppose, the above code was written to include a data entry in the blockchain. Now, I want to update this marks to 400. so can i do this in a block chain. I heard that we couldn't update a bockchain

Apr 17, 2018 in Blockchain by anonymous
65 views

1 answer to this question.

0 votes

One of the important feature of a blockchain is immutability, which means that any transaction once recorded cannot be altered. The only way to maodify is to add the updated data in a new a new blockchain.

So, instead of the code to change the marks from 400 to 500 you should add a new point of data to the variable. Also, if you want to reduce the marks, you have to add it in a new block and save it to the variable.

answered Apr 18, 2018 by Christine
• 15,790 points

Related Questions In Blockchain

0 votes
1 answer

How can i read headers of blockchain in multichain?

You could use a recent feature known ...READ MORE

answered Mar 26, 2018 in Blockchain by Perry
• 17,020 points
51 views
+1 vote
2 answers

Can I include real world data in a smart contract? If so, how?

You cant access/embed real world data using ...READ MORE

answered Jul 17, 2018 in Blockchain by sapan
73 views
0 votes
1 answer
0 votes
1 answer

Truffle tests not running after truffle init

This was a bug. They've fixed it. ...READ MORE

answered Sep 11, 2018 in Blockchain by Christine
• 15,790 points
173 views
+1 vote
1 answer
0 votes
1 answer
0 votes
1 answer

How can i create a simple P2P network on a blockchain?

To develop your own cryptocurrency, you need ...READ MORE

answered Apr 20, 2018 in Blockchain by Christine
• 15,790 points
196 views
0 votes
1 answer

In a Blockchain, how difficult is it to modify the third to last block?

Technically, it's not difficult at all, all ...READ MORE

answered Apr 20, 2018 in Blockchain by Christine
• 15,790 points
81 views