Skip to content

Add SSZ list types for gloas API request bodies - #33

Merged
KaloyanTanev merged 2 commits into
gloas-obolfrom
kalo/api-list-types
Oct 1, 2026
Merged

KaloyanTanev merged 2 commits into
gloas-obolfrom
kalo/api-list-types

Conversation

@KaloyanTanev

@KaloyanTanev KaloyanTanev commented Sep 30, 2026 •

Copy link
Copy Markdown

Adds generated SSZ list types for the two gloas API request bodies that are bare lists on the wire, mirroring api/v1.Blobs:

  • apiv1gloas.PayloadAttestationMessages — List[PayloadAttestationMessage, PTC_SIZE] (POST /eth/v1/beacon/pool/payload_attestations)
  • apiv1gloas.SignedProposerPreferencesList — List[SignedProposerPreferences, (MIN_SEED_LOOKAHEAD + 1) * SLOTS_PER_EPOCH] (POST /eth/v1/validator/proposer_preferences)

Both are registered in api/v1/gloas/generate.yaml, so dynssz-gen emits the MarshalSSZ/UnmarshalSSZ implementations (alignment and list-limit checks included). The http client's private proposerPreferencesList and its hand-written marshal loop are replaced by the exported type, so a beacon node built on this library (charon) decodes these bodies with the same generated code the client uses to encode them.

Note: the generated list types have pointer receivers, so SubmitProposerPreferences passes the list by pointer to marshalRequestBody. This is only exercised by the http tests in live mode (HTTP_ADDRESS set), which the fork's CI currently does not run; verified locally against the Platåberget beacon node.

@KaloyanTanev KaloyanTanev self-assigned this Sep 30, 2026
@KaloyanTanev
KaloyanTanev merged commit 05219be into gloas-obol Oct 1, 2026
3 of 4 checks passed
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.

2 participants