The following code is incomplete:
slashes() {
return "n/a" //TODO: add slashes
},
commission() {
return "n/a" //TODO: add commission
},
uptime() {
return "n/a" //TODO: add real uptime
},
yourRewards() {
return "n/a"
},
Scope:
validator.commissionUptime (%) = signingInfo.signed_blocks_counter * 100/ (latest_block_height - signingInfo.start_height)
Slashes: I guess we'll have to query the unjailed messages from the txs. There's no counter for the amount of slashes/jails in the validator/signingInfo
yourRewards: rewardPool * (yourShares / allShares)
Uptime can be calculated from the validator signing info endpoint:
Uptime (%) = signingInfo.signed_blocks_counter * 100/ (latest_block_height - signingInfo.start_height)
100 blocks is not much. Maybe go for 10000 blocks? Plus I feel a lot will have like 99.99% uptime which doesn't say much. How about displaying failed blocks?
Slashes: I guess we'll have to query the unjailed messages from the txs. There's no counter for the amount of slashes/jails in the validator/signingInfo
How about adding this to the queriers?
@faboweb the *100 is to calculate the % 馃槃
How about adding this to the queriers?
This would have to go on a signing info querier. Although I'm not convinced that we need a querier for this as we definitely want light client proof in the signatures
@faboweb I think adding a slashing/jailed counter on the sdk would make sense. cc: @cwgoes
@faboweb the *100 is to calculate the % 馃槃
ahhhh hahahahaah sorry nvm
@faboweb I think adding a slashing/jailed counter on the sdk would make sense. cc: @cwgoes
Can you further explicate? To find the number of slashes or jail/unjails within a certain block range you can query the events by tag and sum up the length of the array. Is that not a workable solution?
I don't think we want to track unnecessary data in consensus state. In the future special indexing nodes could do such a thing, but that's probably out of scope prelaunch.
Querying all slashing txs for a certain range and then mapping them to validators might be a good solution.
Possibly related to https://github.com/cosmos/voyager/issues/1285.
Most helpful comment
Can you further explicate? To find the number of slashes or jail/unjails within a certain block range you can query the events by tag and sum up the length of the array. Is that not a workable solution?
I don't think we want to track unnecessary data in consensus state. In the future special indexing nodes could do such a thing, but that's probably out of scope prelaunch.