-
Notifications
You must be signed in to change notification settings - Fork 3.8k
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
Please expose the block height slashes occured at in x/evicence queries #15338
Comments
You can do this. You query for events where |
@alexanderbez, this is not what I'm asking for or saying. I know this to be true. If you want to use this in a frontend, you need to be running a full node. There needs to be a way to query this information without one. |
right now the infraction height isn't even included in the event: kintsugi-tech@972ac7f |
+1 this is essentially unusable to any frontend/app that consumes the SDK because of the dependency on archive nodes and speed of searching events |
This query can be supported without needing to change the data schema. Are you trying to do this within the state machine? |
@tac0turtle, i'm not sure what you mean by "in the state machine", would you mind expanding a little? on the surface level, we'd like to be able to query the SDK via an RPC call to answer questions like "for a given validator, what slashes have occurred." it would be fine if this was RPC-only, though i think a proper solution would make this queryable inside of a transaction. |
within a another module or smart contract. We will look into this. It might require some more changes. Is there a timeline you are needing this feature? |
I have no idea what you're asking for TBH. The issue description isn't clear. |
@alexanderbez i don't know how to ask this more clearly. what part of this doesn't make sense? |
@tac0turtle thanks for the response. there is no particular timeline. for now we've written our own custom indexing to get around the problem on a fork. |
If you're looking for indexing solutions, they already exist. |
@alexanderbez, I'm not looking for indexing solutions. I'm looking for a way to query the SDK to get the slash history for a particular validator. I can't tell if you're trolling or taking this seriously. |
not sure why this was closed, we should still triage this and see what can be provided as the current search for evidence is subpar offchain indexing or not |
that would be amazing if we could get validator slashing details without archive node dependency |
@0xekez and @kj89 -- the SDK does not store slashing occurrences/records in state, it only executes the actual slashing logic which, as byproduct, emits events, which you can than query (as these happen in Begin/EndBlock). So to answer your question -- you cannot directly query the SDK for these. It would also make no sense to store these because they would only increase state bloat w/o any added benefit or use to the state machine (x/staking and x/slashing don't need to know). |
Hey after much consideration we opted to create a offchain inprocess indexer to help build complex queries where data like this will live. This is in effort to reduce the IO of the state machine. This. is the epic for the work #20352 |
ValidatorSlashEvent does not expose the block height the slash occured. "Height is implicit within the store key" is mentioned in the docs, but unless there is a way to query the height, this is not useful to non-sdk-modules. It would be amazing to have a way to query "for a given validator, what slash events have occured" 🙏.
The text was updated successfully, but these errors were encountered: