-
Notifications
You must be signed in to change notification settings - Fork 310
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
staking: 🎏 remove validator_definitions
method and refactor rpc::validator_info
to use consensus_set_stream
#3846
Comments
We must make this change transparent to consumers of the service (web extension). |
We should not aim to preserve API compatibility, we should instead just make it do the right thing, restricting to the list of validators above the minimum limit. |
following up on this, after it came up in #4173:
i don't have strong opinions about how we present this information via RPC, but i'd hope we can preserve the friendly ergonomics in tests! |
We should assign this during sprint planning @cratelyn |
ah. it sounds like this shouldn't be included in this sprint! pardon the noise. 👍 |
validator_definitions
methodvalidator_definitions
method and refactor rpc::validator_info to use consensus_set_stream
validator_definitions
method and refactor rpc::validator_info to use consensus_set_streamvalidator_definitions
method and refactor rpc::validator_info
to use consensus_set_stream
see #3846. > The staking component query service provides a ValidatorInfo RPC that > returns the list of registered validators, optionally filtering > Inactive validators. > > The way this method is implemented is by using an internal > ValidatorDataRead::validator_definitions methods which returns every > single definition ever submitted to the chain. This is problematic > because this list will inevitably grow quite large, turning usage of a > benign-looking method into an onerous source of I/O and expensive > rendering. this refactors the `validator_definitions` method to only return validators included within the consensus set. this will prevent the list returned from becoming too large over time.
see #3846. > The staking component query service provides a ValidatorInfo RPC that > returns the list of registered validators, optionally filtering > Inactive validators. > > The way this method is implemented is by using an internal > ValidatorDataRead::validator_definitions methods which returns every > single definition ever submitted to the chain. This is problematic > because this list will inevitably grow quite large, turning usage of a > benign-looking method into an onerous source of I/O and expensive > rendering. this refactors the `validator_definitions` method to only return validators included within the consensus set. this will prevent the list returned from becoming too large over time.
see #3846. > The staking component query service provides a ValidatorInfo RPC that > returns the list of registered validators, optionally filtering > Inactive validators. > > The way this method is implemented is by using an internal > ValidatorDataRead::validator_definitions methods which returns every > single definition ever submitted to the chain. This is problematic > because this list will inevitably grow quite large, turning usage of a > benign-looking method into an onerous source of I/O and expensive > rendering. this refactors the `validator_definitions` method to only return validators included within the consensus set. this will prevent the list returned from becoming too large over time.
see #3846. this uses the `get_validator_info` so that we only need to get a single validator definition, without having to scan through the list of all known validators.
see #3846. this builds upon the previous commit, and adds a `status` subcommand that will print the status of a validator to stdout.
see #3846. > The staking component query service provides a ValidatorInfo RPC that > returns the list of registered validators, optionally filtering > Inactive validators. > > The way this method is implemented is by using an internal > ValidatorDataRead::validator_definitions methods which returns every > single definition ever submitted to the chain. This is problematic > because this list will inevitably grow quite large, turning usage of a > benign-looking method into an onerous source of I/O and expensive > rendering. this refactors the `validator_definitions` method to only return validators included within the consensus set. this will prevent the list returned from becoming too large over time.
see #3846. > The staking component query service provides a ValidatorInfo RPC that > returns the list of registered validators, optionally filtering > Inactive validators. > > The way this method is implemented is by using an internal > ValidatorDataRead::validator_definitions methods which returns every > single definition ever submitted to the chain. This is problematic > because this list will inevitably grow quite large, turning usage of a > benign-looking method into an onerous source of I/O and expensive > rendering. this refactors the `validator_definitions` method to only return validators included within the consensus set. this will prevent the list returned from becoming too large over time.
see #3846. this uses the `get_validator_info` so that we only need to get a single validator definition, without having to scan through the list of all known validators.
see #3846. this builds upon the previous commit, and adds a `status` subcommand that will print the status of a validator to stdout.
this commit addresses @erwanor's review comment: #4263 (comment) > Frankly I would prefer that we do this in this pr, and finish this > ticket. The cumulative voting share does not matter. The reason this > command is important is that we have no way to observe validator > identities that are not part of the main staking indexed since we > merged #3846. My suggestion was about rendering the data in a table > rather than pretty-printing a toml. The command is useful if we just > render: > > * validator info (name / IK) > > * state > > * validator exchange rate > > * bonding state > > * voting power > > > The rest is bonus and completely auxiliary. What matters is that > there's some way to observe validator state. What we should tackle in > a separate issue is discoverability of validator identities. this commit prints the validator information in a table, including: * Voting Power * Commission * State * Bonding State * Exchange Rate * Identity Key * Name
see #3846. this uses the `get_validator_info` so that we only need to get a single validator definition, without having to scan through the list of all known validators.
see #3846. this builds upon the previous commit, and adds a `status` subcommand that will print the status of a validator to stdout.
this commit addresses @erwanor's review comment: #4263 (comment) > Frankly I would prefer that we do this in this pr, and finish this > ticket. The cumulative voting share does not matter. The reason this > command is important is that we have no way to observe validator > identities that are not part of the main staking indexed since we > merged #3846. My suggestion was about rendering the data in a table > rather than pretty-printing a toml. The command is useful if we just > render: > > * validator info (name / IK) > > * state > > * validator exchange rate > > * bonding state > > * voting power > > > The rest is bonus and completely auxiliary. What matters is that > there's some way to observe validator state. What we should tackle in > a separate issue is discoverability of validator identities. this commit prints the validator information in a table, including: * Voting Power * Commission * State * Bonding State * Exchange Rate * Identity Key * Name
see #3846. this uses the `get_validator_info` so that we only need to get a single validator definition, without having to scan through the list of all known validators.
see #3846. this builds upon the previous commit, and adds a `status` subcommand that will print the status of a validator to stdout.
this commit addresses @erwanor's review comment: #4263 (comment) > Frankly I would prefer that we do this in this pr, and finish this > ticket. The cumulative voting share does not matter. The reason this > command is important is that we have no way to observe validator > identities that are not part of the main staking indexed since we > merged #3846. My suggestion was about rendering the data in a table > rather than pretty-printing a toml. The command is useful if we just > render: > > * validator info (name / IK) > > * state > > * validator exchange rate > > * bonding state > > * voting power > > > The rest is bonus and completely auxiliary. What matters is that > there's some way to observe validator state. What we should tackle in > a separate issue is discoverability of validator identities. this commit prints the validator information in a table, including: * Voting Power * Commission * State * Bonding State * Exchange Rate * Identity Key * Name
The staking component query service provides a
ValidatorInfo
RPC that returns the list of registered validators, optionally filteringInactive
validators.The way this method is implemented is by using an internal
ValidatorDataRead::validator_definitions
methods which returns every single definition ever submitted to the chain. This is problematic because this list will inevitably grow quite large, turning usage of a benign-looking method into an onerous source of I/O and expensive rendering.A better solution is to instead use
ConsensusIndexRead
and filter through validator definitions that are in the consensus set (i.e. validators that are in the active set, or eligible to be promoted into it).On the other hand, this method is also used by validators to check that their submissions have been successfully recorded by the chain. To address this valid use case, we could create a
pcli query validator status
thatDefined
validator can use to inquire about their validator state.☑️ to do:
ValidatorDataRead::validator_definitions
(the state accessor doing the prefix query, not the underlying store)get_validator_info()
uses consensus set #4262penumbra_stake::component::rpc::validator_info
to useConsensusIndexRead ::consensus_set_stream
get_validator_info()
uses consensus set #4262Status
toValidatorCmd
query validator definition
only fetches one validator,query validator status
subcommand #4263query validator definition
only fetches one validator,query validator status
subcommand #4263 (comment)The text was updated successfully, but these errors were encountered: