-
Notifications
You must be signed in to change notification settings - Fork 97
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
feat(ipns): refactored IPNS package with lean records #339
Conversation
cacef8e
to
f94e941
Compare
Codecov Report
@@ Coverage Diff @@
## main #339 +/- ##
==========================================
+ Coverage 50.58% 51.19% +0.61%
==========================================
Files 281 280 -1
Lines 34043 33442 -601
==========================================
- Hits 17220 17121 -99
+ Misses 15033 14589 -444
+ Partials 1790 1732 -58
|
5ce23fc
to
a451ade
Compare
2c25a73
to
11f817f
Compare
Kubo doesn't build (#339) because it depends on the old delegated routing package (https://github.com/ipfs/go-delegated-routing) because it still supports the wonders of Reframe. Either we fix that package to support this new IPNS package, or (preferred) we completely remove the dependency in Kubo, removing Reframe. Another option is to simply keep the name of the function |
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.
@hacdias my understanding is that IPNI no longer uses Reframe endpoints (ipfs/kubo#9823 (comment)), they ask their users to set up /routing/v1
integration, so we can finally remove all Reframe things.
- some feedback/questions inline
8bf25bd
to
f165191
Compare
@lidel I also just discovered we have a |
ec9d1bd
to
825deb7
Compare
Re Notes from 1:1:
|
5405b7a
to
eec505b
Compare
@lidel suggestions implemented |
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.
Thanks! Mostly lgtm, some cosmetic changes inline.
Next steps:
- IPIP that documents this, so we can do the same in js-ipns (not a blocker)
- some interop test between boxo/ipns and js-ipns explicitly doing V1+V2 and V2-only – unsure where it should live, https://github.com/ipfs/interop/blob/master/test/ipns.js ?
Not sure if that's a blocker or not, but the interop tests you linked are for |
d5e141e
to
c5a71fa
Compare
Yes, I would block this PR on js-ipns doing the same default + being able to validate the default output. V2-only is opt-in in Kubo, but @hacdias I think we will have less headache if we do what we did in Kubo, and keep this library producing V1+V2 by default like it did before, and making V2-only opt-in for now. The goal here is to allow existence of V2-only, not make it default output of the library. func processOptions(opts ...Option) *options {
options := &options{}options := &options{}
// TODO: produce V2-only records by default after IPIP-TODO ships with Kubo and Helia for at least 6 months
options.CompatibleWithV1 = true Once we have IPIP, and implement it in JS, and once we have support for validating V2-only everywhere for a while, then we will make it default, but for now let's keep producing V1+V2. If we do that, then we can land this PR without waiting for IPIP, as we don't change the default behavior. |
@lidel I have updated this PR to produce V1+V2 by default (and adapted tests). Kubo PR updated to run with latest code. I can take care of |
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.
Thanks @hacdias! I think technically it is ready.
Small nits in comments inline, but once addressed, feel free to merge and bubble up to ipfs/kubo#9932 when you feel Kubo is ready 🙏
ps. I think in cases like this, when we have 40 files modified, fine to just add commits to PR, you dont need to rebase and force push. Smaller deltas make it easier to review too – we then squash at the end during merge.
Closes #335. Progress towards ipfs/specs#376.
go-ipns
, which was causing problems with thenamesys
tests.