Best practice to save files in blockchain

后端 未结 2 353
佛祖请我去吃肉
佛祖请我去吃肉 2020-12-30 12:50

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 (cen

相关标签:
2条回答
  • 2020-12-30 13:02

    It depends (of course!) on what your objectives are. If all the participants in the blockchain have access to something like Dropbox, or the access is provided by the blockchain, then storing the data is fine there. You would simply store a hash of the file in the blockchain such that anyone retrieving the file will be able to verify that the file is valid. You could use IPFS or Google Drive or any other mechanism to share the data as long as the access control mechanisms are adequate for your use case. If additional privacy is needed you could store the file in encrypted form and use the blockchain to provide decryption keys to authorized users on demand. This is often referred to as off chain storage and is a common design pattern.

    0 讨论(0)
  • 2020-12-30 13:03

    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.

    0 讨论(0)
提交回复
热议问题