Member-only story

IPFS for storage, the blockchain for verified immutability

Metis
9 min readJun 4, 2021

--

by Alfonso de la Rocha

It’s never a good idea to store big chunks of data on a blockchain. For starters this is simply impossible, as the amount of data that may be included in a transaction is limited.

But even if you could store big chunks of data on a blockchain, it would be prohibitively expensive in terms of cost and resources, as every peer in the network would have to store those pieces of data that you chose to store on-chain. Moreover, if your plan is to do all of this over a public blockchain network, everything that you store on-chain would become visible for every peer in the network. That makes storing sensitive information a terrible idea, unless you have a fetish for disclosing all your secrets to the world.

You may be wondering, “How can someone implement a decentralized application that requires the storage of large chunks of data, if those data can’t be stored directly on-chain?” Fortunately, decentralized storage solutions like IPFS already exist within the Web3 ecosystem to help us with this goal.

IPFS, blockchain’s best friend for dealing with data

IPFS (InterPlanetary File System) is a distributed system for storing and accessing files, websites, applications, and data. It is a public network, which means that anyone can start downloading and storing content on the network right away. IPFS is a content-addressable network, so all content stored in the network is identified by a unique identifier called the Content Identifier, or CID. The CID of some content is derived from the hash of the content. This means that if the content changes, its CID changes, so different versions of the same content will have completely different identifiers.

To download content from the IPFS network, we need to tailor a request specifying the CID of the content we want to download. The IPFS client will take care of the rest, leveraging the network’s underlying protocols. It will find the peers in the network that are storing the content we are looking for, and download it for us. “Get” requests, which is what we call download operations in IPFS, are usually specified through a link that looks like this:

/ipfs/QmXoypizjW3WknFiJnKLwHCnL72ved…

--

--

Metis
Metis

Written by Metis

Ethereum layer 2 scaling solution

No responses yet

Write a response