Skip to content

[events] Single-chunk query engine #663

Description

@urvisavla

Bring the single-chunk query engine from rpc-hack into feature/full-history. Stacks on #756, which lands the Reader interface and the hot/cold stores it builds on. The rpc-hack query.go is a reference, not a spec — clean up and rewrite as you see fit.

Implement Query: run a set of filters against one chunk and return the matching events, ordered and capped. Built on the Reader interface, so it serves the hot store and cold segments without tier branching.

Scope:

  • Filter semantics — AND within a filter (contract ID, topics 0–3), union across filters, restricted to an optional ledger range.
  • Cap at MaxEvents, ascending or descending. (rpc-hack is ascending-only; descending is added here.)
  • Post-filter to drop term-hash collision false positives.

Out of scope: routing a query across multiple segments.

Add tests for filter combinations, ledger-range clipping, ordering and limit in both directions, and post-filter rejection.

Activity

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Metadata

Metadata

Assignees

Type

No type

Projects

Relationships

None yet

Development

No branches or pull requests

Issue actions