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

[Hotfix] Update latest block query #71

Merged
merged 1 commit into from
Jan 26, 2024
Merged

Conversation

fhenneke
Copy link
Contributor

@fhenneke fhenneke commented Jan 26, 2024

Dune uploads are broken at the moment due to a change to the settlements table in our database. This PR changes the query to be compatible with that change.

Instead of looking at the earliest block without some transaction data in the settlements table we now look at the latest block in the settlement_observations table.

This should work with both the new and old format of the settlements table.

Tests passed locally.

the format of the settlements table will be changed.
instead of looking at the earlies block without some transaction data
we now look at the latest block with settlement observations

this should work with both the new and old format of the settlements table
@fhenneke fhenneke requested a review from harisang January 26, 2024 19:09
@harisang harisang merged commit d6f34e0 into main Jan 26, 2024
2 of 6 checks passed
@harisang harisang deleted the update_latest_block_query branch January 26, 2024 22:38
@harisang harisang mentioned this pull request Jan 27, 2024
fhenneke added a commit that referenced this pull request Feb 5, 2024
This PR addresses issue #72. At the moment the block range is computed
using the minimum of the latest finalized block from production and
staging and subtracting `REORG_THRESHOLD = 65`. This was done as a hot fix in #71.
One problem with this approach is that having few settlements in staging
blocks upload of production data to dune.

This PR changes the behavior to look at the maximum block of the latest
finalized blocks from production and staging subtracting
`MAX_PROCESSING_DELAY = 1`. This should leave enough time for the autopilot
to process settlements after finalization in staging and production.
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