Skip to content
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

Return 404 error if no sync committee contribution is available #440

Open
wants to merge 1 commit into
base: master
Choose a base branch
from

Conversation

nflaig
Copy link
Collaborator

@nflaig nflaig commented Apr 7, 2024

Clarify that 404 status code (error) should be returned if no sync committee contribution is available for the requested beacon_block_root.

See related PR #380 that added the same note for no aggregated attestation available.

Comment on lines +14 to +15
A 404 error must be returned if no sync committee contribution is available
for the requested `beacon_block_root`.
Copy link
Collaborator

Choose a reason for hiding this comment

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

is the implication here if the block denoted by beacon_block_root is not present?

Are there any other reason we'd not see a contribution?

eg. if i request sync committee contribution from 12 months ago, and only 6 months blocks are stored, then i'd expect 404...

Copy link
Collaborator Author

@nflaig nflaig Apr 7, 2024

Choose a reason for hiding this comment

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

is the implication here if the block denoted by beacon_block_root is not present?

The two conditions I see where a 404 should be returned is if

  • block as denoted by beacon_block_root is not known or not a descendant of the finalized root, as determined by fork choice
  • or if beacon node did not prepare a contribution for beacon_block_root, this might be implementation specific but can happen if validator client did not submit a sync committee signature earlier in the slot

eg. if i request sync committee contribution from 12 months ago, and only 6 months blocks are stored, then i'd expect 404...

This API is part of validator APIs which are not intended to serve historical data so I am not sure this is a case we need to consider here. At least in Lodestar we serve this data from a cache which prunes any data from previous slots based on clock slot.

But yes, that would result in a 404 as well..

Unless I am missing something there is no equivalent to getAggregatedAttestation, so would have to request the whole block to get sync committee contributions from 12 months ago.

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.

None yet

2 participants