Skip to content
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 prysmaticlabs/hashtree to accelerate Merkle computations #156

Open
ralexstokes opened this issue Jun 14, 2024 · 0 comments
Open

Use prysmaticlabs/hashtree to accelerate Merkle computations #156

ralexstokes opened this issue Jun 14, 2024 · 0 comments

Comments

@ralexstokes
Copy link
Owner

ralexstokes commented Jun 14, 2024

We can accelerate the computation of a parent layer of a Merkle tree using this library: https://github.com/prysmaticlabs/hashtree

The core routine for this computation currently is in this function:

fn merkleize_chunks_with_virtual_padding(chunks: &[u8], leaf_count: usize) -> Result<Node, Error> {

It would be nice to add this library behind a Cargo feature flag, and write some benchmarks to determine if we get substantial speedups on realistic workloads (e.g. computing hash_tree_root on a mainnet BeaconState).

See #93 for a bit more context.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

1 participant