How to store data on blockchain?

1

I want to store the data on blockchain so that people can see and verify the data. The data format will be a simple JSON like the user details.

{'user_id': userid, 'amount': amount, 'product_id': productId, 'place_id':place'}

Is there any way to store the above data in blockchain so that people can verify their details that are not manipulated?

merklexy

Posted 2018-05-16T09:44:19.033

Reputation: 87

Answers

1

The traditional way to store data is via an OP_RETURN. On Bitcoin, this is limited to 40 bytes of data. Bitcoin Cash increased this limit to 220 bytes just yesterday.

You can also store arbitrary data (more or less) on ethereum via a smart contract.

Traditionally, for this kind of use case, people opt to store the hash of the data instead of the raw data itself. They can then provide the raw data to someone, who can hash it and verify that it matches the hash that was stored on the blockchain.

Raghav Sood

Posted 2018-05-16T09:44:19.033

Reputation: 10 897

0

A way to embed data in the blockchain may be using the Class B transactions Use the tool on this website or my tool.

Keep in mind that it's not viable to do that on the Bitcoin blockchain.

If you're looking for "proof of existence" or "proof of authenticity", use Raghav's suggestion.

MCCCS

Posted 2018-05-16T09:44:19.033

Reputation: 5 827