Skip to content

gloas: encode Builder.version as a string in JSON/YAML - #42

Merged
samcm merged 1 commit into
feat/head-v2-ssefrom
fix/gloas-builder-json-version
Jul 17, 2026
Merged

gloas: encode Builder.version as a string in JSON/YAML#42
samcm merged 1 commit into
feat/head-v2-ssefrom
fix/gloas-builder-json-version

Conversation

@samcm

@samcm samcm commented Jul 17, 2026

Copy link
Copy Markdown
Member

Beacon API JSON encodes integers as strings; lighthouse returns "version": "1" and unmarshaling into a bare uint8 fails, which breaks every gloas BeaconState JSON fetch — xatu-cannon's beaconValidators deriver errors with cannot unmarshal string into Go struct field builderJSON.version of type uint8 on glamsterdam-devnet-7. MarshalYAML also dropped the field entirely. Version is now marshaled/parsed as a string like the struct's other numeric fields, with a round-trip test.

Beacon API JSON encodes integers as strings; lighthouse returns
"version": "1" and unmarshaling into a bare uint8 fails, breaking
every gloas BeaconState fetch (xatu-cannon's beaconValidators deriver
errors with 'cannot unmarshal string into Go struct field
builderJSON.version'). MarshalYAML also dropped the field entirely.
@samcm
samcm merged commit c7d5753 into feat/head-v2-sse Jul 17, 2026
3 checks passed
@samcm
samcm deleted the fix/gloas-builder-json-version branch July 17, 2026 14:14
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