-
Notifications
You must be signed in to change notification settings - Fork 5
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Make block ranges consistent (take2) (#330)
This PR is based heavily on PR #329 but proposes a slightly different convention. Specifically, it assumes that we compute a `start` and `end` block for the accounting period, and both `start` and `end` block are included in the accounting, as it seems more natural to the author. E.g., this means that for consecutive weeks, we have week 1: [a,b] week 2: [b+1, c] week 3: [c+1, d] etc. All queries (except for the vouch registry one) have been updated in the form of forks. The plan would be to test this branch locally in the upcoming payouts of Jan 9, and compare results (or alternatively, use this branch in the dry-run script) Once we are convinced that all changes are correct, we would then need to update the original Dune queries so that we continue using the same query ids. --------- Co-authored-by: Felix Henneke <[email protected]>
- Loading branch information
Showing
6 changed files
with
30 additions
and
28 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,6 +1,7 @@ | ||
-- V3: https://dune.com/queries/1541504 | ||
-- https://github.com/cowprotocol/solver-rewards/pull/330 | ||
-- V3: https://dune.com/queries/3333356 | ||
select | ||
min("number") as start_block, | ||
max("number") as end_block | ||
from ethereum.blocks | ||
where date_trunc('minute', time) between cast('{{StartTime}}' as timestamp) and cast('{{EndTime}}' as timestamp) | ||
where time >= cast('{{StartTime}}' as timestamp) and time < cast('{{EndTime}}' as timestamp) |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters