This repository has been archived by the owner on Feb 24, 2025. It is now read-only.
forked from blockscout/blockscout
-
Notifications
You must be signed in to change notification settings - Fork 21
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Obasilakis/voter rewards api uses voter votes table (#589)
* Add celo_voter_votes table * Add voters_activated_votes_in_last_epoch function * Add last_non_zero_voter_votes function and format * Add voter votes to celo_pending_epoch_operations * Add celo_voter_votes runner and fetcher * Buffer blocks to fetch epoch rewards and voter votes for * Add CeloVoterVotes fetcher to supervision tree * Fix query in voters_activated_votes_in_last_epoch * Pass array of blocks instead of single blocks * Add hash and number to account/group pairs in CeloVoterVotes fetcher pipeline * Lower max batch size * Remove IO.inspects * Make sure pending operations are falsified after votes are fetched * Remove duplicates before fetching votes from archive node * Reduce max_batch_size to 1 for voter votes fetcher Also dialyze * Make sure epoch blocks are ordered when buffered into voter votes fetcher * Format, credo, dialyze and remove deprecated test * Fix block fetcher tests * Set max concurrency to 1 * Change poll_interval to 60 min for voter votes fetcher * Stop buffering epoch blocks in the block fetcher The block runner takes care of that * Add PR to CHANGELOG.md * Keep large integers consistent * Set max concurrency and max batch size back to default The new way of getting account/group pairs doesn't require sequential processing * Retry unique blocks * Get all account/group pairs with activated votes instead of just last epoch * Remove leftover tag from test * Avoid homonymous multis * Set default celo_pending_epoch_operations to false * Format and dialyze * Add merge_events_with_votes_and_chunk_by_epoch function * Use celo_voter_votes to calculate voter rewards for one group * Simplify variable names * Fix test * Lower max_batch_size * Fetch and save vote only for accounts that have activated votes * Credo * Use event block_number since block_hash doesn't exist anymore * Format * Format * Update controller test
- Loading branch information
1 parent
3393ebf
commit 2796401
Showing
5 changed files
with
305 additions
and
416 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
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
Oops, something went wrong.