-
Notifications
You must be signed in to change notification settings - Fork 160
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
Support PartialMerkleTree
to be used as secret input in the .input
file.
#1072
Conversation
cc85497
to
2ed971f
Compare
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Looks great! Thank you! Not a full review yet, but I did leave a couple of nits inline.
One other comment: I think it would be good to put together an example to illustrate how different input sections can be used. This example would go here and it the input file could be something similar to what you've put together for tests in this PR.
f7a1f5c
to
17baffb
Compare
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Looks good! Thank you! I left one nit inline. Once it is addressed, we can merge.
# get the value `20` from the Partial Merkle Tree | ||
push.0.2 | ||
mtree_get |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
For this and other cases below, I'd do the following:
- Update the comment to say something like: "get value at depth=2, index=0 from the Partial Merkle Tree; this value should be 20"
- Add assertions after
mtree_get
to verify that the value retrieved was indeed 20.
17baffb
to
765c532
Compare
# push the root of the Merkle Tree on the stack | ||
push.0x0463f7d47758ad94b11dbf9675ffb7b331baa9c150d7fac6d784055c313eab0e | ||
|
||
# get value at depth = 2, index = 1 from the Merkle Tree; this value should be 22 |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
I think there is a typo here: shouldn't index also be 2
?
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Indeed. Sorry, I missed it
765c532
to
7548541
Compare
Let's merge this PR after the change parse hex strings one, I want to be sure that this example is working. |
We could also merge now, and just make sure these tests work in the |
This small PR makes it possible to use
PartialMerkleTree
in the.input
files as a secret input.