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

Expose leaf_sum and allow binary MerkleTree to be built from existing precomputed leafs #896

Merged
merged 8 commits into from
Jan 29, 2025

Conversation

AurelienFT
Copy link
Contributor

This change allows us to run leaf_sum for each leaf before creating the tree and call new_from_existing_leafs using the precomputed leafs.

It give the possibility to the caller to optimize the computation of all leaf_sum beforehand by parallelising for example.

Checklist

  • Breaking changes are clearly marked as such in the PR description and changelog
  • New behavior is reflected in tests
  • If performance characteristic of an instruction change, update gas costs as well or make a follow-up PR for that
  • The specification matches the implemented behavior (link update PR if changes are needed)

Before requesting review

  • I have reviewed the code myself
  • I have created follow-up issues caused by this PR and linked them here

acerone85
acerone85 previously approved these changes Jan 20, 2025
@AurelienFT AurelienFT self-assigned this Jan 22, 2025
xgreenx
xgreenx previously approved these changes Jan 27, 2025
Copy link
Member

@rymnc rymnc left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

left some comments

@AurelienFT AurelienFT requested a review from rymnc January 27, 2025 15:12
@AurelienFT AurelienFT requested a review from rymnc January 27, 2025 15:37
@AurelienFT AurelienFT added this pull request to the merge queue Jan 29, 2025
Merged via the queue into master with commit b2bce26 Jan 29, 2025
40 checks passed
@AurelienFT AurelienFT deleted the precomputed_hashes_in_tree branch January 29, 2025 09:43
@Dentosal Dentosal mentioned this pull request Feb 26, 2025
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
Projects
None yet
Development

Successfully merging this pull request may close these issues.

4 participants