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

Support querying for all events at specific height #2778

Closed
kostko opened this issue Mar 24, 2020 · 0 comments · Fixed by #2841
Closed

Support querying for all events at specific height #2778

kostko opened this issue Mar 24, 2020 · 0 comments · Fixed by #2841
Assignees
Labels
c:client Category: client interface c:consensus/cometbft Category: CometBFT

Comments

@kostko
Copy link
Member

kostko commented Mar 24, 2020

Currently it is only possible to subscribe to events via the various Watch* methods exposed by the backends. We should add a new method to each backend's API to retrieve all events at a specific height.

For the Tendermint backend this can be implemented by querying ABCI responses at specific height (using GetBlockResults) and converting that into events (note that some events require additional ABCI state queries).

An alternative (or a later addition as a cache) would be to separately index events in a database (e.g., a Badger database which stores per-height events as <height> <backend-id>) and then just return them when requested. This would also need to take pruning into account to prune old data based on the existing configured consensus state pruning policy.

@kostko kostko added c:client Category: client interface c:consensus/cometbft Category: CometBFT labels Mar 24, 2020
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
c:client Category: client interface c:consensus/cometbft Category: CometBFT
Projects
None yet
Development

Successfully merging a pull request may close this issue.

2 participants