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

feat!: accounts for IgnoreMaxNamespace flag in the ProveNamespace method #194

Merged
merged 7 commits into from
May 12, 2023

Conversation

staheri14
Copy link
Contributor

@staheri14 staheri14 commented May 9, 2023

Overview

Closes #159

@staheri14 staheri14 self-assigned this May 9, 2023
@staheri14 staheri14 added the enhancement New feature or request label May 9, 2023
@staheri14 staheri14 marked this pull request as ready for review May 9, 2023 22:05
@codecov
Copy link

codecov bot commented May 9, 2023

Codecov Report

Merging #194 (42eeaaa) into master (fd00c52) will decrease coverage by 0.30%.
The diff coverage is 100.00%.

@@            Coverage Diff             @@
##           master     #194      +/-   ##
==========================================
- Coverage   95.71%   95.41%   -0.30%     
==========================================
  Files           5        5              
  Lines         560      567       +7     
==========================================
+ Hits          536      541       +5     
- Misses         14       15       +1     
- Partials       10       11       +1     
Impacted Files Coverage Δ
nmt.go 97.14% <100.00%> (-0.89%) ⬇️

Copy link
Collaborator

@rootulp rootulp left a comment

Choose a reason for hiding this comment

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

[no blocking feedback] but can't approve b/c I don't understand the test cases

nmt_test.go Show resolved Hide resolved
nmt_test.go Show resolved Hide resolved
Copy link
Member

@evan-forbes evan-forbes left a comment

Choose a reason for hiding this comment

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

LGTM

@staheri14
Copy link
Contributor Author

Adding the following note for the future reference: The codecov has decreased since previously, there was a possibility of encountering an error in the buildRangeProof function call from within the ProveNamespace function. This error would occur if we deliberately corrupted the state of the tree and then attempted to create namespace proofs using the corrupted tree (tests are available in Test_ProveNamespace_Err ). However, we now add an early call to the Root() function at the beginning of ProveNamespace, which effectively catches any corruption in the tree state and returns immediately. As a result, when we reach the buildRangeProof line, the tree state has already been validated and guaranteed to be valid, preventing the buildRangeProof error from occurring

@staheri14 staheri14 merged commit c41093d into master May 12, 2023
@staheri14 staheri14 deleted the fix-ignoremaxnamespace-in-provenamespace branch May 12, 2023 17:55
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
enhancement New feature or request
Projects
None yet
Development

Successfully merging this pull request may close these issues.

The updateMinMaxID method disregards the IgnoreMaxNamespace semantic
3 participants