question-mark
Stuck on an issue?

Lightrun Answers was designed to reduce the constant googling that comes with debugging 3rd party libraries. It collects links to all the places you might be looking at while hunting down a tough bug.

And, if you’re still stuck at the end, we’re happy to hop on a call to see how we can help out.

Complete LiValidator.vue

See original GitHub issue

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

Issue Analytics

  • State:closed
  • Created 5 years ago
  • Comments:8 (4 by maintainers)

github_iconTop GitHub Comments

3reactions
cwgoescommented, Sep 19, 2018

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

2reactions
fedekunzecommented, Sep 19, 2018

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)

Read more comments on GitHub >

github_iconTop Results From Across the Web

Form Validation
Fairly short and simple. We define an array to hold errors and set null values for the three form fields. The checkForm logic...
Read more >
VeeValidate: Painless Vue.js forms
VeeValidate is the most popular Vue.js form library. It takes care of value tracking, validation, errors, submissions and more. Get Started Live Examples....
Read more >
Vuelidate | A Vue.js model validation library
Simple, lightweight model-based validation for Vue.js 2.0. Model based; Decoupled from templates; Dependency free, minimalistic library; Support for ...
Read more >
How To Validate Forms in Vue.js
Form field validation requires a user to fill out all required fields in a web form. The validation is typically done where the...
Read more >
Vue form input validation using watchers
Perform form validation in Vue using the watch option. Watchers are a great way to respond to data changes in a given element....
Read more >

github_iconTop Related Medium Post

No results found

github_iconTop Related StackOverflow Question

No results found

github_iconTroubleshoot Live Code

Lightrun enables developers to add logs, metrics and snapshots to live code - no restarts or redeploys required.
Start Free

github_iconTop Related Reddit Thread

No results found

github_iconTop Related Hackernoon Post

No results found

github_iconTop Related Tweet

No results found

github_iconTop Related Dev.to Post

No results found

github_iconTop Related Hashnode Post

No results found