Skip to content
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

stream read buffer #1353

Merged
merged 3 commits into from
Sep 30, 2022
Merged

stream read buffer #1353

merged 3 commits into from
Sep 30, 2022

Conversation

turuslan
Copy link
Contributor

Referenced issues

Description of the Change

  • Enable stream read buffering for transaction propagation and sync protocols.
    • If big packet is received without buffering, that packet is split to a lot of 1 byte frames.

Benefits

  • Fix traffic after submitting big extrinsic with wasm runtime (~0.5MB).

Possible Drawbacks

  • Workaround for common problem. Should be resolved in libp2p yamux.

Signed-off-by: turuslan <turuslan.devbox@gmail.com>
@codecov
Copy link

codecov bot commented Sep 28, 2022

Codecov Report

Merging #1353 (8283d6b) into master (91bf737) will decrease coverage by 0.09%.
The diff coverage is 0.00%.

@@            Coverage Diff             @@
##           master    #1353      +/-   ##
==========================================
- Coverage   24.24%   24.15%   -0.10%     
==========================================
  Files         622      624       +2     
  Lines       23235    23327      +92     
  Branches    12143    12179      +36     
==========================================
  Hits         5634     5634              
- Misses      12384    12476      +92     
  Partials     5217     5217              
Impacted Files Coverage Δ
core/network/helpers/stream_proxy_base.hpp 0.00% <0.00%> (ø)
core/network/helpers/stream_read_buffer.hpp 0.00% <0.00%> (ø)
core/network/impl/protocols/protocol_base_impl.hpp 0.00% <0.00%> (ø)
core/network/impl/protocols/sync_protocol_impl.cpp 8.60% <0.00%> (-0.04%) ⬇️

📣 We’re building smart automated test selection to slash your CI/CD build times. Learn more

Copy link
Contributor

@igor-egorov igor-egorov left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

better to have the fix in libp2p project

core/network/helpers/stream_proxy.hpp Outdated Show resolved Hide resolved
core/network/helpers/stream_read_buffer.hpp Show resolved Hide resolved
core/network/helpers/stream_read_buffer.hpp Outdated Show resolved Hide resolved
core/network/helpers/stream_read_buffer.hpp Show resolved Hide resolved
core/network/helpers/stream_read_buffer.hpp Show resolved Hide resolved
Signed-off-by: turuslan <turuslan.devbox@gmail.com>
@turuslan turuslan requested a review from Harrm September 29, 2022 14:11
@turuslan turuslan enabled auto-merge (squash) September 30, 2022 08:38
@turuslan turuslan merged commit 65ad916 into master Sep 30, 2022
@turuslan turuslan deleted the fix/stream-read-buffer branch September 30, 2022 09:29
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

3 participants