What Data Should be Stored on Blockchains and Why

Jared Stauffer
4 min readMay 19, 2020

--

Photo by fabio on Unsplash

This post is part of a series on Blockchain Architecture by Jared Stauffer. Reading the first post, Is the Ethereum Blockchain Really Immutable? will help you understand this one.

Now that we understand what parts of the Ethereum Blockchain are immutable and what parts are not, we can begin to dive in to exactly what data should be stored on the blockchain, and why.

A hash, or one way hash, is an algorithm that turns messages or text into a fixed string of digits, usually for security or data management purposes. The “one way” means that it’s nearly impossible to derive the original text from the string. via Webopedia.

Storing data on blockchains is generally expensive and slow. For example, to store a hash of a document on the Ethereum blockchain will cost approximately $0.08 USD and take 15 seconds to several minutes (depending on how many block confirmations you want to wait for).

Start doing the math on any kind of volume and you can see the problem play out. There are several solutions in the works to solve this problem and some available now. You can use a side-chain and get a transaction confirmed in 3–5 seconds or less. See my favorite, the POA Network (an Ethereum side-chain).

What is a block confirmation on Ethereum?

So then what type of information should be stored on the blockchain?

The answer to this question depends on what your intended outcome is (the why) and your budget (the cost per to store the information). The generic answer is:

The least amount of information possible, in the most efficient way possible, should be stored on the blockchain.

Let’s review some types of data and if they should (or should not) be stored on the blockchain.

Store on the blockchain, yes or no?

Documents / Records — whole documents: no. Hashed documents: yes.

Membership Info —every piece of info: no. Hash of an entire timestamped membership record: yes. A part of membership info (or a hashed part) that needs to be publicly shared between many different organizations: yes.

Inventory/Item Statusyes, but only if it is necessary and beneficial to share the data between many different organizations. An example of this is a shared supply chain.

Individual Votesyes.

Imagesno.

Big Datano.

How? The answer to how is almost always: in a smart contract. But the smart contract should generally be shared publicly, or at least amongst peer organizations, so that others can verify what it can and cannot do.

Starting to see a pattern? Hashes of data and data that needs to shared publicly or amongst many different organizations.

Let’s look at a real world scenario.

Need help with any software development? My team and I can help. Come say hi at Utopia Solutions!

Example: Certified Digital Marriage Certificates

Data Stored: Hash of a certified digital marriage certificate PDF
Location: Input field of a blockchain transaction

Problem: People request a certified copy of their marriage license. In many counties across the USA the request can be made virtually (from a website), but it is then fulfilled manually, with a physical paper copy. The process of physically printing a certificate, stamping it, wet signing it, packaging it, and mailing it is costly and time consuming. And the requestor often has to wait weeks to receive it in the mail.

Solution: The county records department creates an official PDF of the marriage license. The PDF is then hashed, creating what amounts to a unique digital fingerprint of the document. At the top of the document is an Ethereum blockchain wallet address. The address is sent a transaction. In that transaction’s input field is stored a hash of the certified digital marriage certificate.

In order to verify that you have an authentic PDF copy of the marriage license, you can drop the PDF you have on a website (upload it). The website will use the blockchain address at the top of the document, lookup the associated transaction, and compare the hash found on the blockchain to the hash computed from the PDF you uploaded. If the hashes match, you have an authentic document.

Read the previous post in this series: Is the Ethereum Blockchain Really Immutable?

Did I miss anything? Let me know, @jaredstauffer on Twitter.

AND, if this was helpful — don’t forget to clap! 👏👏👏

Need help with any software development? My team and I can help. Come say hi at Utopia Solutions!

--

--