-
Notifications
You must be signed in to change notification settings - Fork 95
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
verifcid: introduce and integrate Allowlist interface #407
Conversation
Codecov Report
@@ Coverage Diff @@
## main #407 +/- ##
==========================================
+ Coverage 49.78% 49.80% +0.02%
==========================================
Files 248 249 +1
Lines 29941 29972 +31
==========================================
+ Hits 14906 14928 +22
- Misses 13610 13617 +7
- Partials 1425 1427 +2
|
5c14093
to
ccda271
Compare
@Wondertan can you give me your opinion on 8e41b53 please ? |
1f57332
to
8e41b53
Compare
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.
@Jorropo, I am fond of the simplifications you made! Removal of ValidateCID is neat, and glad you didn't add all the Blake family in the switch case.
I still don't really get the use case you see for the OverridingAllowlist, though. Something like NewOverridingAllowlist(DefaultAllowlist, customset)
?
Would be also nice to add unit test for overriding
Exactly
Yes |
2023-07-11 maintainer conversation: since the number of consumers of low, we should break away from globals/defaults. @Jorropo can provide more details. |
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.
I am onboard with fixing this, thx for doing it, but I'll be busy this week. Should make it for kubo 0.22, hopefully.
I won't have time this and the following week either. Mainly due to crypto events in Paris |
cb902a7
to
8a1be0a
Compare
Rebased |
I've implemented the requested changes. One last thing to consider is perhaps renaming the pkg to something more suitable. |
@Jorropo, gentle ping |
I've noticed we couldn't have a blockservice that is both writethrough and with an allowlist so I refactored it to the functional option pattern. |
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.
Thx, this looks good to me, I just have minor questions.
5f1f415
to
836a67c
Compare
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.
LGTM thx ❤️
There is one test failure, which seems unrelated and likely a flake:
|
Actually let's not embed it, it's gonna confuse ADI frameworks. Also you didn't embeded in the implementation (just interface) and this is breaking the tests. |
889fb50
to
ae7441a
Compare
I realized that a bit late and fixed it now. Please take a look at the new proper commit, and if we like the result we can keep it, if not, I'll revert. |
ae7441a
to
836a67c
Compare
I force pushed it away, this is a type problem. |
3b6a259
to
a0a69e0
Compare
FWIW, FX realizes dep cycles, but I see your point and even cycle error would be annoying to deal with, and simple |
My last take is that to fully finish this |
If you want to make an other PR about moving stuff around why not, I'm not sure about putting in the blockservice tho, because some of my code use verifcid without using the blockservice. If anything I think this would be worth moving into |
What's the ETA for the next release including this PR? |
ipfs/kubo#10014 Currently September 10. In theory we could make a Boxo release before a Kubo one, we recently got in the habits of keeping them in sync because it's convenient, but if you need this I don't see why not release boxo earlier. |
I would appreciate an earlier release, so we can finally migrate to boxo as part of our big IPFS deps bump PR |
Thanks to ipfs/boxo#407, we can now fully migrate to boxo and get rid of the oldest `replace` directive in our go.mod for `verifcid`. TODO: Issue about go-car/v2 migration --------- Co-authored-by: Ryan <ryan@celestia.org>
The successor of #281.