What is the best practice to save files as part of a blockchain's data? I have tremendously large files to be saved.
Can't we save these file on cloud storage (centralized solution like dropbox), and link them with blockchain data using a file hash? Or is it better to use a distributed file storage like IPFS? Or is there any better solution in term of security, volume, performance, and fault tolerance.
Blockchain storage is a way of saving data in a decentralized network, which utilizes the unused hard disk space of users across the world to store files. The decentralized infrastructure is an alternative to centralized cloud storage and can solve many problems found in a centralized system.
Storing a complete document on a blockchain is technically possible, but file size limitations might prevent you from utilizing this strategy. Hashes are smaller in size and therefore a more efficient option to store documents on a blockchain. Every time a document is changed, the cryptographic hash will change.
The intelligent way of storing data is to store the hash of the data in the blockchain. Hash is a generated string, by providing our data as input. The hash of the data is comparatively minimal; thus, the cost is low. The raw data can be stored using a file system as well.
As a database, a blockchain stores information electronically in digital format. Blockchains are best known for their crucial role in cryptocurrency systems, such as Bitcoin, for maintaining a secure and decentralized record of transactions.
You do not want to directly use a traditional blockchain. Blockchains are good for transactional information/state changes, large data storage is generally a bad idea. This is due to the high cost of storing data and security. I would advise to look at another decentralized storage mechanism. The hashing link is something that has been trialed out by a group called MedRec you can look at.
https://viral.media.mit.edu/pub/medrec
Otherwise, IPFS is an option, along with Sia and StorJ. Distributed Hashtables is an area to look into.
https://www.ipfs.io/
https://storj.io/storj.pdf
https://sia.tech/
This field is still new and rapidly developing so standards and the tech are still being set. I would advice reading each option individually and coming to figure out what solution fits your problem the best.
If you love us? You can donate to us via Paypal or buy me a coffee so we can maintain and grow! Thank you!
Donate Us With