-
Notifications
You must be signed in to change notification settings - Fork 41
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
Use memory-efficient Merkle tree computation when generating proofs #163
Comments
hi @noahfigueras thanks for this! I think your assessment is correct and basically I used a more naive version of Merkle tree computation for proving as for the initial implementation I focused on getting the APIs right and everything else around the proof generation/verification Instead, the line you linked should use this implementation which is memory-efficient and I think will resolve this problem I haven't had time to update the implementation but PRs are very welcome! |
I think a nice way forward would be to adjust |
ah, this is referenced in #141 btw |
hi @ralexstokes! I think that's good approach, I'll try to get this working. Is it ok moving |
When trying to compute proofs, for the beacon state validators array, it brakes with the following error:
I assume this is cause due to the following line allocating the full
node_count
space. But, this can cause problems with bigger size lists especially if they are not full. For example if we try to proof that a validator in the BeaconState is active or exists, on computing that proof it will brake due to allocating too many slots on the buffer for empty nodes as it will try to allocate slots for the full list up toVALIDATOR_REGISTRY_LIMIT
.You can reproduce it with the following code:
The text was updated successfully, but these errors were encountered: