Skip to content

SSZ support for submitAttestationsV2 #15422

New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Merged
merged 6 commits into from
Jun 20, 2025
Merged

Conversation

Inspector-Butters
Copy link
Contributor

What type of PR is this?
Feature

What does this PR do? Why is it needed?
This PR adds SSZ support for the submitPoolAttestationsV2 beacon API.

Which issues(s) does this PR fix?
Per this PR

}
i := 0
for len(body) > 0 {
sszLen := 1 + int(body[0])
Copy link
Contributor

Choose a reason for hiding this comment

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

Why isn't this sszLen := (&eth.Attestation{}).SizeSSZ() like in the Electra case?

Copy link
Contributor Author

@Inspector-Butters Inspector-Butters Jun 20, 2025

Choose a reason for hiding this comment

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

because if I recall correctly, the ssz payload for an Attestation is 1 byte that specifies the length of the rest of the payload, and then the payload itself, and then the same for the next attestation

Ignore this.

Copy link
Contributor Author

Choose a reason for hiding this comment

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

for clarification: the reason was that since AggregationBits in Attestation is variable length, the length of the Attestation object will be added as the first byte, per SSZ spec.

@Inspector-Butters Inspector-Butters added this pull request to the merge queue Jun 20, 2025
Merged via the queue into develop with commit 9927cea Jun 20, 2025
15 checks passed
@Inspector-Butters Inspector-Butters deleted the ssz-submit-pool-atts branch June 20, 2025 17:46
Inspector-Butters added a commit that referenced this pull request Jun 20, 2025
github-merge-queue bot pushed a commit that referenced this pull request Jun 20, 2025
@Inspector-Butters Inspector-Butters restored the ssz-submit-pool-atts branch June 20, 2025 21:33
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