-
Notifications
You must be signed in to change notification settings - Fork 2k
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
Investigate failing MerkleTreeSimpleTest
in zerocashTest
.
#455
Comments
Is this the same as #391? |
I got the test to pass by fixing two bugs in the test:
But I don't exactly understand what the witnesses are supposed to be, so I'm not sure if it's the test that's wrong or if it's the merkle tree implementation that's wrong. |
Another problem with the test is that the "christina" witness vector is too big, since it's re-used between the depth-64 and depth-16 tree, and so the Another clue is that the non-zero witness elements appear at the end of the generated witness, but the test at the bottom expect them to be at the front. So either A: The witness generator is doing the right thing, and the test at the bottom expected the tree to have depth 3 or B: The witness generator is mistakenly padding with zeroes on the front, instead of the back. |
Yeah, zeroes should be up front, because there's a bunch of levels you want to ignore and then finally the subtree you want to check. So it's option B. This isn't the same as #391. |
There's a pull request for this: Electric-Coin-Company/libzerocash#17 It uncovered the bug in #461. |
Description here: Electric-Coin-Company/libzerocash#13 (comment)
The text was updated successfully, but these errors were encountered: