-
Notifications
You must be signed in to change notification settings - Fork 48
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
feature: ability to override default bitswap max message size #152
Conversation
License: MIT Signed-off-by: Yahya <ya7yaz@gmail.com>
Codecov Report
@@ Coverage Diff @@
## master #152 +/- ##
==========================================
+ Coverage 91.16% 92.13% +0.96%
==========================================
Files 14 14
Lines 736 661 -75
==========================================
- Hits 671 609 -62
+ Misses 65 52 -13
Continue to review full report at Codecov.
|
hey @diasdavid , Can you take a look at this PR? Let me know what you think. |
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.
Hi @ya7ya, this overall LGTM, just needs 2 more things:
- Interop tests to be added at the js-ipfs level. By dropping the max message size, we need to ensure that we still accept go-ipfs sent messages (and other nodes that didn't change this factor)
- Documentation update (through jsdoc)
@diasdavid shouldn't this be handled by the WebRTC transport? |
…e nodes License: MIT Signed-off-by: Yahya <ya7yaz@gmail.com>
* added missing multicodec dependency * using ~ for multicodec dependency range because version < 1
* test: close IPFSRepo before deleting its files * chore: run on appveyor * chore: upgrade packages * chore: debugging appveyor failure * test: more appveyor debugging * test: use os.tmpdir() not '/tmp' * test: timeout issue * test: fix error reporting * test: Math.Random => uuid Math.Random can create collisions. Using uuid should not create a collision. * test: all tests can timeout, need global timeout specified * test: bitswap-mock multi peer is just too long, skip it * fix package.json * test: ipfs@0.18.3 breaks us. reverting to 0.18.2 * chore: update repo version * chore: update deps * bring back the test
This commit updates all CI scripts to the latest version
* bitswap stats: async updater * linter happy * pre-commit hook for linting and tests * stats: support dataReceived * stats: data received * stats: blocks sent and data sent * stats: using bignum * stats: compute throttle with threshold * stats: update timeout is now dynamic based on queue size * stats: moving averages * stats: providesBufferLength * stats: support for providesBufferLength and wantListLength * stats: support for peerCount * stats: enable / disable * increased test timeout
* getMany: guaranteed ordering * tests: swarm, humble beginnings * chore: added test for when no cid is passed in * chore: more swarm tests * tests: serializing interconnections on swarm tests * more swarm tests enabled * tests: removed some onlys * tests: serializing interconnections on swarm tests * tests: added double get test * chore: added test for double get * one less callback function * chore: update libp2p version to latest * chore: update remaining deps
@ya7ya is this PR something you still think you can finish? |
* fix: getMany: ensuring we set the want list independently of having all blocks or not * bitswap stats tests: not requiring specific order to finish * increasing the timeouts of swarm tests
@diasdavid Hey david, I completely forgot about this PR, I'm so sorry about this. I'll try to finalize this and add the required tests as soon as possible. 🙇 |
* docs: current stats API documented * per peer stats
License: MIT Signed-off-by: Yahya <ya7yaz@gmail.com>
…e nodes License: MIT Signed-off-by: Yahya <ya7yaz@gmail.com>
…into feat/message-size License: MIT Signed-off-by: Yahya <ya7yaz@gmail.com>
There are a lot of changes here so it's a bit hard to tell what this is actually doing now but, if this is doing what the title says, this is very much the wrong fix. Is it really not possible (and much simpler) to have the WebRTC transport write at most 32KiB at a time? |
hey @Stebalien , I rebased this PR to master so that's why there are alotta changes.
Yes. This does what the title says. And I'd be very interested in doing the correct fix and rejecting this PR if it's possible to override this at webRTC transport level. |
It should be fairly easy to fix in the webRTC transport. Unfortunately, my understanding of js streams is rather limited (I generally avoid working on javascript). |
@Stebalien I'm gonna look into it. probably we can throttle the pull request |
@ya7ya I believe, we can use something like this to chunk the stream at the transport level - https://pull-stream.github.io/#pull-block. |
+1 this needs to be handled in the webrtc libp2p transport. |
@vasco-santos, @jacobheun this PR suggests that the transports should get some benchmarking treatment. There are two low hanging fruits to make things fast:
|
I don't think this PR is necessary any more, the upstream issue it's supposed to fix has been addressed by libp2p refactors. Please feel free to reopen if it's still a problem. |
This PR is a part of the fix for the browser to browser file transfer issue in
IPFS
ipfs/js-ipfs#1019 .This edit allows an override of
MAX_MESSAGE_SIZE
so it can be used in the browser via WebRTC Transport. I been testing and so far 32KB seem to work in the browser without getting throttled.License: MIT
Signed-off-by: Yahya ya7yaz@gmail.com