Skip to content
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

New feature: republishing of an existing ipns-record #17

Open
agmap opened this issue Feb 21, 2025 · 2 comments · May be fixed by #19
Open

New feature: republishing of an existing ipns-record #17

agmap opened this issue Feb 21, 2025 · 2 comments · May be fixed by #19

Comments

@agmap
Copy link

agmap commented Feb 21, 2025

sending a PUT of an existing ipns-record file to /routing/v1/ipns/{name} for republishing.

@2color
Copy link
Collaborator

2color commented Feb 24, 2025

I looked into this, and this is a little tricky for two reasons:

  1. Importing a record is pretty easy. The problem the public key is not always included in the IPNS record (as per spec https://specs.ipfs.tech/ipns/ipns-record/#public-key-bytes since its typically inlined in the name for ed25519). So the ipns-record file is not enough and you need to pass the name too. The public key is important, because we derive the name from it and also use it to determine the DHT routing key.
  2. @helia/ipns doesn't have an API for republishing just a record. I opened Add ability to republish IPNS records without private key ipfs/helia#744 for this

How to we resolve 1:

  1. Embed the public key when creating the record. This will only fix this for records created with the inspector.
  2. Require the user to also pass the pubkey/name would make the UI more complicated,

@2color 2color linked a pull request Feb 24, 2025 that will close this issue
@agmap
Copy link
Author

agmap commented Feb 24, 2025

Take the PublicKey from the filename of the ipns-record file. It’s always included when I download it with the browser from https://delegated-ipfs.dev/routing/v1/ipns/k5..........gk6r

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging a pull request may close this issue.

2 participants