-
-
Notifications
You must be signed in to change notification settings - Fork 291
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
Snappy frame encode big payloads as chunks as per the standard #3912
Conversation
Codecov Report
@@ Coverage Diff @@
## master #3912 +/- ##
==========================================
+ Coverage 36.26% 37.00% +0.73%
==========================================
Files 324 325 +1
Lines 9099 9102 +3
Branches 1465 1465
==========================================
+ Hits 3300 3368 +68
+ Misses 5626 5543 -83
- Partials 173 191 +18 |
Performance Report✔️ no performance regression detected Full benchmark results
|
packages/lodestar/src/network/reqresp/encodingStrategies/sszSnappy/encode.ts
Outdated
Show resolved
Hide resolved
93b6af2
to
2c94bf0
Compare
0e0ad32
to
105300e
Compare
packages/lodestar/src/network/reqresp/encodingStrategies/sszSnappy/encode.ts
Outdated
Show resolved
Hide resolved
* | ||
* To use async version (for e.g. on big payloads) instantiate the stream with | ||
* `createCompressStream({asyncCompress: true})` | ||
*/ |
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.
Thank you so much for adding a nice reasoning comment! ❤️
Motivation
On a bellatrix block of goerli shadowfork2, lighthouse frame decoder failed to decode block it req/resp from a lodestar node. Turned out it was big block, but being streamed as a single chunk which didnot confirm to the snappy frame encoding/decoding specs.
This PR chunkifies a big payload in the compress stream as per the standards and add tests for the same block
Closes #3903