Skip to content
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

Improve visibility of slashes #4841

Open
5 tasks
traumschule opened this issue Apr 23, 2024 · 0 comments
Open
5 tasks

Improve visibility of slashes #4841

traumschule opened this issue Apr 23, 2024 · 0 comments
Labels
enhancement New feature or request scope:validators

Comments

@traumschule
Copy link
Contributor

The validators page (#4722) shows Slashed in validator details (#4327). Since p-js doesn't expose this information very well can do a better job to give operators and nominators insights\

  1. When past slashes happened to also help nominators judging the reliability of a node.
  2. If known show hints why slashes were applied (reasons are listed here and be linked in a tooltip.
  3. When multiple slashes were applied to several nodes in an era, because one criterion to be slashed is: Slashing starts when 10% of the active validators set are offline and increases in a linear manner until 44% of the validator set is offline; at this point, the slash is held at 7%.

Steps

  • When Slashed is non-zero add a tooltip with information from staking.staking.slashingSpans.prior listing the era. Add this link for reference.
  • Include a list of affected nominators.
  • When other nodes were offline in the same era include also affected with a list of those validators. See also offences.concurrentReportsIndex: Vec<H256> A vector of reports of the same kind that happened at the same time slot.
  • Make it clear of there were non-zero slashes which were actual slashes or "just" being booted for being offline to give nominators more context of what might have happened.
  • At some point a separate tab dedicated to slashes would make sense for CM and others to better assess such chain events. There also is a SlashJournalEntry exposes more relevant information. (note that i haven't found this option in our chain state yet, please add if you know details):
"SlashJournalEntry": {
        "who": "AccountId",
        "amount": "Balance",
        "ownSlash": "Balance"
      },

Details

For context: apparently there were multiple slashing spans during the early mainnet when the number of nodes was much less:

staking.slashingSpans
{
  spanIndex: 6
  lastStart: 624
  lastNonzeroSlash: 0
  prior: [
    4
    2
    11
    1
    44
    113
  ]
}

It can help to include information about offences.reports which reflect when a validator was caught offline without prior chilling. As i understand singular im-offline reports are without penalty and only contain the list of nominators like so:

offences.reports(0x4fa0b519bd241cc4233ffb729d619209b4269252d697340efb0b8e61d3f5aa95)
{
  offender: [
    j4RLnWh3DWgc9u4CMprqxfBhq3kthXhvZDmnpjEtETFVm446D
    {
      total: 23,395,766,779,102,740
      own: 2,050,000,000,000,000
      others: [
        {
          who: j4WimuwF1N3nqff211ifeGSW8q5DW8xWpsjaNf9Feds1MDo5B
          value: 2,008,697,142,401,933
        }
        {
          who: j4UduAvo4BxvuWXCfaddD1C3MtAJtNVpqWWfMMiKk1q3Hcdx6
          value: 20,543,932,750,929
        }
        {
          who: j4TN2fgVJjsATiojEnJdF4ofKx2UfGnDYEnRdrzQ1SSiAkC9o
          value: 19,316,525,703,949,878
        }
      ]
    }
  ]
  reporters: []
}
@traumschule traumschule added enhancement New feature or request scope:validators labels Apr 23, 2024
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
enhancement New feature or request scope:validators
Projects
None yet
Development

No branches or pull requests

1 participant