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

fix: sort merkle indices #343

Merged
merged 1 commit into from
Sep 22, 2023
Merged

fix: sort merkle indices #343

merged 1 commit into from
Sep 22, 2023

Conversation

sinui0
Copy link
Member

@sinui0 sinui0 commented Sep 21, 2023

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.

Copy link
Member

@th4s th4s left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

👍

@sinui0 sinui0 merged commit e479eac into dev Sep 22, 2023
11 checks passed
@sinui0 sinui0 deleted the fix/sort-merkle-indices branch September 22, 2023 01:32
Copy link
Member

@themighty1 themighty1 left a 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.
Copy link
Member

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
Copy link
Member

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.

@sinui0
Copy link
Member Author

sinui0 commented Oct 2, 2023

@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?

@themighty1
Copy link
Member

@sinui0 , I wasn't sure if this was the intended behaviour, so I thought I'd ask. Ok, i'll open an issue.

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.

3 participants