Blockchain + IPFS = ❤
By this point I’m sure we all have a general understanding of the blockchain. So this post will assume you know the very basics of the blockchain and how it works. But I’ll refresh your brain because you’re already here! Blockchain consist of blocks chained together. One block holds certain information, that information being, the previous block’s hash, its own hash, a time stamp and data. Thats all you need to know for this post.
As many are aware or have heard, Blockchain transactions are SLOW!!!!! To understand how slow take this into perspective. Visa can process 24,000 transactions per second while Bitcoin can process 4–7 transaction per second (it can and at times is much slower). You may wonder why does this happen? Well for starters Bitcoin’s current Proof of Work doesn’t allow for lighting speed transactions as this would jeopardize the integrity of the chain. However what slows the network down is the massive amounts of data that each block holds. This is where IPFS kicks in!
IPFS stands for Interplanetary File System and this will indefinitely change the future of blockchain. IPFS is a versioned file system that takes files, manages files, stores these files, tracks the changes(versions) over time and even tracks how these files are shared. IPFS works similarly to HTTP. Just as we would need to go to facebook.com to get to facebook, you would go to the file that you wish to see. So the address is based on the content.
How does this work you may ask? To explain this is a sentence or two, IPFS takes a file, creates a unique hash for that file. This hash can now be used as a “url” to see that file. The address of the file in IPFS starts with the hash which points to a root object and all of that root object’s versions. Even simpler, imagine a P2P network like Bittorrent. First, we must identify the file the file you need with that file specific hash, then we ask our network who has this file I am looking for. If someone has it then you now connect and download the file.
But blockchain is all about safety and this seems sketchy!?! Hold your horses, theres something called Encryption! Asymmetric encryption gives us the ability to restrict who can access our file. To do so one would encrypt a file with a public key(the public key being the recipient or recipients). The receiver is only person with their public key, so they can now decrypt the file and view it.
How does this help blockchain?
Well as we stated before the blocks contain hashes and data. We can now store the hash of the IPFS file instead of the data itself! Holy Moly !! We keep the most crucial and necessary data on the blockchain but we can now have large files but still enjoy the benefits of decentralization! It’s better than having your cake and eating it because you are given your freedom and enjoying it as well!