-
Notifications
You must be signed in to change notification settings - Fork 43
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
feat: ensures consistent use of the assumption that NMT nodes are ordered ascendingly #188
Merged
staheri14
merged 49 commits into
master
from
use-namespace-ordering-assumption-consistently
May 12, 2023
Merged
Changes from 41 commits
Commits
Show all changes
49 commits
Select commit
Hold shift + click to select a range
e49d7b1
updates criteria of an empty proof
staheri14 5e9091c
replaces slice literal with nID1
staheri14 b6e3cd3
refactors the code to reject invalid empty proof, adds tests
staheri14 5c32cbc
corrects IsOfEmptyProof description
staheri14 84865d7
prefixes min and max with root
staheri14 c8a8059
fixes linter issues
staheri14 8a27636
revises some typos
staheri14 9e3d8de
renames IsOfEmptyProof to IsEmptyProof
staheri14 20b2205
returns immediately on invalid range
staheri14 6222d5f
adds unit tests
staheri14 30cbde4
Merge remote-tracking branch 'origin/master' into verifies-proof-range
staheri14 9fd31f2
considers start=end as invalid
staheri14 167629c
defines a utility function for proof range verification
staheri14 fcd3cd0
returns the error returned by validateRange
staheri14 d11e9c2
adds proof range check
staheri14 bb07d07
incorporates further tests covering new range check
staheri14 d491b52
returns err produced by validateRange
staheri14 e6cb4dc
Merge branch 'verifies-proof-range' into panics-in-verifyleafhashes
staheri14 a449d68
implements the necessary logic to handle empty proofs
staheri14 29007f4
develops tests
staheri14 8fdaab2
revises the err message
staheri14 409f0f8
extracts the NID from the leaf
staheri14 2d504d5
removes an excess line
staheri14 48010b1
Merge branch 'master' into panics-in-verifyleafhashes
staheri14 712ed08
revises tests descriptions
staheri14 e01ce18
declares a variable for nonEmptyProof for readability
staheri14 fc595aa
removes an excess line
staheri14 021adc0
replaces manual extraction of min and max NID with proper func calls
staheri14 951ad75
adds node format validation to the validateSiblingsNamespaceOrder
staheri14 81e86bf
implements test for the invalid siblings format
staheri14 f70d2d7
resolves linter issues
staheri14 53597b9
Merge branch 'master' into resolves-panic-validateSiblings
staheri14 f3076fe
revises the error message
staheri14 e46a1b2
compares min and max
staheri14 fb8ee89
deletes stale comments
staheri14 05c2ca0
Merge branch 'resolves-panic-validateSiblings' into check-namespace-r…
staheri14 224d8cf
adds a comment
staheri14 01ecb89
adds tests
staheri14 e0905fe
removes an invalid test case
staheri14 d64c018
updates error messages and removes some duplicate helper functions
staheri14 c398e19
simplifies the namespace computation under the IgnoreMaxNamespace flag
staheri14 c0af83b
deletes unused min and max functions
staheri14 b0eef2f
revises the IgnoreMaxNamespace description to match the implementation
staheri14 21fccff
Merge branch 'master' into use-namespace-ordering-assumption-consiste…
staheri14 e73b843
adds computeRange and its unittests
staheri14 a3fcfe0
deletes the old compute range function
staheri14 4373c00
adds function descriptions
staheri14 9c070ad
edits function name
staheri14 6768a68
Merge branch 'master' into use-namespace-ordering-assumption-consiste…
staheri14 File filter
Filter by extension
Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Add this suggestion to a batch that can be applied as a single commit.
This suggestion is invalid because no changes were made to the code.
Suggestions cannot be applied while the pull request is closed.
Suggestions cannot be applied while viewing a subset of changes.
Only one suggestion per line can be applied in a batch.
Add this suggestion to a batch that can be applied as a single commit.
Applying suggestions on deleted lines is not supported.
You must change the existing code in this line in order to create a valid suggestion.
Outdated suggestions cannot be applied.
This suggestion has been applied or marked resolved.
Suggestions cannot be applied from pending reviews.
Suggestions cannot be applied on multi-line comments.
Suggestions cannot be applied while the pull request is queued to merge.
Suggestion cannot be applied right now. Please check back later.
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.
If
leftMinNs
represents the maximum possible namespace ID, then by definition,rightMax
must also be the maximum possible namespace ID (left and right nodes are already checked to be ordered based on their namespaces). Therefore, this check can be removed.