Repository navigation
Conversation
Since start, end, and entryIndex will always fit in 48 bits, we can represent them either either `uint64` or `int64`. We're consolidating on `int64` to reduce the amount of casting we do (and the attendant `nolint:gosec // G115` comments).
Since start, end, and entryIndex will always fit in 48 bits, we can represent them either either `uint64` or `int64`. We're consolidating on `int64` to reduce the amount of casting we do (and the attendant `nolint:gosec // G115` comments).
aarongable
previously approved these changes
Oct 29, 2026
aarongable
left a comment
Contributor
There was a problem hiding this comment.
LGTM with one optional improvement
| if !s.ReadUint64(&start) { | ||
| return nil, errors.New("invalid start") | ||
| } | ||
| if start > math.MaxInt64 { |
Contributor
There was a problem hiding this comment.
Should this (and below) instead compare against 2^48?
Member
There was a problem hiding this comment.
Agreed. Per Appendix C.2, "The largest possible Merkle Tree in this protocol is 2^48-1", and I think we already reject anything past that in proof.Marshal() and treedb. So we want > trees.MaxSize here and below.
aarongable
requested review from
a team and
beautifulentropy
and removed request for
a team
October 29, 2026 05:05
beautifulentropy
previously approved these changes
Oct 29, 2026
aarongable
dismissed stale reviews from beautifulentropy and themself
via
October 29, 2026 15:21
de76877
aarongable
approved these changes
Oct 29, 2026
aarongable
left a comment
Contributor
There was a problem hiding this comment.
re-LGTM with same optional question
This file contains hidden or 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
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
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.
Since start, end, and entryIndex will always fit in 48 bits, we can represent them either either
uint64orint64. We're consolidating onint64to reduce the amount of casting we do (and the attendantnolint:gosec // G115comments).