Skip to content
New issue

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

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

Already on GitHub? Sign in to your account

idea: pin through ipns names #97

Open
jbenet opened this issue Jan 13, 2016 · 5 comments
Open

idea: pin through ipns names #97

jbenet opened this issue Jan 13, 2016 · 5 comments

Comments

@jbenet
Copy link
Member

jbenet commented Jan 13, 2016

(old idea. document cause i cannot find it elsewhere) pins on ipns names would pin the name and it's target. So re-targetting the name would orphan the previous content, for gc to free.

eg:

ipfs pin add [-r] /ipns/$name
# at this point, $name is pinned recursively. but say it points to nothing. 

ipfs name publish /ipns/$name /ipfs/$content1
# /ipfs/$content1 is pinned indirectly

ipfs name publish /ipns/$name /ipfs/$content2
# /ipfs/$content2 is pinned indirectly
# /ipfs/$content1 is no longer pinned indirectly

ipfs repo gc
# /ipfs/$content1 is freed
@fazo96
Copy link

fazo96 commented Jan 14, 2016

this is extremely important for use cases when an ipns name is updated very often.

@whyrusleeping
Copy link
Member

whyrusleeping commented Jan 14, 2016

@jbenet thoughts on having a 'link' type object in unixfs that would reference an ipns entry, but also cache the resolved value until an explicit 're-resolve' is called?

Or something along those lines

@whyrusleeping
Copy link
Member

whyrusleeping commented Jan 14, 2016

i realize without my thought process that might seem off topic. I'm thinking that we could link to ipns entries within a unixfs directory, and use that for pinning. You could then 'update' the pin explicitly, which would update the cached value, and change the dag

@jbenet
Copy link
Member Author

jbenet commented Jan 15, 2016

yeah i imagine we will have to do ipns links within ipfs objects eventually. part of why i pushed for links to be proper full links (with the scheme).

and yes we likely can make ipns links be stored with a resolution at a given time. so a somewhat merkelized property still holds-- when the resolution changes, it still bubbles to the top changing the root.

@jbenet
Copy link
Member Author

jbenet commented Jan 15, 2016

(it's storing "pointer" + "current value")

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

No branches or pull requests

4 participants