-
Notifications
You must be signed in to change notification settings - Fork 70
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
fix: sort merkle indices #343
Conversation
158cd20
to
d101fba
Compare
d101fba
to
55032b1
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.
👍
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.
@sinui0, some changes may be necessary
/// | ||
/// # Panics | ||
/// | ||
/// - if `indices` is not sorted. |
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.
@sinui0 , instead of imposing the burden on the caller to sort the indices, we can just sort them right in this fn.
|
||
// fail because of the extra leaf which was not covered by the proof |
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.
@sinui0 , I'm not finding this test among the new tests.
@themighty1 this was merged in expediently because it was going to get in the way of the hackathon. Do you mind opening an issue when you catch something after a PR is closed? |
@sinui0 , I wasn't sure if this was the intended behaviour, so I thought I'd ask. Ok, i'll open an issue. |
This PR fixes an issue in
tlsn-core
related to the merkle tree module expecting the leaf indices to be sorted, but they're not. Now they are.