helia
helia copied to clipboard
feature request: `@helia/ipns` republish specific existing records
I want to add a republish method to the IPNS interface that would take a routing key and an existing IPNS record and republish it regularly to keep it in the DHT until it expires or IPNS.unpublish is called for that routing key.
Adding the method is needed to specify which external records (a record where the publishing private key is not local) in the localStore should be republished.
The IPNS.republish would do something like:
- check the routing key matches the record - throw if verification fails
- check the record expiry - throw if expired
- immediately publish to routers with option: { republish: true }
The republish option is read by the localStore to add a separate republish key, like the metadata key, to the datastore along with the Record.
Type Signature:
(key: CID<unknown, 0x72, 0x00 | 0x12, 1> | PublicKey | MultihashDigest<0x00 | 0x12> | PeerId, record: IPNSRecord): Promise<void>
Triage notes
- this feature request feels like a prerequisite for a similar to feature request to "be able to pin /ipns/name" (https://github.com/ipfs/go-ipfs/issues/1467)
- first step is to have orchestration to periodically resolve record and keep latest version
- detect when there are no providers and re-publish last version you have, as long its not expired
- this is where this feature would bring value
- then, regular pinning behind a CID