Skip to content

Add clarifications regarding SSZ-snappy length prefix#4129

Merged
jtraglia merged 1 commit into
ethereum:devfrom
jtraglia:ssz-varint-clarification
Feb 15, 2025
Merged

Add clarifications regarding SSZ-snappy length prefix#4129
jtraglia merged 1 commit into
ethereum:devfrom
jtraglia:ssz-varint-clarification

Conversation

@jtraglia

Copy link
Copy Markdown
Member

This PR makes two clarifications:

  1. The SSZ-snappy length prefix (a varint) should be minimally encoded. Meaning that if, for example, a length can be encoded in 3 bytes it should be; rather than encoding the same value with more bytes, which is possible.
  2. The specification wasn't exactly explicit that the length must be stored in a type that can represent all uint64 values. It was sort of implicit in my opinion, but best to make it explicit.

This was part of a report from the Ethereum Attackathon. Thanks Troy!

@jtraglia jtraglia merged commit 9d1e708 into ethereum:dev Feb 15, 2025
@jtraglia jtraglia deleted the ssz-varint-clarification branch February 15, 2025 22:53
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant