-
-
Notifications
You must be signed in to change notification settings - Fork 3k
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
Ability to pin ipns names #1467
Comments
I've been thinking a little bit about this recently, and what my current train of thought is, is that once we implement pub-sub, updating an ipns entry will be a 'publish' that people can subscribe to, so they can be notified of every time it gets updated and then update the pin. |
@whyrusleeping is it planned for the pin command to take an IPNS name and automatically pin the address pointed by the name and automatically unpin the old adress and pin the new one when the record is updated? I think this has many usecases and should be taken into consideration, not sure about how hard it would be to implement but it doesn't look like it would need much except pub/sub. |
@fazo96 yeah, something along those lines is planned. The issue is when to check for updates, its either polling or pubsub, and I really am not a fan of polling. |
Right now when I try to pin IPNS path it just.. hangs and needs to be interrupted via Ctrl+C:
At this point it is not possible to pin anything else and I need to restart go-ipfs daemon to fix pinning functionality. I think pinning a valid IPNS address should immediately return an error (
|
Hey. I'm also interested by that. But do you think that pub-sub would be able to solve all the problem by itself ? If I pin an IPNS name, turn my node off and go back 10 days later, my node should do polling to poll for the last version of the content too as it may have missed pub/sub updates. |
Probably related issue: #4435 |
Is it true that trying to pin ipns path currently hangs, and also causes the daemon to not accept more pins, if so could we get a fix in that returns an error instead, or at least a warning? (that would avoid noobs like me spending lots of time wondering why/how pinning works and why it seems to hang) Thanks! |
@NiKiZe pinning is a blocking operation, it fetches the data while holding the pin lock to ensure a garbage collection doesnt come along and wipe out the transfer progress. Because of this, while one thing is being pinned, another can't be pinned in the meantime. We have plans on improving this moving forward |
The pin lock is a read-write lock. This shouldn't be an issue (and I can't reproduce). The bug in question was reported before the pin lock was even introduced. |
@whyrusleeping pointed out that there is a different lock. |
My bad, pinning with /ipns/ seems to work, just (as explained why above) seemingly unresponsive, Thanks and sorry for the noise. (Looking forward to the ability to pin ipns and have it auto update) |
Any progress on this? |
shy bump would very much appreciate this 😅 |
It would be very nice to be able pin IPNS names, such that the daemon periodically polls the DHT to find if there are any new hashes published to the requested names, and then automatically pins them if so.
Depending on the structure of the code (I'm not familiar with Go), this may be a simple matter of creating a new thread to sit in a loop that does
This would make it very easy to use IPFS as a backup solution, either to create a mirror of your website on another of your servers, or to make general backups to a remote machine (e.g. passworded duplicity backups would work quite well here).
Note that there should be some way within the command line syntax to allow the user to include a '-r' recursive pin/unpin option, for distinguishing if the user wants to pin a single node or the entire tree. Possible syntax could be something like ipfs pin name add -r .
The text was updated successfully, but these errors were encountered: