-
Notifications
You must be signed in to change notification settings - Fork 1.1k
IPNS over pubsub loses resolve after 24 hours #996
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
Comments
This is really a go-ipfs issue and not go-libp2p (IPNS is not a libp2p component, but one that lives in IPFS land), so I'm going to close this issue (unfortunately AFAIK GitHub won't let you transfer issues between orgs) and if it's still relevant feel free to reopen a new one in go-ipfs.
As described in the spec https://github.com/ipfs/specs/blob/master/IPNS.md, the TTL recommends how long the record should be considered "fresh" for (i.e. no need to requery the DHT for updates) while the lifetime is about how long the record should be considered "valid" for (e.g. if you were prevent by a malicious party from getting IPNS updates how long could a user go without being prompted that something fishy was happening).
Yes and no. Yes, you could just set the Lifetime to be very long. No, this won't really work until ipfs/kubo#7537 is fixed (or you set the IPNS republish times on your node to be super long). See ipfs/kubo#7572 for links tracking the IPNS todo list (as well as the issues they stemmed from) |
Hi @aschmahmann, Thank you for your reply! One question though.
Would adding a new ipfs key that is shared between my local node and my always-online-node work too? Does that mean that both nodes get to be the "owner" and only one of the two needs to be online for the ipns renewal after 24 hours? |
@markg85 probably if you ensure that only one of them is publishing at a time and they're in sync, but no guarantees. IPNS can get unhappy when there are multiple publishers using the same key. So my answer is "maybe, but it's unsupported behavior if it happens to work". |
@markg85 I mispoke about the ramifications of ipfs/kubo#7537.
This is actually about setting the IPNS Lifetimes (https://github.com/ipfs/go-ipfs/blob/master/docs/config.md#ipnsrecordlifetime) to be super long, which may actually work out ok for your use case. |
@aschmahmann That's great! Pun intended :P Am i right in assuming that IPNS currently only works properly if the |
@aschmahmann to confirm your suspicion. It's now been (much) more then 24 hours since my local node was online. Resolving the IPNS is now indeed impossible. |
@markg85 having a long life time is actually the correct approach here, it's just that the mechanics of using it are off (e.g. there should be an easy way to track keys that you're following and publish updates to them as long as the keys are allowed to be alive). By the way go-ipfs v0.7.0-rc1 is out and fixes ipfs/kubo#7537 |
Well, if you explain it that way, it sure does make more sense to me. But lets go into details a little to make it crystal clear! So, i should see this as: Continuing that reasoning, if i "register" a name with Now the interesting bit comes with the In this whole setup it's apparently the intention to have 1 party (or rather, 1 private key) be able to update the lifetime. And have any number of nodes tell you how fresh a IPNS is (and those obviously know the lifetime too). A IPNS name is therefore online/accessible as long as there is any node alive that can verify it's alive. The TTL would be neat too but won't even prevent it from being alive. I'm having difficulties explaining the TTL stuff but if i mentally compare IPNS with registering a domain and considering the TTL setting as the DNS entries within a domain (where you set a TTL) then i think i get it. I think the best short term thing to improve with IPNS is the case where you use a shared key to do the publish. As that currently seems broken. If that were to be working it would already be much less of an issue to keep an IPNS online in it's default settings. As then you could have a normal developer setup (a local sometime online node) with a shared key to a remote (always online node). As for the 0.7.0 RC. Awesome! :) |
Hi,
I'm using IPNS over pubsub which works wonderfully!
But just for 24 hours, or so it seems.
Which is confirmed by looking at
ipfs name publish --help
where the-t
option states:(i don't get why there's also a
--ttl
option.)In this case i had just a site without any other people knowing about it. I had published it using my local node, which is hardly ever online, only when i'm developing something. I have another node in vultr somewhere that also does name resolving on anything i publish locally. I did this in hopes that this little trick would keep the IPNS record alive in pubsub as now another host has it besides my local (often turned off) node.
But this appears not to be the case. If my local node is offline for 24+ hours then the remote node can't resolve the IPNS name anymore.
Is there a way to keep the IPNS record alive without the need of periodically firing up the node that did the initial
ipfs name publish
?Cheers,
Mark
The text was updated successfully, but these errors were encountered: