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

use more optimistic block range for sync #78

Merged
merged 3 commits into from
Feb 5, 2024
Merged

use more optimistic block range for sync #78

merged 3 commits into from
Feb 5, 2024

Conversation

fhenneke
Copy link
Contributor

@fhenneke fhenneke commented 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.

For testing we should monitor if there are settlements with missing information on dune compared to our database.

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.
@fhenneke fhenneke requested a review from harisang February 5, 2024 13:06
src/fetch/orderbook.py Outdated Show resolved Hide resolved
from 1 to 10

Co-authored-by: Haris Angelidakis <[email protected]>
Copy link
Contributor

@harisang harisang left a comment

Choose a reason for hiding this comment

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

Looks good.

@fhenneke fhenneke merged commit 85611db into main Feb 5, 2024
6 checks passed
@fhenneke fhenneke deleted the block_range branch February 5, 2024 16:30
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