Skip to content

Use proper integer encoding for Union in SSZ#4725

Merged
jtraglia merged 1 commit intoethereum:masterfrom
etan-status:sz-unionjson
Nov 11, 2025
Merged

Use proper integer encoding for Union in SSZ#4725
jtraglia merged 1 commit intoethereum:masterfrom
etan-status:sz-unionjson

Conversation

@etan-status
Copy link
Contributor

From "Integers are encoded as strings", it follows that the numeric "selector" of Union should also be encoded like that. Note that Union's JSON encoding is currently unused. Portal uses it only for binary serialization.

From "Integers are encoded as strings", it follows that the numeric
"selector" of `Union` should also be encoded like that. Note that
`Union`'s JSON encoding is currently unused. Portal uses it only for
binary serialization.
Copy link

@kdeme kdeme left a comment

Choose a reason for hiding this comment

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

lgtm, Portal has SSZ Union usage in Portal wire protocol, but nowhere does/uses JSON encoding of those Unions.

@jtraglia jtraglia added the ssz Simple Serialize label Nov 5, 2025
@jtraglia jtraglia merged commit 5281d23 into ethereum:master Nov 11, 2025
15 checks passed
@etan-status etan-status deleted the sz-unionjson branch January 5, 2026 08:22
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

ssz Simple Serialize

Projects

None yet

Development

Successfully merging this pull request may close these issues.

4 participants