Repository navigation
fix: use sized integers in the inclusion list view so it caches as SSZ - #922
Closed
barnabasbusa wants to merge 1 commit into
Closed
barnabasbusa wants to merge 1 commit into
barnabasbusa wants to merge 1 commit into
Conversation
Collaborator
Author
|
Superseded by #915, which makes the same change and also tags the |
There was a problem hiding this comment.
Converts the inclusion-list view's platform-sized int fields (member list indexes, transaction indexes, client index) to uint32 so the frontend cache can marshal the page model as SSZ instead of falling back to JSON. All source values are uint16- or committee/client-table-bounded, so the conversions are lossless and the JSON output is unchanged; the new field shapes match those of other page models that already pass the cache's dynssz ValidateType. Clean change.
Reviewed 1 changed file(s) @ 06e52ffe — no blocking issues found.
"If the user can't use it, it doesn't work." — Susan Dray
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.
The frontend cache logged
page model not ssz compatible: slotinclusionlists () error="type validation failed: Committee.Lists: unsupported type: signed or unsigned integers with unspecified size are not supported in SSZ"and fell back to JSON for the inclusion list view, becauseSlotInclusionListMember.Lists,SlotInclusionListEntry.TransactionsandSlotInclusionListSeenBy.Clientused Go's platform-sizedint, which SSZ cannot encode even with extended types. They are nowuint32(list and tx indexes, client index); the JSON served to the slot page is unchanged. Checked thatSlotInclusionListsViewpassesValidateTypewith the cache's dynssz options and round-trips through SSZ.