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

Tags supported for header subscriptions but not searches #3665

Closed
ethanfrey opened this issue May 17, 2019 · 6 comments · Fixed by #6226
Closed

Tags supported for header subscriptions but not searches #3665

ethanfrey opened this issue May 17, 2019 · 6 comments · Fixed by #6226
Assignees
Labels
C:events Component: Events feature Feature work that definitely changes system behavior

Comments

@ethanfrey
Copy link
Contributor

#915 added tags to BeginBlock/EndBlock, and they are passed into the pubsub system just like with transactions

However, with transactions, we can both subscribe and search for them. The first is great for responsive apps. The second great to get a history. With a symetrical design, we would also be able to search for blocks/headers not only by height (as now), but also tags. There recently has been some work on the tagging system #3643, so I figured this would be a good time to propose finishing the work on tagging blocks.

But what is the real use case? Simple - in order to support light-client proofs (and headers for ibc), it is very useful to get a list of all blocks where the validator set changed. That is where header.NextValidatorHash != header.ValidatorHash. I started the design to emit a tag on EndBlock whenever the App updates the validator set, which then can be subscribed to in order to find the changes. So far, this works well. However, if a client is offline and wants to catch-up, there is no clear way to locate such blocks - either built-in or making use of the tagging system.

@ethanfrey
Copy link
Contributor Author

@melekes Maybe you thought about this when building the tx indexer?

@melekes
Copy link
Contributor

melekes commented Jun 18, 2019

However, if a client is offline and wants to catch-up, there is no clear way to locate such blocks

true

Maybe you thought about this when building the tx indexer?

nope

@melekes melekes added API feature Feature work that definitely changes system behavior labels Jun 18, 2019
@ethanfrey
Copy link
Contributor Author

@jackzampolin maybe this also goes into the rpc issue... with the other pubsub stuff

@jackzampolin
Copy link
Contributor

Related to #3367

@alexanderbez
Copy link
Contributor

alexanderbez commented Oct 18, 2019

This is a big feature ask of many clients. Having worked on the events refactor recently, I think we can piggyback off of the tx-indexing system. Mind if I tackle this @melekes ?

@alexanderbez alexanderbez self-assigned this Oct 18, 2019
@melekes
Copy link
Contributor

melekes commented Oct 18, 2019

No, go ahead 😄

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
C:events Component: Events feature Feature work that definitely changes system behavior
Projects
None yet
Development

Successfully merging a pull request may close this issue.

6 participants