How is IPNS supposed to work for a new node?

After reading and practicing a lot with IPNS (starting from the doc), I wonder how ipns resolution is supposed to be working in the context of a new node joining the network.

Suppose we have peer A who published an IPNS record K on the DHT. With the default kubo config, it will republish this record every 4 hours.

Then a peer B comes and has A in its direct peers. If it tries to resolve K, it gets Error: could not resolve name. Is it normal behavior? Should it wait the next republish until it has a chance to resolve?

Can IPNS over pubsub solve this problem? A new node joining the network would not be able to read history of the pubsub topic before it joins, so it would still need to wait the next republish message, right?

What should I do if I want the new nodes joining the network and peering with A to be able to resolve IPNS records in a reasonable amount of time (let say 1 minute)? Is increasing the republish rate the way to go? Should I implement another mechanism on a pubsub topic to ask nodes to republish their entries?

Using dnslink is not an option here since it would need to edit DNS records regularly.

If you use Kubo, setting up Peering + enabling IPNS over PubSub is what you want if you need to speed up IPNS resolution and make it independent of Amino DHT (which will still be used as backup).

IPNS over PubSub adds persistence on top of pubsub topic, when you join you will get the latest record even if it was published before you joined, as long someone else is on the topic. It does not have to be original published because record is signed (details in specs).

You can enable it in Kubo via Ipns.UsePubsub flag.

1 Like