Join GitHub today
GitHub is home to over 28 million developers working together to host and review code, manage projects, and build software together.
Sign upAbility to pin ipns names #1467
Comments
This comment has been minimized.
This comment has been minimized.
|
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. |
This comment has been minimized.
This comment has been minimized.
fazo96
commented
Nov 27, 2015
|
@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. |
This comment has been minimized.
This comment has been minimized.
|
@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. |
This comment has been minimized.
This comment has been minimized.
|
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 (
|
This comment has been minimized.
This comment has been minimized.
|
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. |
whyrusleeping
added
the
enhancement
label
Aug 24, 2016
timthelion
referenced this issue
Sep 3, 2017
Open
ipfs pin add and dag get hang when passed pin hash #4199
This comment has been minimized.
This comment has been minimized.
|
Probably related issue: #4435 |
lidel
referenced this issue
Jan 8, 2018
Open
Describe how IPFS bookmarks will be handled in browsers #21
This comment has been minimized.
This comment has been minimized.
NiKiZe
commented
Jul 23, 2018
|
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! |
This comment has been minimized.
This comment has been minimized.
|
@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 |
This comment has been minimized.
This comment has been minimized.
|
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. |
This comment has been minimized.
This comment has been minimized.
|
@whyrusleeping pointed out that there is a different lock. |
This comment has been minimized.
This comment has been minimized.
NiKiZe
commented
Jul 23, 2018
|
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) |
reit-c commentedJul 11, 2015
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 .