0

Suppose I have a merkle tree containing the blockchain implementation of a system and I have used databases along with it to do search operations on it. So my question is that how does blockchain verifies if someone has changed any values in the database? Do we verify the database with the chain on regular intervals? If yes, how do we do that and at what interval?

Take an example of customer loyalty points:

If someone gets the root access of the database, they can directly change values in the database and get benefited from it by getting the loyalty points which they don't have, and redeem these points(Since before making a transaction, we search for user's points balance). So in such cases, should there be some verification of data in the implemented database? If yes, how often should that take place? And how to implement that since this would require us going through the entire merkel tree and then verifying the database. and this would be a time taking process.

In real life blockchain implementation, how do we cope up with such situations? Any suggestions or help would be appreciated.

Ayush Kumar
  • 833
  • 2
  • 13
  • 30
  • How this is work for bitcoin. We don't do such validations on regular intervals. It actually doesn't matter, if your local database is corrupted. In case if you create invalid transaction, other peers will not confirm it and just reject. – Zergatul Dec 28 '18 at 15:15
  • @Zergatul I'm trying to implement a hybrid architecture where there is one common database where all the nodes have access to(read and update).So in that case, how to overcome such problem? Or the other nodes will simply reject the transaction? – Ayush Kumar Dec 31 '18 at 09:32
  • You should estimate, how often corruption can happen. We store files on HDD drives for 10+ years, and if disk is alive, no single bit is changed. If disk is dead, you will get read errors. I think you should not worry about this. – Zergatul Dec 31 '18 at 13:40

0 Answers0