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

Assumption that leaves are ordered is not used consistently #121

Closed
ivan-gavran opened this issue Mar 7, 2023 · 0 comments · Fixed by #188
Closed

Assumption that leaves are ordered is not used consistently #121

ivan-gavran opened this issue Mar 7, 2023 · 0 comments · Fixed by #188
Assignees
Labels
audit Issue uncovered during Informal audit

Comments

@ivan-gavran
Copy link
Collaborator

There is an assumption that leaves of NMTs are ordered by their namespace ids.

However, this assumption is not used.
For instance, here the spec takes min(l.minNs, r.minNs), where l.minNs would suffice. Similarly, here in the code the same thing happens. On the other hand, the assumption is used in the function CalculateAbsenceIndex, when finding the appropriate leaf for the absence proof.

As this seems to be an important assumption, it would probably make the code and the spec clearer if it were consistently used.

@rootulp rootulp added the audit Issue uncovered during Informal audit label Mar 29, 2023
@staheri14 staheri14 self-assigned this May 5, 2023
staheri14 added a commit that referenced this issue May 12, 2023
…ered ascendingly (#188)

## Overview
Closes #121 and #148.
Please refer to this [PR](#193)
to compare the new and old version of namsespacre range calculation for
a parent node in the `HashNode()`.

## Checklist

- [x] New and updated code has appropriate documentation
- [x] New and updated code has new and/or updated testing
- [x] Required CI checks are passing
- [x] Visual proof for any user facing features like CLI or
documentation updates
- [x] Linked issues closed with keywords
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
audit Issue uncovered during Informal audit
Projects
None yet
3 participants