How IPFS can be uses with blockchain?

How IPFS can be uses with blockchain?
Could you give some example, come up with something? What use cases already known.

You can publish IPFS hashes or IPNS to the blockchain (using OP_Return or other methods, depending on the blockchain) to use safe, distributed storage and easily have a tamper proof solution… for example!

But ideally you can use it in a lot of different way. You can use it to store data coming from or to smart contracts (with oracles for example), or you could host your Ethereum web3 app in IPFS and publish the hash so you have a 100% app based on blockchain and IPFS.

Just making quick example.

Could you explain, for what reason we need publish IPFS hashes to the blockchain? What are advantages of this approach?

For example you can use it to “broadcast” a newer version of the IPNS (or IPFS hash) that has been signed with the transaction (so it is valid that is coming from you)… or you can use it to, for example, have a decentralised IPFS Pinner solution, where you broadcast the IPFS hashes you need to pin, together with the payment to make that affordable :stuck_out_tongue:

I am pretty sure you can do it for thousands of other valid reasons, usually is to remove the data storage from the blockchain to another storage, with IPFS immutable. (tamperproof is a quick example)

When you say blockchain you are talking about ethereum? or exactly blockchain if that could you send me a link to read more about how we use blockchain, any libraries or documenttaion?
Because I just learned ablut ethereum and IPFS. Thanks!

I am referring to Ethereum or Bitcoin as IPFS can be used for both, but Ethereum provides more use cases! (due to the lack of “smart contracts” in the Bitcoin blockchain)

One of the main reasons I see (coming from Ethereum perspective) is that it is significantly cheaper to store a file on IPFS (even when FileCoin comes into existence, if it isn’t already) than it is to store the same file on the Ethereum blockchain. Don’t quote me on this, but I seem to remember storing a megabyte on the Ethereum blockchain would have cost some huge amount of money. It’s even worse now that Ether price is so high. Store a hash to an IPFS stored file is way cheaper.

2 Likes

Has someone written an app for this? IPFS with blockchain seems like a more useful variety of social media interface.

Hi @Jacob, please refer to this GitHub repo: https://github.com/kggp1995/IPFS-Ethereum-Storage
And this: https://github.com/kggp1995/ethereum-ipfs

Gives a basic picture of how the ETH interacts with IPFS… Flow and Data, both :slight_smile:

1 Like

I made a demo at work few months ago, and it is using both IPFS API and Ethereum here:

It is still WIP and left alone as it was done for an event.

2 Likes