I can hardly create transactions larger than 100kiB. I am wondering, is it possible to store huge files (several MiB or GiB) on the blockchain?
If so, how?
blockchainipfsstorageswarm
I can hardly create transactions larger than 100kiB. I am wondering, is it possible to store huge files (several MiB or GiB) on the blockchain?
If so, how?
Best Answer
No, you will have to store your data somewhere else and store the hash of this data and its location in the blockchain. You should have enough space to store it but remember the shorter your data is the less gas you need. So use URL shorteners.
Storing data into a transaction costs gas an blocks have a dynamic gas limit. You would have to make the gas limit raise by sending bigger and bigger data to force the network to adapt. But on each transaction you would be limited to a fixed amount of gas and thus a fixed amount of data. On feb 2016 the gas limit was about 3 millions, meaning a block was limited to about 89Kb of data. (see Is there a limit for transaction size? ) :
As of writing, gas limit is about 4712388 gas which should limit data to about 140Kb. See https://ethstats.net/
Soon we expect some decentralized secure storage like swarm or IPFS to be easily usable. Look at https://github.com/ethereum/go-ethereum/wiki/Swarm---distributed-preimage-archive where you will also find a list of alternatives at the end of the page.