Lunie: Complete LiValidator.vue

Created on 14 Sep 2018  路  8Comments  路  Source: luniehq/lunie

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"
    },
high priority

Most helpful comment

@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.

All 8 comments

Scope:

  1. Commission can be returned directly from the validator.commission
  2. Uptime can be calculated from the validator signing info endpoint:

Uptime (%) = signingInfo.signed_blocks_counter * 100/ (latest_block_height - signingInfo.start_height)

  1. 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

  2. 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.

Was this page helpful?
0 / 5 - 0 ratings

Related issues

fedekunze picture fedekunze  路  3Comments

cwgoes picture cwgoes  路  4Comments

JakeHartnell picture JakeHartnell  路  3Comments

thebkr7 picture thebkr7  路  3Comments

okwme picture okwme  路  3Comments