Skip to content

feat: add ipns reproviding #764

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

Draft
wants to merge 5 commits into
base: main
Choose a base branch
from
Draft

feat: add ipns reproviding #764

wants to merge 5 commits into from

Conversation

2color
Copy link
Member

@2color 2color commented Mar 13, 2025

What

This PR adds the functionality necessary for a Helia node to reprovide records it created before expiry.

Why

Currently, the ipns.republish method which runs the republishing loop does not actually handle republishing.

How

  • Add the the ability to iterate on records in the data store.

Open question about storing keys

  • We don't store the private key when publish is called. This means that we can only reprovide valid IPNS records, but with the current defaults (48 hour lifetime and 23 hour republish interval), that means one round of republishing, after which all stored IPNS records become invalid.
    -This begs the question of whether we should store the keys so that we can create new valid records for stored IPNS names.
  • After looking at how we manage the self key for the libp2p peer we create, it seems like we probably want to add the keychain. The question then is whether to add the keychain to the Helia interface or just the IPNS module.
  • Adding a keychain would allow us to iterate on keys rather than IPNS names when republishing. Though I'm not sure if there's any obvious benefit to this.

publish(key: PrivateKey, value: CID | PublicKey | MultihashDigest<0x00 | 0x12> | string, options?: PublishOptions): Promise<IPNSRecord>

2color and others added 5 commits February 24, 2025 13:45
* origin/main:
  chore: use peer id parsing function from libp2p (#762)
  feat: add republish signed ipns records (#745)
  fix: use bytestream methods to add byte streams (#758)
  chore: bump codecov/codecov-action from 5.3.1 to 5.4.0 (#752)
  feat: allow modifying trustless-gateway fetch (#751)
  fix: align implicit default ttl with specs (#749)
  docs: add spell checker to ci (#743)
  chore: Update FUNDING.json for Optimism RPF (#746)
@2color 2color changed the title feat: add ipns republishing feat: add ipns reproviding Mar 26, 2025
@2color 2color added kind/enhancement A net-new feature or improvement to an existing feature status/blocked Unable to be worked further until needs are met labels Apr 4, 2025
@2color
Copy link
Member Author

2color commented Apr 4, 2025

I'll wait for feedback from @achingbrain regarding key storage and the necessity of the keychain (see PR description).

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
kind/enhancement A net-new feature or improvement to an existing feature status/blocked Unable to be worked further until needs are met
Projects
None yet
Development

Successfully merging this pull request may close these issues.

1 participant