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

Rm content related to Im-Online Pallet #5825

Merged
merged 5 commits into from
May 3, 2024
Merged
Show file tree
Hide file tree
Changes from 4 commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
6 changes: 0 additions & 6 deletions docs/general/glossary.md
Original file line number Diff line number Diff line change
Expand Up @@ -427,12 +427,6 @@ governance allows decisions to be made transparently. Note that there are a vari
algorithms for making these decisions, such as simple majority voting, adaptive quorum biasing, or
identity-based quadratic voting.

## Online Message

This is a message that is broadcast by a validator to verify to the network that the validator is
online, even if they haven't published a block this epoch. This is sometimes referred to as
"ImOnline".

## Polkadot OpenGov

Previously known as Governance v2 (Gov2) during early development,
Expand Down
1 change: 0 additions & 1 deletion docs/learn/learn-cryptography.md
Original file line number Diff line number Diff line change
Expand Up @@ -101,7 +101,6 @@ broadcast this certificate via an extrinsic.
- BABE: sr25519
- BEEFY: ecdsa
- GRANDPA: ed25519
- I'm Online: sr25519
- Parachain Assignment: sr25519
- Parachain Validator: ed25519

Expand Down
12 changes: 5 additions & 7 deletions docs/learn/learn-nominator.md
Original file line number Diff line number Diff line change
Expand Up @@ -300,9 +300,7 @@ over the validators' websites to see who they are, what kind of infrastructure s
reputation, the vision behind the validator, and more.

Any problematic behavior must be taken seriously. An example of problematic behavior will be if a
validator is regularly offline. In this case, nominators most likely would get fewer rewards. If
many validators are [unreachable](learn-staking.md#unresponsiveness), such validators and
corresponding nominators will be slashed.
validator is regularly offline. In this case, nominators will get fewer rewards.

![Validator Stats](../assets/validator_stats.png)

Expand Down Expand Up @@ -354,10 +352,10 @@ As long as you have nominated more than one validator candidate, at least one of
and you are nominating with enough stake to get into the solution set, your bonded stake will be
fully distributed to one or more validators. That being said, you may not receive rewards if you
nominated very few validator candidates and no one got elected, or your stake is small, and you are
not part of the [top 22,500 nominators](./learn-staking-advanced.md#bags-list), or the validator
you are nominating has 100% commission. It is generally wise to choose as many trustworthy
validators as you can {{ polkadot: (up to 16) :polkadot }}{{ kusama: (up to 24) :kusama }} to reduce
the risk of none of your nominated validators being elected.
not part of the [top 22,500 nominators](./learn-staking-advanced.md#bags-list), or the validator you
are nominating has 100% commission. It is generally wise to choose as many trustworthy validators as
you can {{ polkadot: (up to 16) :polkadot }}{{ kusama: (up to 24) :kusama }} to reduce the risk of
none of your nominated validators being elected.

:::info Not receiving Staking Rewards?

Expand Down
51 changes: 0 additions & 51 deletions docs/learn/learn-staking-advanced.md
Original file line number Diff line number Diff line change
Expand Up @@ -275,57 +275,6 @@ reputation will be able to charge slightly higher commission fees (which is fair

## Slashing

### Unresponsiveness

For every session, validators will send an "I'm online" heartbeat to indicate they are live. If a
validator produces no blocks during an epoch and fails to send the heartbeat, it will be reported as
unresponsive. Slashing may occur depending on the repeated offenses and how many other validators
were unresponsive or offline during the epoch.

Validators should have a well-architected network infrastructure to ensure the node runs to reduce
the risk of slashing or chilling. A high availability setup is desirable, preferably with backup
nodes that kick in **only once the original node is verifiably offline** (to avoid double-signing
and being slashed for equivocation - see below). A comprehensive guide on validator setup is
available [here](../maintain/maintain-guides-secure-validator.md).

Here is the formula for calculating slashing due to unresponsiveness:

Let x = offenders, n = total no. validators in the active set

min((3 * (x - (n / 10 + 1))) / n, 1) * 0.07

The examples demonstrate how to calculate the slashing penalty for unresponsiveness.

:::note

In all of the examples, assume that there are 100 validators in the active set.

:::

No slashing would enact if <= 10% of all validators are unresponsive.

For example, if exactly 10 validators were unresponsive, the expression 3 _ (x - (n / 10 + 1))) / n
would be 3 _ (10 - (100 / 10 + 1)) / 100 = 3 \* (10 - (10 + 1)) / 100 = -0.03 which is rounded to 0.

:::note

The minimum value between 0 and 1 is 0. 0 multiplied by 0.07 is 0.

:::

If 14 validators are unresponsive, then slashing would occur, as > 10% of validators are
unresponsive.

The slashing penalty would be min((3 _ (14 - (100 / 10 + 1))) / 100, 1) _ 0.07 = min((3 _ (14 -
11))/100, 1) _ 0.07 = min(0.09, 1) \* 0.07 = 0.6%

Similarly, if one-third of the validator set (around 33/100) are unresponsive, the slashing penalty
would be about 5%.

The maximum slashing that can occur due to unresponsiveness is 7%. After around 45% of the
validators go offline, the expression 3 _ (x - (n / 10 + 1))) / n will go beyond 1. Hence, min((3 _
(x - (n / 10 + 1))) / n, 1) \* 0.07 will be ceiled to 7%.

### Equivocation

**GRANDPA Equivocation**: A validator signs two or more votes in the same round on different chains.
Expand Down
14 changes: 5 additions & 9 deletions docs/learn/learn-staking.md
Original file line number Diff line number Diff line change
Expand Up @@ -282,8 +282,7 @@ Understandably, most of the validator nodes run on cloud service providers that
hardware specifications and high levels of availability and connectivity. Keep in mind that a
validator in the active set is supposed to be fully online and available for producing blocks. If
the active validator node goes offline due to network interruptions or a power outage, that
validator might be subject to
[slashing due to unresponsiveness](./learn-staking-advanced#unresponsiveness). As
validator will get fewer rewards. As
[Polkadot's block production mechanism](./learn-consensus.md#block-production-babe) is reasonably
resilient to a small proportion of validators going offline, no slashing is imposed until 10% of the
validators in the active set go offline. Hence, if multiple nodes are running on a single cloud
Expand Down Expand Up @@ -487,15 +486,12 @@ particular levels are not implemented or referred to in the code or in the syste
guidelines for different levels of severity for offenses. To understand how slash amounts are
calculated, see the equations in the section below.

- Level 1: isolated [unresponsiveness](./learn-staking-advanced.md/#unresponsiveness), i.e. being
offline for an entire session. Generally no slashing, only [chilling](#chilling).
- Level 2: concurrent unresponsiveness or isolated
[equivocation](./learn-staking-advanced.md/#equivocation), slashes a very small amount of the
stake and chills.
- Level 3: misconducts unlikely to be accidental, but which do not harm the network's security to
- Level 1: Isolated [equivocation](./learn-staking-advanced.md/#equivocation), slashes a very small
amount of the stake and chills.
- Level 2: misconducts unlikely to be accidental, but which do not harm the network's security to
any large extent. Examples include concurrent equivocation or isolated cases of unjustified voting
in [GRANDPA](learn-consensus.md). Slashes a moderately small amount of the stake and chills.
- Level 4: misconduct that poses serious security or monetary risk to the system, or mass collusion.
- Level 3: misconduct that poses serious security or monetary risk to the system, or mass collusion.
Slashes all or most of the stake behind the validator and chills.

If you want to know more details about slashing, please look at our
Expand Down
6 changes: 2 additions & 4 deletions docs/learn/learn-transactions.md
Original file line number Diff line number Diff line change
Expand Up @@ -50,10 +50,8 @@ account that has funds, and therefore {{ polkadot: Polkadot :polkadot }}{{ kusam
can charge a transaction fee as a way to prevent spam.

Unsigned transactions are for special cases where a user needs to submit an extrinsic from a key
pair that does not control funds. For example, validators submit unsigned transactions in the form
of "heartbeat" messages to indicate that they are online. These heartbeats must be signed by one of
the validator's [session keys](learn-cryptography.md). Session keys never control funds. Unsigned
transactions are only used in special cases because, since
pair that does not control funds. For example, validator's [session keys](learn-cryptography.md)
never control funds. Unsigned transactions are only used in special cases because, since
{{ polkadot: Polkadot :polkadot }}{{ kusama: Kusama :kusama }} cannot charge a fee for them, each
one needs its own, custom validation logic.

Expand Down
7 changes: 2 additions & 5 deletions docs/maintain/maintain-errors.md
Original file line number Diff line number Diff line change
Expand Up @@ -92,7 +92,7 @@ The below table is a reference to the errors that exists in Polkadot. It is gene
runtime's metadata.

| Pallet | Error | Documentation |
| ----------------------- | -------------------------------------- | ------------------------------------------------------------------------------------------------------------------------------------------------ |
| ----------------------- | -------------------------------------- | ------------------------------------------------------------------------------------------------------------------------------------------------ | --- |
| System (0) | | |
| | InvalidSpecName (0) | The name of specification does not match between the current runtime and the new runtime. |
| | SpecVersionNeedsToIncrease (1) | The specification version is not allowed to decrease between the current runtime and the new runtime. |
Expand Down Expand Up @@ -165,10 +165,7 @@ runtime's metadata.
| | TooSoon (3) | Cannot signal forced change so soon after last. |
| | InvalidKeyOwnershipProof (4) | A key ownership proof provided as part of an equivocation report is invalid. |
| | InvalidEquivocationProof (5) | An equivocation proof provided as part of an equivocation report is invalid. |
| | DuplicateOffenceReport (6) | A given equivocation report is valid but already previously reported. |
| ImOnline (12) | | |
| | InvalidKey (0) | Non existent public key. |
| | DuplicatedHeartbeat (1) | Duplicated heartbeat. |
| | DuplicateOffenceReport (6) | A given equivocation report is valid but already previously reported. | |
| Democracy (14) | | |
| | ValueLow (0) | Value too low |
| | ProposalMissing (1) | Proposal does not exist |
Expand Down
Loading
Loading