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

clarify offsets serialization #2043

Merged
merged 1 commit into from
Sep 9, 2020
Merged

clarify offsets serialization #2043

merged 1 commit into from
Sep 9, 2020

Conversation

protolambda
Copy link
Collaborator

Small PR to clarify the offset length used in SSZ, thanks @imnisen, fix #1963.

Alternatively we could use sum(fixed_lengths + variable_lengths[:i]).to_bytes(BYTES_PER_LENGTH_OFFSET, "little"), but I think it's fine to just explicitly state it is an uint32, as the offset length is a constant, not configurable.

@protolambda protolambda added scope:SSZ Simple Serialize general:presentation Presentation (as opposed to content) labels Sep 9, 2020
Copy link
Contributor

@hwwhww hwwhww left a comment

Choose a reason for hiding this comment

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

LGTM

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
general:presentation Presentation (as opposed to content) scope:SSZ Simple Serialize
Projects
None yet
Development

Successfully merging this pull request may close these issues.

SSZ definition serialize number unclear?
2 participants