-
Notifications
You must be signed in to change notification settings - Fork 127
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
base: main
Are you sure you want to change the base?
Conversation
* 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)
I'll wait for feedback from @achingbrain regarding key storage and the necessity of the keychain (see PR description). |
this.log(`found ${recordsToRepublish.length} records to republish`) | ||
|
||
// Republish each record | ||
for (const { routingKey, record } of recordsToRepublish) { |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
We might want to do this in a queue so we can publish multiple records in parallel.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
The queue implementation we use elsewhere in the stack is this one, it has simple concurrency controls, etc.
Following a discussion offline with @achingbrain, we need to move key management internally to implement reproviding. Key management is typically (and store encrypted at rest) handled by the js-libp2p keychain, however we don't have libp2p in |
It'd also be good to see just how lightweight we can make libp2p for this sort of use-case. |
Yeah we could try that first and see how it feels. It may increase the bundle size. I also vaguely remember there being a bug with libp2p whereby instantiating it without the DHT, causes an infinite random walk loop with the defaults, as it's looking for a circuit relay reservation by default. Would this also allow Helia to make use of the libp2p over http stuff you've be working on? |
Looking at the breakdown, the usual suspects are already there -
I'd imagine this configuration wouldn't configure a relay listener so it wouldn't try to find a relay? We need this landing, really - ipfs/specs#476
Yes, though you'd need transports etc in order to use libp2p for the transport layer. |
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
Open question about storing keys
-This begs the question of whether we should store the keys so that we can create new valid records for stored IPNS names.
helia/packages/ipns/src/index.ts
Line 450 in 1e20e38