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

fix eth_getLogs for latest block timing issue #828

Merged
merged 4 commits into from
Sep 20, 2023
Merged

Conversation

shunjizhan
Copy link
Collaborator

@shunjizhan shunjizhan commented Sep 20, 2023

Issue

when query logs for a block as soon as it's finalized, it will return empty logs since subql is still indexing this block. This is usually fine but breaks subquery log handlers, which exactly queries logs for a block as soon as it's finalized.

Change

adds a check for get logs to make sure it waits until the indexer finished indexing required range, since now we don't support unfinalized logs, so the upper bound is latest finalized log.

Test

did some manual test locally, and the subql issue seems to be gone

@shunjizhan shunjizhan marked this pull request as ready for review September 20, 2023 08:35
@shunjizhan shunjizhan requested review from zjb0807 and xlc September 20, 2023 08:39
@shunjizhan shunjizhan changed the title fix get log for latest block timing issue fix eth_getLogs for latest block timing issue Sep 20, 2023
@shunjizhan shunjizhan requested a review from zjb0807 September 20, 2023 09:06
@shunjizhan shunjizhan merged commit 4988871 into master Sep 20, 2023
11 checks passed
@shunjizhan shunjizhan deleted the fix-log-timing branch September 20, 2023 14:42
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