-
Notifications
You must be signed in to change notification settings - Fork 87
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: do not read size of blocks for want-have requests #672
base: main
Are you sure you want to change the base?
Conversation
Codecov ReportAttention: Patch coverage is
@@ Coverage Diff @@
## main #672 +/- ##
==========================================
- Coverage 60.18% 60.18% -0.01%
==========================================
Files 241 241
Lines 30707 30771 +64
==========================================
+ Hits 18482 18519 +37
- Misses 10574 10596 +22
- Partials 1651 1656 +5
|
See configuration in kubo: ipfs/kubo#10512 |
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.
Our integration tests passed with the option applied. I will test this E2E once the debug log is removed
I tested this E2E, and things have been going smoothly so far. Will see how it works over the weekend. |
When the replace-have-with-want-blocks is disabled, the block sizes for blocks corresponding to have-want requests are not read and instead the blockstore is checked only to see if the block is present.
The replace-have-with-want-blocks feature can be disabled using the new
WithReplaceHasWithBlockMaxSize(n)
option which can be used withbitswap.New
. It sets the maximum size of a block in bytes up to which we will replace a want-have with a want-block. Setting a size of 0 disables want-have replacement and means that block sizes are not read for want-have requests.This is a prototype fix for issue #657