I want to do simple blockchain implementation on golang, i have mongodb database with user info (Name, cardID, etc.) i want to store several information inside blockchain, and to put it inside another database BoltDB. But idk how to make this data immutable I mean how to make changes visible, for example I insert one user with (Name: Jhon, CardId: '777845') inside blockchain and after some time another guy will change this User's fileds (Name: 'Jhon', CardId: '1111'), and inside my blockchain it still will be (Name: Jhon, CardId: '777845')
closed as unclear what you're asking by Raghav Sood, chytrik, JBaczuk, Andrew Chow♦ Sep 12 '18 at 15:45
Please clarify your specific problem or add additional details to highlight exactly what you need. As it's currently written, it’s hard to tell exactly what you're asking. See the How to Ask page for help clarifying this question. If this question can be reworded to fit the rules in the help center, please edit the question.
A blockchain is not intrinsically immutable. What prevents malicious people propagating altered data in the blockchain is that all nodes validate received blocks.
In particular they check the checksums and they check the signatures match the public keys. They check the references (hashes of prior blocks) and they examine the length of competing branches to decide which blocks to trust.
The integrity depends on there being a large number of nodes with no central trusted authority and with no one person or organisation controlling a majority of the computing power.
If you only have a handful of nodes, the blockchain may not be inherently trustworthy.