I'm interested in integrating IPFS and Ethereum, i.e. by putting metadata in the blockchain / contract, and underlying assets in IPFS.

Has anyone done any work bridging the two? The only way I can think of doing it is to write a nodejs server that makes web3 calls and also simultaneous IPFS api calls - but there is no 2-phase commit between these.

1 Answer 1


What I've done in a previous project is simply to add the data to IPFS first then send the Ethereum transaction with the IPFS hash of the newly-created content once that appears to have happened correctly. In some circumstances if something goes wrong before the Ethereum transaction completes this will leave "orphan" data in the form of newly-created content stored on IPFS with no reference to it on the blockchain, but that was OK for my purposes; The blockchain records were still pointing at some old data, and that old data was still there, so I still had a consistent view of the data.

The wrinkle is that since (IIUC) IPFS doesn't guarantee that data is actually stored anywhere in particular, I'm not how you would define "this data has been successfully stored on IPFS"; Depending on your needs you may not be satisfied with the node you're sending it to saying, "OK, I've got it", as if that node failed you could still lose it.

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service, privacy policy and cookie policy

Not the answer you're looking for? Browse other questions tagged or ask your own question.