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

feat: Add stream option to limit inbound message size #349

Merged
merged 5 commits into from
Oct 28, 2022

Conversation

g11tech
Copy link
Contributor

@g11tech g11tech commented Sep 29, 2022

If the size is not provided decode from it-length-prefixed lib applies the ~4mb limit by default:
From npm docs:

maxDataLength: If provided, will not decode messages whose data section exceeds the size specified, if omitted will use the default of 4MB.

bellatrix message sizes could be 10MB so this limit needs to be exposed via options so they can be set by lodestar

@g11tech g11tech changed the title Add stream option to limit inbound message size feat: Add stream option to limit inbound message size Oct 4, 2022
@codecov-commenter
Copy link

codecov-commenter commented Oct 4, 2022

Codecov Report

Base: 83.22% // Head: 83.58% // Increases project coverage by +0.36% 🎉

Coverage data is based on head (5d6bcc8) compared to base (19507d9).
Patch coverage: 100.00% of modified lines in pull request are covered.

Additional details and impacted files
@@            Coverage Diff             @@
##           master     #349      +/-   ##
==========================================
+ Coverage   83.22%   83.58%   +0.36%     
==========================================
  Files          47       47              
  Lines       11713    11771      +58     
  Branches     1258     1267       +9     
==========================================
+ Hits         9748     9839      +91     
+ Misses       1965     1932      -33     
Impacted Files Coverage Δ
src/index.ts 70.37% <100.00%> (+1.31%) ⬆️
src/stream.ts 97.33% <100.00%> (+0.27%) ⬆️
test/gossip.spec.ts 96.31% <100.00%> (+0.73%) ⬆️

Help us with your feedback. Take ten seconds to tell us how you rate us. Have a feature suggestion? Share it here.

☔ View full report at Codecov.
📢 Do you have feedback about the report comment? Let us know in this issue.

@g11tech g11tech marked this pull request as ready for review October 5, 2022 07:58
@g11tech g11tech requested a review from a team as a code owner October 5, 2022 07:58
dapplion
dapplion previously approved these changes Oct 24, 2022
@g11tech
Copy link
Contributor Author

g11tech commented Oct 25, 2022

I think i will need to fix the tests since the pubsub reference has changed, let me update and push

@g11tech
Copy link
Contributor Author

g11tech commented Oct 26, 2022

@dapplion ready for merge!

@wemeetagain wemeetagain merged commit 3475242 into master Oct 28, 2022
@wemeetagain wemeetagain deleted the g11tech-inbound-stream-len branch October 28, 2022 15:11
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.

5 participants