RPC endpoint /validators is truncating validators with less than 1 voting power. At the time of this writing, there are 82 active validators on the mainnet and among them 4 validators have less than 1 voting power. /validators shows only 78 validators.
curl localhost:26657/validators
__
Good catch @winslyn. I think this has to do with uatom to atom conversions.
Validators who delegated less than one power would not be update status, so curl localhost:26657/validators would not show them.
// github.com/cosmos/cosmos-sdk/x/staking/keeper/val_state_change.go
if validator.PotentialTendermintPower() == 0 {
break
}
I think this has to do with uatom to atom conversions.
It seems that we should add error prompt for operation create validator with less uatom than one power. @jackzampolin
K so /validators is querying Tendermint validators _not_ validators from the cosmos-sdk. Tendermint does not (and should not) receive any information about validators which are non-bonded. Thus this query actually makes sense.
if you want to get the sdk validators you need to unmarshal the result from an abci query aka with this path /abci_query?path="custom/staking/validators"
http://rpc.hub.certus.one:26657/abci_query?path="custom/staking/validators"
gaiacli q staking validators returns validators in cosmos-sdkcurl localhost:26657/validators returns validators in tendermintThe validator would be in tendermint only when it staked enough token.
So a validator who bonded less than 1 atom is considered non-bonded and an inactive validator. Got it.
It seems that we should add error prompt for operation create validator with less uatom than one power.
this makes sense.
++