Skip to content

Support SSZ request body for POST /eth/v2/validator/aggregate_and_proofs - #17318

Open
syjn99 wants to merge 2 commits into
developfrom
feat/aggregate-and-proof-ssz-request
Open

Support SSZ request body for POST /eth/v2/validator/aggregate_and_proofs#17318
syjn99 wants to merge 2 commits into
developfrom
feat/aggregate-and-proof-ssz-request

Conversation

@syjn99

@syjn99 syjn99 commented Aug 7, 2026

Copy link
Copy Markdown
Member

What type of PR is this?

Feature

What does this PR do? Why is it needed?

https://github.com/ethereum/beacon-APIs/blob/4b4d89a20254d05e2b94c75c8cfd5170ccb77a36/apis/validator/aggregate_and_proofs.v2.yaml#L27-L29

As per beacon-APIs spec, accept application/octet-stream content type (= SSZ encoded) and decode SSZ List. This PR doesn't change our VC side: Prysm VC still sends JSON-encoded AggregateAndProof message.

This PR also includes a helper function using fastssz's DecodeDynamicLength and UnmarshalDynamic which are already used in our generated *.ssz.go files. First 4 bytes of SSZ List indicates the offset, so it needs to read that part first and it keeps unmarshalling (dynamically) until the byteslice ends.

Which issue(s) does this PR fix?

N/A

Other notes for review

Acknowledgements

  • I have read CONTRIBUTING.md.
  • I have included a uniquely named changelog fragment file.
  • I have added a description with sufficient context for reviewers to understand this PR.
  • I have tested that my changes work as expected and I added a testing plan to the PR description (if applicable).

@james-prysm

Copy link
Copy Markdown
Contributor

will prysm use of this be added later?

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants