-
Notifications
You must be signed in to change notification settings - Fork 839
MerkleDB -- Use Maybe for proof bounds
#1657
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
Conversation
…-labs/avalanchego into merkledb-test-range-proof-invariants
| type workItem struct { | ||
| start []byte | ||
| end []byte | ||
| start merkledb.Maybe[[]byte] |
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.
Would it make sense to define Maybe in a shared types package rather than just merkledb?
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.
I can do that in a follow up PR -- this one is already kind of huge
…lanchego into merkledb-maybe-proof-bounds
…lanchego into merkledb-maybe-proof-bounds
|
closing in favor of #1872 |
Signed-off-by: Jonathan Oppenheimer <jonathan.oppenheimer@avalabs.org> Co-authored-by: Austin Larson <78000745+alarso16@users.noreply.github.com>
Why this should be merged
Makes bounds easier to understand (I hope.) @StephenButtolph requested this in https://github.com/ava-labs/avalanchego/pull/1629/files#r1242345719.
How this works
Instead of interpreting
startorendhaving length 0 as meaning "no lower bound" or "no upper bound" on a range, we now useMaybe[[]byte]whereNothingmeans "no bound" andSomemeans "bound exists."How this was tested
Updating existing UT.