Skip to content
This repository has been archived by the owner on Dec 20, 2024. It is now read-only.

[Fetch] Orderbook Rewards #3

Merged
merged 10 commits into from
Nov 22, 2022
Merged

[Fetch] Orderbook Rewards #3

merged 10 commits into from
Nov 22, 2022

Conversation

bh2smith
Copy link
Contributor

@bh2smith bh2smith commented Nov 21, 2022

We migrate a query we have seen before in solver-rewards (namely the one querying for orderbook rewards on a block range). This block range will be specified as:

block_from = the latest synced block (coming in a follow up PR)
block_to = the latest synced block from the two orderbook databases

block_to is implemented here by querying the two databases for the smallest block with tx_from = Null taking the minimum of these two and subtracting 65 (for REORG protection)

Follow Up

#6

Test Plan

Tests are introduced for both database queries (however they require database credentials).

@bh2smith bh2smith requested a review from a team November 21, 2022 20:33
@gentrexha
Copy link

@bh2smith Some of the unit tests are failing is this still to be reviewed?

@bh2smith
Copy link
Contributor Author

@bh2smith Some of the unit tests are failing is this still to be reviewed?

I am just getting the DB secrets configured here. Just a moment.

Copy link

@gentrexha gentrexha left a comment

Choose a reason for hiding this comment

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

Good work Ben!

Left some minor discussion comments for moving things around. Other than that LGTM!

@bh2smith bh2smith merged commit ed34422 into main Nov 22, 2022
@bh2smith bh2smith deleted the orderbook-data branch November 22, 2022 13:37
Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

2 participants