Skip to content
New issue

Have a question about this project? # for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “#”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? # to your account

Immutable Dat link #976

Closed
aaronshaf opened this issue Apr 13, 2018 · 9 comments
Closed

Immutable Dat link #976

aaronshaf opened this issue Apr 13, 2018 · 9 comments

Comments

@aaronshaf
Copy link

Is it possible to link to a Dat version of content that is immutable?

@mafintosh
Copy link
Contributor

You can make a versioned link, dat://{pubkey-or-host}+{revnum}/ - a versioned link is basically a readonly snapshot of a dat in time. is that what you need?

@dhimmel
Copy link

dhimmel commented Apr 18, 2019

But what prevents the content associated with the revnum from being changed? Is it possible to also add a checksum to ensure version history hasn't been rewritten?

@RangerMauve
Copy link
Contributor

@dhimmel If somebody decides to have diverging history it'll "corrupt" their Dat and they won't be able to write to it or realistically sync with the network.

I think there was some talk of adding a hash to the URL though. Can't find the link offhand.

@RangerMauve
Copy link
Contributor

I think this? https://github.com/mafintosh/dat-link-checksum

@dhimmel
Copy link

dhimmel commented Apr 19, 2019

Thanks @RangerMauve for the info. I'm new to Dat, so I've got a few more questions. Correct me anywhere I'm wrong.

If somebody decides to have diverging history it'll "corrupt" their Dat and they won't be able to write to it or realistically sync with the network.

My understanding is that appending to a dat requires access to the private key. So the only actors that can create diverging histories are ones with the private key. Let's assume the only person with the private key is the owner / creator.

Rewriting history only "corrupts" the dat in that other nodes may refuse to accept the rewritten history, but only if those nodes have mirrored the public key? Let's assume only the owner is hosting their public key, then they could rewrite history without causing any sort of divergence?

Back to the envisioned use case of the original poster, it could be helpful to be able to link to a specific revision number with a content-derived checksum to ensure integrity.

I think there was some talk of adding a hash to the URL though. I think this? https://github.com/mafintosh/dat-link-checksum

It seems to me that dat-link-checksum by @mafintosh is for adding a checksum to the public key to ensure it hasn't gotten munged. It doesn't have anything to do with checking the content associated with a specific revision.

@RangerMauve
Copy link
Contributor

Let's assume only the owner is hosting their public key, then they could rewrite history without causing any sort of divergence?

Yes, if nobody has a copy of your data in the world, you can set the data to anything you want

... is for adding a checksum to the public key

Sorry, I got the wrong link. The hash of content thing is called "Strong Links" https://github.com/mafintosh/hypercore-strong-link

@millette
Copy link

@dhimmel See also this old comment (and thread): https://github.com/datprotocol/discussions/issues/7#issuecomment-352868518

@cblgh
Copy link

cblgh commented May 12, 2019

also related is @jwerle's work expanding on hypercore-strong-link: dat-deep-link

@okdistribute
Copy link
Collaborator

related #985

# for free to join this conversation on GitHub. Already have an account? # to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

7 participants