Logo Questions Linux Laravel Mysql Ubuntu Git Menu
 

Best practice to save files in blockchain

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.

like image 380
Bassel Kh Avatar asked May 17 '18 23:05

Bassel Kh


People also ask

Can you store files on a blockchain?

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.

Can you store PDF on blockchain?

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.

How do I use blockchain for storage?

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.

What kind of data can be stored in a blockchain?

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.


1 Answers

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.

like image 199
Lucas Hendren Avatar answered Nov 09 '22 17:11

Lucas Hendren