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

Improve Merkle root hashing circuit by 1 constraint / level #820

Merged
merged 5 commits into from
Mar 30, 2023

Conversation

mitschabaude
Copy link
Collaborator

@mitschabaude mitschabaude commented Mar 30, 2023

This improves the constraints needed by MerkleWitness.calculateRoot() from $15.5 n$ to $14.5 n$, where $n + 1$ is the tree height. The improvement is achieved by reusing computation done internally by two separate calls to Circuit.if.

Unrelated: Fixes the changelog which got messed up by merging

@mitschabaude mitschabaude merged commit adea000 into main Mar 30, 2023
@mitschabaude mitschabaude deleted the perf/merkle-tree branch March 30, 2023 14:14
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

Successfully merging this pull request may close these issues.

2 participants