Skip to content

Conversation

danlaine
Copy link

@danlaine danlaine commented Jun 26, 2023

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 start or end having length 0 as meaning "no lower bound" or "no upper bound" on a range, we now use Maybe[[]byte] where Nothing means "no bound" and Some means "bound exists."

How this was tested

Updating existing UT.

@danlaine danlaine self-assigned this Jun 26, 2023
joshua-kim pushed a commit to dshiell/avalanchego that referenced this pull request Jun 26, 2023
@patrick-ogrady patrick-ogrady added this to the v1.10.5 milestone Jul 18, 2023
type workItem struct {
start []byte
end []byte
start merkledb.Maybe[[]byte]
Copy link
Contributor

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?

Copy link
Author

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

@StephenButtolph StephenButtolph modified the milestones: v1.10.5, v1.10.6 Jul 19, 2023
@danlaine
Copy link
Author

closing in favor of #1872

@danlaine danlaine closed this Aug 17, 2023
@StephenButtolph StephenButtolph deleted the merkledb-maybe-proof-bounds branch July 24, 2024 20:47
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
Projects
No open projects
Archived in project
Development

Successfully merging this pull request may close these issues.

3 participants