merge develop into main (sql view optimization changes) #116
Open
elai-boosted wants to merge 28 commits intodevelopfrom
Open
merge develop into main (sql view optimization changes) #116elai-boosted wants to merge 28 commits intodevelopfrom
elai-boosted wants to merge 28 commits intodevelopfrom
Conversation
* feat: enhance datadog metrics reporting (#95) * improve metrics reporting for db stats and blocks processing rate * remove excess extra lines * adds simple unit tests (#98) * feat(axb-156): Updated registered voters view to incorporate voting power from rewards (#97) * updated registered voters view * update * updated comments * View creation improvements (#99) * decouples view creation from indexer start to avoid blocking indexer on sql errors * executes view queries as a transaction, uses drop view + create view rather than create or replace * sets config variables to backfill testnet from block 207,230,000 (#100) * adjust retry delay * disable database metrics capture * complete backfill, returning to live mode (#101) * Introduce env-based config selection for network indexing (#104) * Setup 3 mainnet environments (#102) * Fork main as-is * Remove testnet toml * Update configs for truth as of right now * Rename dev to development * Pick up correct config * Switch back to INDEXER_ENVIRONMENT * Set new mainnet contract * added staging workflow --------- Co-authored-by: Youssef-Boosted <[email protected]> * Partially revert "Setup 3 mainnet environments" (#103) * Revert "Setup 3 mainnet environments (#102)" This reverts commit fbae78a. * keep the staging gh pipeline * Introduce env-based config selection for network indexing --------- Co-authored-by: jefag <[email protected]> Co-authored-by: Youssef-Boosted <[email protected]> --------- Co-authored-by: Pierre Haroun <[email protected]> Co-authored-by: elai-boosted <[email protected]> Co-authored-by: Pierre Haroun <[email protected]> Co-authored-by: jefag <[email protected]> Co-authored-by: Youssef-Boosted <[email protected]>
* enable new prod indexing * dont deploy to old prod anymore
* preliminary optimizations to sql views * fixes on delegation events * updated proposal voting history
* feat(views): add unstake and withdraw events to user_activities * fix: include unstake_all and withdraw_all events in user_activities view * fix(sql): parse amount from logs for unstake_all and withdraw_all * fix(sql): filter failed receipts for unstake and withdraw * chore: add CI workflows from main (hos-dev/stg/prd)
* fix: deduplicate registered voters using ROW_NUMBER * fix(views): deduplicate vplu by registered_voter_id to handle relayer events * refactor(views): remove ROW_NUMBER deduplication per performance feedback, keeping vplu fix * fix(views): apply Elaine's feedback - remove signer fallback in vplu, deduplicate delegation_events join
…torage_deposit (#123) * fix: deduplicate registered voters using ROW_NUMBER * fix(views): deduplicate vplu by registered_voter_id to handle relayer events * refactor(views): remove ROW_NUMBER deduplication per performance feedback, keeping vplu fix * fix(views): apply Elaine's feedback - remove signer fallback in vplu, deduplicate delegation_events join * Use on_lockup_deployed + storage_deposit instead of deploy_lockup + storage_deposit * fix(views): remove DISTINCT ON from delegation_events join to fix VP regression The DISTINCT ON (delegator_id) was picking ft_burn events over ft_mint, causing the delegate_event = 'ft_mint' filter to fail and making delegating voters show their full principal balance instead of 0. Restores the direct LEFT JOIN while keeping registered_voter_id instead of signer_account_id for the join key. * harden --------- Co-authored-by: Atomauro <[email protected]>
… for duplications (#126) * fix(views): use ft_burn amount for delegation_events.near_amount * fix(views): remove json unnest to prevent duplicate delegation events * fix(sql): remove unnested_logs bug from id generation
This file contains hidden or 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
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
What's new?
Please include a summary of the change and any issues fixed. Please also include relevant motivation and context. List any dependencies that are required for this change.
How was this tested?
Please include a summary of the testing conducted to validate the change(s) introduced in this PR. Include screenshots as applicable.
Please use the following checklist as a guideline and remove any irrelevant options