-
-
Notifications
You must be signed in to change notification settings - Fork 21
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: improve type.hashTreeRoot() using batch #409
Conversation
Performance Report✔️ no performance regression detected Full benchmark results
|
tested this on |
sha256 works in blocks, each is 64 bytes so perhaps it's more meaningful to reflect that for also with holesky, there are 1.7M validators. For every 8 deposits we have to reallocate the whole 1.7M * 8 bytes = 13.6MB for Update:
|
9e32c5c
to
7ed3ced
Compare
d3821ee
to
cbb30a2
Compare
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.
I left a few comments but I think this PR really needs to be reviewed by @wemeetagain
This reverts commit 15cf649.
Motivation
Description
getRoots()
and compute root from there, this PR implementgetChunkBytes()
merkleizeInto()
which use batch therechunkBytesBuffer
memory in type, almost noUint8Array
allocations in the middlehashTreeRootInto()
api. This is needed in case consumers want to reuse memory allocation thereallocUnsafe()
of as-sha256 where it makes sensecherry picked from #378