[Ethereum] nything stopping me from using the ethereum blockchain as data storage

contract-designSecuritystorage

As I understand it, smart contracts are currently immortal by default. Does this mean that I could create a contract that happened to contain an encoded form of baby photos and have it stored forever? If not, what prevents it?

Best Answer

Nothing prevents it. 5 months ago, I demonstrated storing audio (a very highly compressed mp3 file) in the blockchain. And it's still there and being replicated by every full node today! Only 3.5kB and I had to pay quite a bit of ether, but still cool!

Check out Freakiest thing ever - the blockchain now has a voice! thread at Reddit.

To make this answer last the test of time (if something happens to the above link), here is the relevant command to run in your terminal:

geth --exec "eth.getTransaction('0xbb8ee9866ee67277986b6f40775469c7a674810ce99dce3caff0d1117c8dcdac').input" console | xxd -p -r | mpg321 -

A smarter way uses the storage only as a hash as other answers have said, use StorJ, IPFS, etc., because then you can store more off the blockchain and link to it.

Related Topic