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

graphql: check for existence first when querying list of blocks #24190

Merged
merged 1 commit into from
Jan 5, 2022

Conversation

s1na
Copy link
Contributor

@s1na s1na commented Jan 4, 2022

Fixes #24167

New behaviour is that the endpoint returns results only for available blocks without returning an error when it doesn't find a block. Note we skip any block after a non-existent block.

This adds a header fetch for every block in range (even if header is not needed). Alternatively we can do the check in every field's resolver method to avoid this overhead.

@s1na s1na requested a review from gballet as a code owner January 4, 2022 17:39
@fjl fjl added this to the 1.10.15 milestone Jan 4, 2022
@fjl fjl merged commit c0d17bc into ethereum:master Jan 5, 2022
sidhujag pushed a commit to syscoin/go-ethereum that referenced this pull request Jan 6, 2022
Fixes ethereum#24167

New behaviour is that the endpoint returns results only for available
blocks without returning an error when it doesn't find a block. Note we
skip any block after a non-existent block.

This adds a header fetch for every block in range (even if header
is not needed). Alternatively, we could do the check in every field's
resolver method to avoid this overhead.
JacekGlen pushed a commit to JacekGlen/go-ethereum that referenced this pull request May 26, 2022
Fixes ethereum#24167

New behaviour is that the endpoint returns results only for available
blocks without returning an error when it doesn't find a block. Note we
skip any block after a non-existent block.

This adds a header fetch for every block in range (even if header
is not needed). Alternatively, we could do the check in every field's
resolver method to avoid this overhead.
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.

GraphQL blocks query for non-existent blocks causes panic
4 participants