-
Notifications
You must be signed in to change notification settings - Fork 430
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
add changes for flat encoding #7516
Conversation
Co-authored-by: Ben Adams <[email protected]> Co-authored-by: Kamil Chodoła <[email protected]> Co-authored-by: nethermind-machine <[email protected]> Co-authored-by: LukaszRozmej <[email protected]> Co-authored-by: Daniel Kyutae Jung <[email protected]> Co-authored-by: Ahmad Bitar <[email protected]> Co-authored-by: Lukasz Rozmej <[email protected]> Co-authored-by: Amirul Ashraf <[email protected]> Co-authored-by: yerke26 <[email protected]> Co-authored-by: yeerke <[email protected]> Co-authored-by: Ruben Buniatyan <[email protected]> Co-authored-by: Alexey <[email protected]> Co-authored-by: Nikita Mescheryakov <[email protected]> Co-authored-by: Lautaro Emanuel <[email protected]> Co-authored-by: Marcos Antonio Maceo <[email protected]> Co-authored-by: ak88 <[email protected]> Co-authored-by: Yaroslav Kukharuk <[email protected]> Co-authored-by: Marek Moraczyński <[email protected]> Co-authored-by: Ahmad Bitar <[email protected]> Co-authored-by: Oleg Jakushkin <[email protected]> Co-authored-by: Kamil Chodoła <[email protected]> Co-authored-by: healthyyyoung <[email protected]>
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.
So many allocations!
Requesting for re-review, addressed this issue in the latest commits |
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.
Why not just use RlpDecoders?
https://eips.ethereum.org/EIPS/eip-7685#execution-layer |
Sounds like something our RlpDecoder infrastructure could support, add decoder for external list, and then call internal decoders for decoding items dependent on type. No byte array allocation needed, everything done on one pooled buffer through NettyRlpStream |
int requestsLength = rlpStream.ReadSequenceLength(); | ||
int requestsCheck = rlpStream.Position + requestsLength; | ||
// read an array of byte arrays | ||
byte[][] requestsEncoded = rlpStream.DecodeByteArrays(); |
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.
unneeded, make it lazy, call internal decoders based on type and progressing the stream
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.
Pushed a commit
PR description! |
will add |
Resolves #7522
Please choose one of the keywords above to refer to the issue this PR solves followed by the issue number (e.g. Fixes #000). If no issue number, remove the line. Also, remove everything marked optional that is not applicable. Remove this note after reading.
Changes
Types of changes
What types of changes does your code introduce?
Testing
Requires testing
If yes, did you write tests?
Notes on testing
Optional. Remove if not applicable.
Documentation
Requires documentation update
If yes, link the PR to the docs update or the issue with the details labeled
docs
. Remove if not applicable.Requires explanation in Release Notes
If yes, fill in the details here. Remove if not applicable.
Remarks
Optional. Remove if not applicable.