Skip to content

Add SSZ response to HTTP API endpoints - #8907

Merged
mergify[bot] merged 33 commits into
sigp:unstablefrom
PoulavBhowmick03:api_ssz_response
Aug 14, 2026
Merged

mergify[bot] merged 33 commits into
sigp:unstablefrom
PoulavBhowmick03:api_ssz_response

Conversation

@PoulavBhowmick03

Copy link
Copy Markdown
Contributor

Issue Addressed

Closes #8892

Proposed Changes

Adds SSZ response support to several endpoints for Beacon API spec compliance.

  • GET /eth/v1/beacon/states/{state_id}/pending_consolidations
  • GET /eth/v1/beacon/states/{state_id}/pending_deposits
  • GET /eth/v1/beacon/states/{state_id}/pending_partial_withdrawals
  • GET /eth/v2/validator/aggregate_attestation
  • GET /eth/v1/validator/attestation_data
  • POST /eth/v1/beacon/states/{state_id}/validator_identities

@eserilev

Copy link
Copy Markdown
Member

Thanks for working on this. Can you write tests for the ssz routes? There's examples in the codebase for other ssz routes we test that you can use as an example

@PoulavBhowmick03

Copy link
Copy Markdown
Contributor Author

Thanks for working on this. Can you write tests for the ssz routes? There's examples in the codebase for other ssz routes we test that you can use as an example

Sure! Doing so

@chong-he

chong-he commented Mar 5, 2026 •

Copy link
Copy Markdown
Member

CI is failing, can you address it @PoulavBhowmick03? Thanks

Edit: looks like it is due to an update in cargo sort that causes it to fail. please ignore it.

@chong-he chong-he added waiting-on-author The reviewer has suggested changes and awaits thier implementation. HTTP-API labels Mar 5, 2026
@mergify mergify Bot added ready-for-review The code is ready for review and removed waiting-on-author The reviewer has suggested changes and awaits thier implementation. labels Mar 5, 2026
@chong-he
chong-he self-requested a review March 5, 2026 07:01

@chong-he chong-he left a comment

Copy link
Copy Markdown
Member

Choose a reason for hiding this comment

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

I have tested the endpoints and they are working.

I think we should also add the SSZ-equivalent test for: test_get_validator_attestation_data and test_beacon_states_validator_identities as well. Would be great to have those tests

Comment thread beacon_node/http_api/tests/tests.rs
Comment thread common/eth2/src/types.rs Outdated
Comment thread beacon_node/http_api/src/beacon/states.rs Outdated
@chong-he chong-he added waiting-on-author The reviewer has suggested changes and awaits thier implementation. and removed ready-for-review The code is ready for review labels Mar 9, 2026
@PoulavBhowmick03

Copy link
Copy Markdown
Contributor Author

@chong-he do take a look again! thanks

@chong-he chong-he left a comment

Copy link
Copy Markdown
Member

Choose a reason for hiding this comment

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

Thanks for the changes, I can see the tests are added, but I got another comment as below. I am sorry for another back-and-forth as I should have identified this and commented in the last review but I didn't realize this back then.

Comment thread common/eth2/src/lib.rs Outdated
Comment thread beacon_node/http_api/tests/tests.rs Outdated
@chong-he

chong-he commented Mar 17, 2026 •

Copy link
Copy Markdown
Member

CI is failing

You can run the test locally: cargo test -p http_api --release test_name to be sure that it is happy

@chong-he chong-he left a comment

Copy link
Copy Markdown
Member

Choose a reason for hiding this comment

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

I just did a very minor rearrange for the function post_bytes_opt_accept_header so that all the post_with_timeout_* are together.

This PR looks great now. Thanks for sticking on it.

@chong-he chong-he added ready-for-review The code is ready for review and removed waiting-on-author The reviewer has suggested changes and awaits thier implementation. stale Stale PRs that have been inactive and is now outdated labels Jun 12, 2026
@chong-he

Copy link
Copy Markdown
Member

merge conflict if you have time to resolve, that will be great @PoulavBhowmick03

@PoulavBhowmick03

Copy link
Copy Markdown
Contributor Author

merge conflict if you have time to resolve, that will be great @PoulavBhowmick03

Fixed the merge conflicts!

@mergify

mergify Bot commented Jun 19, 2026

Copy link
Copy Markdown

Some required checks have failed. Could you please take a look @PoulavBhowmick03? 🙏

@mergify mergify Bot added waiting-on-author The reviewer has suggested changes and awaits thier implementation. and removed ready-for-review The code is ready for review labels Jun 19, 2026
@chong-he

Copy link
Copy Markdown
Member

Some more conflicts to resolve @PoulavBhowmick03

@mergify mergify Bot closed this Aug 13, 2026
@mergify

mergify Bot commented Aug 13, 2026

Copy link
Copy Markdown

Hi @PoulavBhowmick03, this pull request has been closed automatically due to 30 days of inactivity. If you’d like to continue working on it, feel free to reopen at any time.

@mergify mergify Bot added the stale Stale PRs that have been inactive and is now outdated label Aug 13, 2026
@chong-he chong-he reopened this Aug 14, 2026
@mergify

mergify Bot commented Aug 14, 2026 •

Copy link
Copy Markdown

Queued — the merge queue status continues in this comment ↓.

@chong-he chong-he added ready-for-review The code is ready for review and removed stale Stale PRs that have been inactive and is now outdated labels Aug 14, 2026
@mergify mergify Bot removed the waiting-on-author The reviewer has suggested changes and awaits thier implementation. label Aug 14, 2026
@mergify

mergify Bot commented Aug 14, 2026 •

Copy link
Copy Markdown

Merge Queue Status

This pull request spent 30 minutes 51 seconds in the queue, including 29 minutes 19 seconds running CI.

Required conditions to merge

@mergify mergify Bot added the queued label Aug 14, 2026
@mergify
mergify Bot merged commit 512345d into sigp:unstable Aug 14, 2026
61 of 62 checks passed
@mergify mergify Bot removed the queued label Aug 14, 2026
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

HTTP-API ready-for-review The code is ready for review

Projects

None yet

Development

Successfully merging this pull request may close these issues.

3 participants