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(graph-gateway): avoid processing chain heads older than latest seen block #571

Merged
merged 3 commits into from
Feb 1, 2024

Conversation

LNSD
Copy link
Contributor

@LNSD LNSD commented Feb 1, 2024

This Pull Request aims to address an issue where the processing of chain heads older than the latest seen block can occur due to an RPC provider reverting to and reporting a block number before the previously known block number. This can lead to a degradation in the system's performance and perceived reliability (and unnecessary processing).

See the postmortem report here.

  • Add a check to ensure that only subsequent chain heads to the latest seen block are processed. If the reported head block number is older, a warning log is issued, and the block cache is not updated, as if the RPC provider went offline.

@LNSD LNSD requested a review from Theodus February 1, 2024 10:37
@LNSD LNSD self-assigned this Feb 1, 2024
Copy link
Member

@Theodus Theodus left a comment

Choose a reason for hiding this comment

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

LGTM. Some suggestions

gateway-framework/src/chains/mod.rs Outdated Show resolved Hide resolved
gateway-framework/src/chains/mod.rs Outdated Show resolved Hide resolved
@LNSD LNSD merged commit b3ce887 into main Feb 1, 2024
1 check passed
@LNSD LNSD deleted the lnsd/latest-seen-block branch February 1, 2024 16:22
@Theodus Theodus mentioned this pull request Feb 2, 2024
Theodus added a commit that referenced this pull request Feb 2, 2024
# Release Notes
- fix: add optimistic indexer query fee to client query total (#567)
- fix: retry network params fetch (#568)
- fix: value conversion for TAP receipt (#570)
- fix: avoid processing chain heads older than latest seen block (#571)
- fix: truncate indexer errors before processing (574d09b)
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