Conversation
Note: I've implemented also an alternative version which instead of inputting a witness value 'divergence_level' it inputs a bitmask. Both approaches (divergence_level and divergence_bitmask) take the same amount of constraints (336 constraints for a tree of 32 levels, and for an hybrid approach it takes 331 constraints but the code gets a bit less readable). So I've kept with the current implementation (using divergence_level) which is more easy to follow.
1a0c40c to
2da2e82
Compare
c275f69 to
d263245
Compare
ed255
reviewed
Jul 23, 2025
Collaborator
ed255
left a comment
There was a problem hiding this comment.
First review round. I've left some small suggestions, and an open question. I'll do another round.
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
tree.insertmethod to add new leaves to the tree (till now we could only add leaves at tree initial creation, not after), which returns a proof of correct insertion (proof of correct state transition)Update: thanks @ax0 for pointing out the tampering proofs case, which required adding the check 5.3.
Related to #335 (insertion).