Closed 0xantman closed 2 days ago
Thanks for the suggestion. My first impression was it would be an easy add. But after seeing the discord questions, I realized you want to model the staking controls from a validators perspective, so a contract could operate a validator (set commission, etc).
That would require quite a few more endpoints both for messages (set commission, register validator,...) and queries. And frankly I am a bit unsure if it makes sense for a contract to run a validator, because you really need a human (or three) to run the machines anyway, no contract can abstract that away.
I do see a use case to use eg. a multisig contract to control a validator, as it provides an easy way to require multiple signers on chain, and just redispatches the messages. But that would require it to redispatch the custom validator-related staking messages as well...
I think to add some more stargate-related functionality in the 0.14 cosmwasm release and maybe we add this in there. It would be helpful to see a complete use case and motivation to ensure we support this case, and there is a real need we are supporting (not just adding features to add features)
I think we should define this better and in conjunction with https://github.com/CosmWasm/cosmwasm/issues/1154 to better define what exact queries we want to support (and remember to be flexible for eg substrate integration / cw-sdk and not only cosmos sdk)
I think we should define this better and in conjunction with #1154 to better define what exact queries we want to support (and remember to be flexible for eg substrate integration / cw-sdk and not only cosmos sdk)
It would be nice to have, I'm also working on a contract that needs this query on Juno
The all delegations for a given validator query is currently not implemented efficiently in Cosmos SDK. And even if it was fast at DB level, do we really want to have a query that returns tens, maybe hundreds of thousands of JSON elements for deseralization in Wasm?
What's your use case @dimiandre? Maybe there are other ways to achieve the goal.
@dimiandre could you please check out https://github.com/CosmWasm/cosmwasm/issues/1521 and let us know which queries are of major importance for you?
Closing for now, since this is very inefficient in the SDK, is hard to implement correctly and the use-case is not really clear.
I would like to know if there is a module to query all delegators address delegating to a validator, i can't find it. Currently there is a module to query AllDelegations from a delegator this allow you to check your current delegations.
But is there an equivalent for the validator to check who is delegating to your validator? like this