-
Notifications
You must be signed in to change notification settings - Fork 2.1k
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
Comments
@melekes Maybe you thought about this when building the tx indexer? |
true
nope |
@jackzampolin maybe this also goes into the rpc issue... with the other pubsub stuff |
Related to #3367 |
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 ? |
No, go ahead 😄 |
#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.The text was updated successfully, but these errors were encountered: