feat: reuse bytes when deserializing gossip - #8628
Conversation
Summary of ChangesHello @wemeetagain, I'm Gemini Code Assist1! I'm currently reviewing this pull request and will post my feedback shortly. In the meantime, here's a summary to help you and other reviewers quickly get up to speed! This pull request introduces a performance optimization by upgrading the Highlights
Using Gemini Code AssistThe full guide for Gemini Code Assist can be found on our documentation page, here are some quick tips. Invoking Gemini You can request assistance from Gemini at any point by creating a comment using either
Customization To customize Gemini Code Assist for GitHub experience, repository maintainers can create a configuration file and/or provide a custom code review style guide (such as PEP-8 for Python) by creating and adding files to a Limitations & Feedback Gemini Code Assist may make mistakes. Please leave feedback on any instances where its feedback is incorrect or counter productive. You can react with 👍 and 👎 on @gemini-code-assist comments. If you're interested in giving your feedback about your experience with Gemini Code Assist for Github and other Google products, sign up here. You can also get AI-powered code generation, chat, as well as code reviews directly in the IDE at no cost with the Gemini Code Assist IDE Extension. Footnotes
|
There was a problem hiding this comment.
Code Review
This pull request aims to improve performance by reusing bytes during the deserialization of gossip messages. This is achieved by updating the @chainsafe/ssz dependency to version 1.3.0 across all relevant packages and enabling the reuseBytes: true option in the deserialization logic. The changes are generally correct and align with the stated goal. However, I've identified a few places where the new reuseBytes option could also be applied for consistency and to fully realize the performance benefits across all gossip deserialization paths. My review includes a specific comment with suggestions for these improvements.
Performance Report✔️ no performance regression detected Full benchmark results
|
nflaig
left a comment
There was a problem hiding this comment.
sim and e2e tests are consistently failing on this branch
|
this PR is pretty stale, @wemeetagain we might wanna close it |
Codecov Report✅ All modified and coverable lines are covered by tests. Additional details and impacted files@@ Coverage Diff @@
## unstable #8628 +/- ##
=========================================
Coverage 52.04% 52.05%
=========================================
Files 848 848
Lines 65734 65723 -11
Branches 4807 4806 -1
=========================================
- Hits 34214 34210 -4
+ Misses 31451 31444 -7
Partials 69 69 🚀 New features to boost your workflow:
|
|
stale, this branch still uses yarn |
|
created #8870 to keep track of this |


Motivation
Description
reuseBytesdeserialization option - feat: add reuseBytes option to deserialize ssz#503reuseBytes: truefor all deserialization of gossip