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

Add id column as PRIMARY KEY for evm.logs & evm.log_poller_blocks #1441

Open
wants to merge 24 commits into
base: ccip-develop
Choose a base branch
from

Commits on Sep 20, 2024

  1. Manually merged in from chainlink repo:

      BCI-3492 [LogPoller]: Allow withObservedExecAndRowsAffected to report non-zero rows affected (#14057)
    
        * Fix withObservedExecAndRowsAffected
    
        Also:
        - Change behavior of DeleteExpiredLogs to delete logs which don't match any filter
        - Add a test case to ensure the dataset size is published properly during pruning
    
        * pnpm changeset
    
        * changeset #fix -> #bugfix
    reductionista committed Sep 20, 2024
    Configuration menu
    Copy the full SHA
    3cc98be View commit details
    Browse the repository at this point in the history

Commits on Sep 24, 2024

  1. Manually merge in FilteredLogs receive []Expression from upstream

    commit 2761cd5
    Author: Juan Farber <[email protected]>
    Date:   Wed Sep 4 17:16:00 2024 -0300
    
        [BCI-3988] - FilteredLogs receive []Expression instead of whole KeyFilter (#14109)
    
        * FilteredLogs receive []Expression instead of whole KeyFilter
    
        * remove key from query.Where KeyFilter creation
    
        * add changeset
    
        * remove brackets from changeset
    
        * fix usage
    
        * fix comment lint
    
        * remove todo
    
        * refactor based on comments
    
        * add where func inside logpoller without key
    
        * fix reference
    reductionista committed Sep 24, 2024
    Configuration menu
    Copy the full SHA
    679ba08 View commit details
    Browse the repository at this point in the history
  2. Configuration menu
    Copy the full SHA
    7456353 View commit details
    Browse the repository at this point in the history
  3. Add id column as PRIMARY KEY for evm.logs & evm.log_poller_blocks

    Also:
       - Add UNIQUE INDEXes to replace previous primary keys (still necessary, both for
         optimizing queries and for enforcing uniqueness constraints)
       - Replace all SELECT *'s with helper functions for selecting all columns
       - Refactor nestedBlockQuery into withConfs, and make a bit more use of it
    reductionista committed Sep 24, 2024
    Configuration menu
    Copy the full SHA
    5b22a24 View commit details
    Browse the repository at this point in the history
  4. Clean up db indexes

    Some of the columns in these indexes (such as created_at) are no longer used.
    Others were not optimized for the queries we need.
    reductionista committed Sep 24, 2024
    Configuration menu
    Copy the full SHA
    b023353 View commit details
    Browse the repository at this point in the history
  5. Configuration menu
    Copy the full SHA
    d153367 View commit details
    Browse the repository at this point in the history
  6. Configuration menu
    Copy the full SHA
    b0b82b6 View commit details
    Browse the repository at this point in the history
  7. Update test for fromBlock >= :block_number

    Previously it was using fromBlock > :block_number which is inconsistent
    with the other fromBlocks in queries
    reductionista committed Sep 24, 2024
    Configuration menu
    Copy the full SHA
    62b650b View commit details
    Browse the repository at this point in the history
  8. Configuration menu
    Copy the full SHA
    ef6a78b View commit details
    Browse the repository at this point in the history
  9. Configuration menu
    Copy the full SHA
    f311f7d View commit details
    Browse the repository at this point in the history
  10. Fix bug in merged commit from develop

    On a node with more than one chain, each LogPoller would have deleted all logs from chains it's not
    running on! Because of the LEFT JOIN, ON evm_chain_id = $1 does not filter out any rows where evm_chain_id != $1;
    only WHERE evm_chain_id = $1 can do that
    reductionista committed Sep 24, 2024
    Configuration menu
    Copy the full SHA
    ea8e250 View commit details
    Browse the repository at this point in the history
  11. Configuration menu
    Copy the full SHA
    079120f View commit details
    Browse the repository at this point in the history
  12. Configuration menu
    Copy the full SHA
    5d24721 View commit details
    Browse the repository at this point in the history
  13. Configuration menu
    Copy the full SHA
    3d65b90 View commit details
    Browse the repository at this point in the history
  14. Configuration menu
    Copy the full SHA
    5949fe0 View commit details
    Browse the repository at this point in the history
  15. Configuration menu
    Copy the full SHA
    dfc58c8 View commit details
    Browse the repository at this point in the history
  16. Configuration menu
    Copy the full SHA
    1ffb5c4 View commit details
    Browse the repository at this point in the history
  17. Configuration menu
    Copy the full SHA
    097aec6 View commit details
    Browse the repository at this point in the history
  18. Configuration menu
    Copy the full SHA
    d02e394 View commit details
    Browse the repository at this point in the history

Commits on Sep 25, 2024

  1. Fix UnmatchedLogs query

    reductionista committed Sep 25, 2024
    Configuration menu
    Copy the full SHA
    10eb4df View commit details
    Browse the repository at this point in the history
  2. Configuration menu
    Copy the full SHA
    ae7d150 View commit details
    Browse the repository at this point in the history
  3. Configuration menu
    Copy the full SHA
    5ee61dc View commit details
    Browse the repository at this point in the history
  4. Configuration menu
    Copy the full SHA
    a5df432 View commit details
    Browse the repository at this point in the history
  5. Configuration menu
    Copy the full SHA
    f703802 View commit details
    Browse the repository at this point in the history