Pages:
Author

Topic: How Can/Do You Store Files on a Blockchain? (Read 850 times)

brand new
Activity: 0
Merit: 0
November 18, 2018, 10:37:22 AM
#42
It's important to make the distinction between storing actual files and the ability to write 80 arbitrary bytes to the OP_RETURN. To utilize the blockchain to store a pdf would require you to create many OP_RETURN outputs containing the raw bytes.  Then when ready to fetch the file you would have to combine all the output OP_RETURN data in order and then compile the raw bytes into an actual usable PDF. It's terribly inefficient and creates outputs that can never be spent, forever littering the UTXO set.
Hi...Need a pm please..
sr. member
Activity: 310
Merit: 727
---------> 1231006505
Is the only possible workaround for these projects to have the Data encrypted or stored separately, and have the blockchain and it's respective ledger work as a Key in the access/decryption of that information.
Well in my opinion it is for public blockchains, the ones where everybody can run a node. However if you are looking at private blockchains you could also store the files itself onchain. It all depends on the use case if you ask me.
legendary
Activity: 1554
Merit: 2037
I fully admit I'm out of my depth, when it comes to the nuances of file sizes and blockchain capabilities. After reading through this though, it seems to me that 99% of the real world applications people want to adapt blockchain technology for are doomed to fail. That in the end it's original purpose of operating as a ledger for currency/asset exchange is viable.

Some of the ideas i had been curious about where, medical records being stored and accessed in this manner. I've heard pitches of governements trying to use it for census data, or taxation purposes. On top of the original file size it would need to have the option to update/ad further information creating larger file sizes.

Is the only possible workaround for these projects to have the Data encrypted or stored separately, and have the blockchain and it's respective ledger work as a Key in the access/decryption of that information.
full member
Activity: 812
Merit: 108
I don't know about Storing file on blockchain but i wanna add one thing in this as we know blockchain is super secure why not some one invented a drive or memory space which is encrypted by blockchain and works like same as wallet works on private key. It can be more secure feature to store your files because no can access yours files without private key.
newbie
Activity: 36
Merit: 0
Quote
As mentioned here - I have heard of Sia and Storj, but what are the best usecases/approach services for storing files ?
SIA and Storj do NOT store any files in a blockchain themselves. That wouldn't make any sense since it would mean all nodes should have a copy of every single file. Which in turn would mean the blockchain itself could become Petabytes big. Instead, they store smart contracts on a blockchain which describes an agreement between a hoster and a party who needs to store files. Just to be sure files will be stored redundantly on a couple of hosters.

I'm not enough confident about Storj to say there are good use cases but I know for sure SIA is an absolute no go at the moment for a couple of reasons:
  • Storage is limited to 5TB and below 2TB it's way too expensive
  • Smallest size for a file is 40MB, which means you pay for 40MB even if you store a file of a couple of bytes. Backing up a lot of small files is a no-go area
  • You can only restore your files from a computer where you uploaded them from. So if the HDD fails you can't even restore your own "backup"
  • Development team is a bunch of kids who have no idea what they are doing.


Thank you for explaining. I am sure Storj team has some plan in mind on their way, but it is not perfect for the moment. If we presume SSD capacities grow exponentially - I think in some near future file storage is possible on a blockchain.
sr. member
Activity: 742
Merit: 395
I am alive but in hibernation.
I think this is solid answer, IPFS is one of the examples.
Its great that it works even today and you can see great community there.


That is 195.90 USD, not 100,000.00!

ok no $1000 or $100K
Do you think still $195 for an MB is a cheap option?  What about if you need to store a GB then.
It is better to use the technology that is intended for the purpose. Storage is getting cheaper and faster day by day but it is not true for the blockchain.
legendary
Activity: 1904
Merit: 1074
Can you imagine what the Blockchain size would be, if you stored large files on it? Nope, I would rather use a cloud storage

site and then link a URL in the Blockchain to that file. Yes, it will only store the file until the cloud storage site close down, but

you can always move the file when that happens and then re-link the new URL with a new transaction on the Blockchain.  Roll Eyes
sr. member
Activity: 310
Merit: 727
---------> 1231006505
Quote
As mentioned here - I have heard of Sia and Storj, but what are the best usecases/approach services for storing files ?
SIA and Storj do NOT store any files in a blockchain themselves. That wouldn't make any sense since it would mean all nodes should have a copy of every single file. Which in turn would mean the blockchain itself could become Petabytes big. Instead, they store smart contracts on a blockchain which describes an agreement between a hoster and a party who needs to store files. Just to be sure files will be stored redundantly on a couple of hosters.

I'm not enough confident about Storj to say there are good use cases but I know for sure SIA is an absolute no go at the moment for a couple of reasons:
  • Storage is limited to 5TB and below 2TB it's way too expensive
  • Smallest size for a file is 40MB, which means you pay for 40MB even if you store a file of a couple of bytes. Backing up a lot of small files is a no-go area
  • You can only restore your files from a computer where you uploaded them from. So if the HDD fails you can't even restore your own "backup"
  • Development team is a bunch of kids who have no idea what they are doing.
newbie
Activity: 36
Merit: 0
We know blockchain is not only limited to cryptocurrencies. But how exactly do you store files, say a one page pdf, in a blockchain? Especially without using any third-party services like IPFS.
Are you asking about how to abuse the blockchain? lol.
You should not!

Abuse? Clearly you should read more. File storage is one of the best usecase for blockchain, and there's already a lot of sites/services that provides it.

As mentioned here - I have heard of Sia and Storj, but what are the best usecases/approach services for storing files ?
newbie
Activity: 27
Merit: 0
I think this is solid answer, IPFS is one of the examples.
Its great that it works even today and you can see great community there.

Sorry, but that is just not entirely true.

First of all, storing a hash is not storing the file. The OP specifically asked for storing a file and not just recording it's existence. What if someone wants to store a file that will be there even if all his computer equipment is destroyed?

Also, you can save all those files on the Blockchain fairly cheaply - no 100,000$ needed.

1 MB data can be split up on 8192 1-of-3 transactions using 2*64 byte from the second and third public key.

I am not sure how much overhead comes with each of those ... let's say it's 300 byte per transaction to calculate easier. That would make the 8192 transactions a total size of 2,4MB including overhead. Currently, 0.00001 BTC/kB is enough to get your TX confirmed. That would be 0.024576 BTC to store your 1 MB file incl. overhead.

That is 195.90 USD, not 100,000.00!

We are trying to run a project which every member will have about 500mb or 1gb files. Is it possible to store on blockchain?
or can you give some advice how to store every big files of members anonymously?
legendary
Activity: 1260
Merit: 1168
I think this is solid answer, IPFS is one of the examples.
Its great that it works even today and you can see great community there.

Sorry, but that is just not entirely true.

First of all, storing a hash is not storing the file. The OP specifically asked for storing a file and not just recording it's existence. What if someone wants to store a file that will be there even if all his computer equipment is destroyed?

Also, you can save all those files on the Blockchain fairly cheaply - no 100,000$ needed.

1 MB data can be split up on 8192 1-of-3 transactions using 2*64 byte from the second and third public key.

I am not sure how much overhead comes with each of those ... let's say it's 300 byte per transaction to calculate easier. That would make the 8192 transactions a total size of 2,4MB including overhead. Currently, 0.00001 BTC/kB is enough to get your TX confirmed. That would be 0.024576 BTC to store your 1 MB file incl. overhead.

That is 195.90 USD, not 100,000.00!
newbie
Activity: 56
Merit: 0
Now imagine using that kind of technology on other day to day transactions from buying and selling of assets (real estate, stocks) to the government's activities it will give you more transparency on your deals and their actions. Someone will input/execute the transaction and everybody can look it up in the blockchain. Just think of it as an tamper proof online ledger where once you successfully inputted a data it can never be change or altered inside the chain.
OP wanted to store a PDF, at $1000 (today) to $100,000 (last December) per MB, that's rediculously expensive to do.
What you can do, is just store the hash of the file. This proves the file existed at the moment the hash was stored, and can't be altered anymore.
Dooglus did this to store Bustabit's hash here.

I think this is solid answer, IPFS is one of the examples.
Its great that it works even today and you can see great community there.
legendary
Activity: 1260
Merit: 1168
It's important to make the distinction between storing actual files and the ability to write 80 arbitrary bytes to the OP_RETURN. To utilize the blockchain to store a pdf would require you to create many OP_RETURN outputs containing the raw bytes.  Then when ready to fetch the file you would have to combine all the output OP_RETURN data in order and then compile the raw bytes into an actual usable PDF. It's terribly inefficient and creates outputs that can never be spent, forever littering the UTXO set.

You could also store them in the 2nd and 3rd public key of a 1-of-3 multisignature output script and spend these outputs whenever you like Smiley
legendary
Activity: 1442
Merit: 1186
It's important to make the distinction between storing actual files and the ability to write 80 arbitrary bytes to the OP_RETURN. To utilize the blockchain to store a pdf would require you to create many OP_RETURN outputs containing the raw bytes.  Then when ready to fetch the file you would have to combine all the output OP_RETURN data in order and then compile the raw bytes into an actual usable PDF. It's terribly inefficient and creates outputs that can never be spent, forever littering the UTXO set.
newbie
Activity: 27
Merit: 0
sure we can store files on blockchain, but it will be very inefficient and bloated in size
it would be better to have a blockchain for storing "references" to actual file location
the file can be stored in multiple locations, and the blockchain serves as a pointer to them
I'm thinking of "napster meets blockchain", we have distributed file sharing and then blockchain to keep all valid references

I like this idea
We have a new project and it is necessary to store files on blockchain, we are not at that stage but it is good to know that we have some options Smiley
copper member
Activity: 85
Merit: 122
If storing file in blockchain is so expensive then all the altcoin developers are scamming by telling that there project aims to put documents in Blockchain ?
Either that, or they mean something else, or they innocently believe it's possible, but haven't really tried. I always roll my eyes when a new client comes in with an idea to create a social network on blockchain, with photos and pictures and video etc.

Remember, objects in the blockchain are stored by the whole network. If you want to store some data, it must now be propagated to all thousands of full nodes and stored by them indefinitely. So the high price of doing that is justified.

Quote
or it is feasible to create a different flavor of blockchain that is capable of storing large volume of data?
Decentralized storage is better, see the projects mentioned above. You can just pay 50 people to store the file for you (much cheaper), then put a file's hash on the blockchain as a proof-of-existence, proof-of-sequence, or a pointer. Nodes interested in getting this information will ask around, and the storage providers will give them the file.

We're already suffering from enormous blockchain sizes and low throughput. Don't try to make our lives even harder. Hopefully, breakthroughs in technologies like sharding and Lightning Network will help with some of these issues.
member
Activity: 169
Merit: 18
Look like , I am late on this discussion but I read the whole thread.

If storing file in blockchain is so expensive then all the altcoin developers are scamming by telling that there project aims to put documents in Blockchain ?
or it is feasible to create a different flavor of blockchain that is capable of storing large volume of data?
newbie
Activity: 23
Merit: 0
We can store files, or anything on blockchain definitely. But one you should also consider is the usage of blockchain. Why storing such a document on blockchain is good, considering its cost and its benefits are drawbacks are important too.
newbie
Activity: 16
Merit: 0
> Blockchain is a source of truth.
> Bitcoin's blockchain is for made for recording transactions, not random messages.
> Blockchain can be used for storing other types of messages. For instance, one common use case is to do voting.
> Storing any arbitrary data on blockchain would simply not scale
member
Activity: 168
Merit: 47
8426 2618 9F5F C7BF 22BD E814 763A 57A1 AA19 E681
There was a project called freenet that attempted a decentralized network to store files there, im not sure if it died or not but that may make more sense that using a blockchain.
Freenet is not died. It don't use the blockchain, it is a totally different approach more similar to a decentralized caching. It is very cool and there are a lot of plugins take a look at this simple guide
http://freesocial.draketo.de/index_en.html
This is tutorial is designed for anyone who wants to use Freenet primarily for anonymous and censorship-resistant social networking and truly private email.
Pages:
Jump to: