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

Implement DSL for LogPoller #12793

Merged
merged 8 commits into from
May 16, 2024
Merged

Conversation

EasterTheBunny
Copy link
Contributor

This commit implements the query DSL within LogPoller by remapping comparer filters to
topic and word filters. A parser then creates an SQL statement from the remapped events
and queries the log poller database directly.

@EasterTheBunny EasterTheBunny changed the base branch from develop to chain-reader-event-querying2 April 11, 2024 23:33
Copy link
Contributor

github-actions bot commented Apr 12, 2024

I see you updated files related to core. Please run pnpm changeset in the root directory to add a changeset as well as in the text include at least one of the following tags:

  • #added For any new functionality added.
  • #breaking_change For any functionality that requires manual action for the node to boot.
  • #bugfix For bug fixes.
  • #changed For any change to the existing functionality.
  • #db_update For any feature that introduces updates to database schema.
  • #deprecation_notice For any upcoming deprecation functionality.
  • #internal For changesets that need to be excluded from the final changelog.
  • #nops For any feature that is NOP facing and needs to be in the official Release Notes for the release.
  • #removed For any functionality/config that is removed.
  • #updated For any functionality that is updated.
  • #wip For any change that is not ready yet and external communication about it should be held off till it is feature complete.

Copy link
Contributor

Go solidity wrappers are out-of-date, regenerate them via the make wrappers-all command

Copy link
Contributor

Go solidity wrappers are out-of-date, regenerate them via the make wrappers-all command

1 similar comment
Copy link
Contributor

Go solidity wrappers are out-of-date, regenerate them via the make wrappers-all command

Copy link
Contributor

Go solidity wrappers are out-of-date, regenerate them via the make wrappers-all command

core/chains/evm/logpoller/expression.go Outdated Show resolved Hide resolved
core/chains/evm/logpoller/expression.go Outdated Show resolved Hide resolved
core/chains/evm/logpoller/expression.go Outdated Show resolved Hide resolved
core/chains/evm/logpoller/expression.go Outdated Show resolved Hide resolved
core/chains/evm/logpoller/expression.go Outdated Show resolved Hide resolved
mateusz-sekara
mateusz-sekara previously approved these changes May 15, 2024
@@ -121,7 +121,7 @@ func (e *eventBinding) QueryKey(ctx context.Context, filter query.KeyFilter, lim
}
remapped.Expressions = append(defaultExpressions, remapped.Expressions...)

logs, err := e.lp.FilteredLogs(ctx, remapped, limitAndSort)
logs, err := e.lp.FilteredLogs(ctx, remapped, limitAndSort, e.contractName+"-"+e.eventName)
Copy link
Contributor

@ilija42 ilija42 May 15, 2024

Choose a reason for hiding this comment

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

I am not sure if this is enough from observability perspective. We can query for same event from same contract with different filters. We should either pass a queryName from QueryKey or somehow turn limitAndSort and filter into a string? Although to make it easier we can do this in a separate PR under a separate ticket.

Copy link
Contributor Author

Choose a reason for hiding this comment

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

I think a separate PR would be best to iron out the rest of this detail.

@EasterTheBunny EasterTheBunny enabled auto-merge May 15, 2024 15:19
@EasterTheBunny EasterTheBunny added this pull request to the merge queue May 16, 2024
Merged via the queue into develop with commit ecfab64 May 16, 2024
105 of 106 checks passed
@EasterTheBunny EasterTheBunny deleted the BCF-3144-query-key-pg-query branch May 16, 2024 09:31
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

3 participants