As described above, yes.

However, if you don’t want to have to keep the file, you can pre-compute combinations of nonce, byte-range, and hash. Store these sets in a much smaller file, and then use the next one from the list to challenge the provider.

So for example, say you want the provider to be able to prove storage once a week for a decade. You’ll need ~600 tuples of nonce/byte-range/hash. Each of these records would take roughly 128 bytes to store. 128 x 600 = ~77Kb.

Thus for a decade of weekly storage proofs, you need to store less than a tenth of a megabyte per file.

Note that this storage requirement is completely independent of the file size. So it may be advantageous to combine related files together into an archive (zip) so that you need only pay the tuple storage cost once.

Each tuple should be used only once. So if you’re planning to have multiple suppliers, you’ll want to multiply by that number when precalculating.

Reply to this note

Please Login to reply.

Discussion

Yes thank you very much. This is exactly the kind of mechanism I was thinking about. So basically you’ll need a really small« backup » in order to challenge your storage provider, and you could even imagine a penalty system (Lightning inspired) if the provider fails to provide the proof after you paid him.

So this leads to my second question: do such systems already exist, or are they discussed ? And could nostr/Lightning lead to it ?

Definitely possible to do.

For example, the storage provider could listen on Nostr for "proof of storage" requests.

The client (who originally sent the file) could send a challenge every 24h using the scheme above. When answering the challenge, the provider can also sent a BOLT11 invoice, covering the cost for the next 24h. If the client pays it, the provider keep storing it. If the client fails to pay, the provider can delete the file after some grace period.

In a sense, the client is "paying by the day".

Yep the client could choose many providers to replicate the data, and if one storage provider fail, the protocol automatically choose another to reach the desired goal of replication.

Thus any pleb could find usage for the unused disk space of their always on computers like raspberry Pi etc...

The only obvious flaw that I see here is that it would be difficult to be sure that your replicated data are effectively stored by distinct people, particularly if some big institutional actors enter the market

I would guess that providers who themselves use third-parties for their storage would be priced out. Providers who use their own storage would be able to charge less.

Right. I think also there’s a BitTorrent tie-in here. Pay-to-seed. This would accelerate re-downloading the content later since your BitTorrent client can concurrently pull from all seeders.

In fact, BitTorrent already has mechanisms for pulling ranges of bytes and checking them. I’m not sure exactly how it works, but it may be a good platform to build on.

Is there a library that does this?

nostr:npub1mxrssnzg8y9zjr6a9g6xqwhxfa23xlvmftluakxqatsrp6ez9gjssu0htc , nostr:npub1vadcfln4ugt2h9ruwsuwu5vu5am4xaka7pw6m7axy79aqyhp6u5q9knuu7 : do you know any library that can do this sort of challenge response protocol? "Proof of storage" is probably a good way to describe it, but I'm not sure.

I'd like to build something on top, but would very much prefer if the crypto primitives are already taken care of.

I don’t know of a library, but it’s also not too difficult to roll from scratch. The only crypto primitive is the hash function, for which one could use any off-the-shelf SHA256 implementation.

I think filecoin does something similar where you more or less get paid to provide merkle inclusion proofs.

I’ve been thinking about building a “pay for file storage with lightning” system using Carbonado because it uses bao hashing under the hood so it’s already in a hash tree. That might be the way to go.

Yep would be better indeed to incentivize through real hard money rather than shitcoining even if the initial idea of a native currency for such a network could make sense at first. But as all centralized project it has been done badly and I think Bitcoin will fix it eventually. There may be a way to monetized empty disk space, as excess of energy is monetized by mining.