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

Open
ethanfrey opened this issue May 17, 2019 · 6 comments
Assignees
Labels

Comments

@ethanfrey
Copy link
Contributor

@ethanfrey ethanfrey commented May 17, 2019

#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

This comment has been minimized.

Copy link
Contributor Author

@ethanfrey ethanfrey commented May 17, 2019

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

@melekes

This comment has been minimized.

Copy link
Contributor

@melekes 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

@ethanfrey

This comment has been minimized.

Copy link
Contributor Author

@ethanfrey ethanfrey commented Jun 21, 2019

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

@jackzampolin

This comment has been minimized.

Copy link
Member

@jackzampolin jackzampolin commented Jun 21, 2019

Related to #3367

@alexanderbez

This comment has been minimized.

Copy link
Contributor

@alexanderbez 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

This comment has been minimized.

Copy link
Contributor

@melekes 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
Projects
None yet
4 participants
You can’t perform that action at this time.