mirror of
https://github.com/pezkuwichain/pezkuwi-subxt.git
synced 2026-04-26 04:07:57 +00:00
Update READMEs, fix links (#7176)
* Re-generate READMEs to fix doc links; set readme field in package manifests * Re-generate READMEs to fix doc links; set readme field in package manifests * Re-generate READMEs to fix doc links; set readme field in package manifests * Re-generate READMEs to fix doc links; set readme field in package manifests * Revert stuff that shouldn't have been committed * Revert stuff that shouldn't have been committed * Fix parent relative link generation * Manually remove this incorrect link for now.
This commit is contained in:
@@ -2,9 +2,9 @@
|
||||
|
||||
The Staking module is used to manage funds at stake by network maintainers.
|
||||
|
||||
- [`staking::Trait`](./trait.Trait.html)
|
||||
- [`Call`](./enum.Call.html)
|
||||
- [`Module`](./struct.Module.html)
|
||||
- [`staking::Trait`](https://docs.rs/pallet-staking/latest/pallet_staking/trait.Trait.html)
|
||||
- [`Call`](https://docs.rs/pallet-staking/latest/pallet_staking/enum.Call.html)
|
||||
- [`Module`](https://docs.rs/pallet-staking/latest/pallet_staking/struct.Module.html)
|
||||
|
||||
## Overview
|
||||
|
||||
@@ -48,16 +48,16 @@ which holds some or all of the funds that become frozen in place as part of the
|
||||
is paired with an active **controller** account, which issues instructions on how they shall be
|
||||
used.
|
||||
|
||||
An account pair can become bonded using the [`bond`](./enum.Call.html#variant.bond) call.
|
||||
An account pair can become bonded using the [`bond`](https://docs.rs/pallet-staking/latest/pallet_staking/enum.Call.html#variant.bond) call.
|
||||
|
||||
Stash accounts can change their associated controller using the
|
||||
[`set_controller`](./enum.Call.html#variant.set_controller) call.
|
||||
[`set_controller`](https://docs.rs/pallet-staking/latest/pallet_staking/enum.Call.html#variant.set_controller) call.
|
||||
|
||||
There are three possible roles that any staked account pair can be in: `Validator`, `Nominator`
|
||||
and `Idle` (defined in [`StakerStatus`](./enum.StakerStatus.html)). There are three
|
||||
and `Idle` (defined in [`StakerStatus`](https://docs.rs/pallet-staking/latest/pallet_staking/enum.StakerStatus.html)). There are three
|
||||
corresponding instructions to change between roles, namely:
|
||||
[`validate`](./enum.Call.html#variant.validate),
|
||||
[`nominate`](./enum.Call.html#variant.nominate), and [`chill`](./enum.Call.html#variant.chill).
|
||||
[`validate`](https://docs.rs/pallet-staking/latest/pallet_staking/enum.Call.html#variant.validate),
|
||||
[`nominate`](./enum.Call.html#variant.nominate), and [`chill`](https://docs.rs/pallet-staking/latest/pallet_staking/enum.Call.html#variant.chill).
|
||||
|
||||
#### Validating
|
||||
|
||||
@@ -69,7 +69,7 @@ _might_ get elected at the _next era_ as a validator. The result of the election
|
||||
by nominators and their votes.
|
||||
|
||||
An account can become a validator candidate via the
|
||||
[`validate`](./enum.Call.html#variant.validate) call.
|
||||
[`validate`](https://docs.rs/pallet-staking/latest/pallet_staking/enum.Call.html#variant.validate) call.
|
||||
|
||||
#### Nomination
|
||||
|
||||
@@ -157,7 +157,7 @@ decl_module! {
|
||||
### Era payout
|
||||
|
||||
The era payout is computed using yearly inflation curve defined at
|
||||
[`T::RewardCurve`](./trait.Trait.html#associatedtype.RewardCurve) as such:
|
||||
[`T::RewardCurve`](https://docs.rs/pallet-staking/latest/pallet_staking/trait.Trait.html#associatedtype.RewardCurve) as such:
|
||||
|
||||
```nocompile
|
||||
staker_payout = yearly_inflation(npos_token_staked / total_tokens) * total_tokens / era_per_year
|
||||
@@ -168,7 +168,7 @@ This payout is used to reward stakers as defined in next section
|
||||
remaining_payout = max_yearly_inflation * total_tokens / era_per_year - staker_payout
|
||||
```
|
||||
The remaining reward is send to the configurable end-point
|
||||
[`T::RewardRemainder`](./trait.Trait.html#associatedtype.RewardRemainder).
|
||||
[`T::RewardRemainder`](https://docs.rs/pallet-staking/latest/pallet_staking/trait.Trait.html#associatedtype.RewardRemainder).
|
||||
|
||||
### Reward Calculation
|
||||
|
||||
@@ -180,28 +180,28 @@ defined staking rate. The full specification can be found
|
||||
|
||||
Total reward is split among validators and their nominators depending on the number of points
|
||||
they received during the era. Points are added to a validator using
|
||||
[`reward_by_ids`](./enum.Call.html#variant.reward_by_ids) or
|
||||
[`reward_by_indices`](./enum.Call.html#variant.reward_by_indices).
|
||||
[`reward_by_ids`](https://docs.rs/pallet-staking/latest/pallet_staking/enum.Call.html#variant.reward_by_ids) or
|
||||
[`reward_by_indices`](https://docs.rs/pallet-staking/latest/pallet_staking/enum.Call.html#variant.reward_by_indices).
|
||||
|
||||
[`Module`](./struct.Module.html) implements
|
||||
[`pallet_authorship::EventHandler`](../pallet_authorship/trait.EventHandler.html) to add reward
|
||||
[`pallet_authorship::EventHandler`](https://docs.rs/pallet-authorship/latest/pallet_authorship/trait.EventHandler.html) to add reward
|
||||
points to block producer and block producer of referenced uncles.
|
||||
|
||||
The validator and its nominator split their reward as following:
|
||||
|
||||
The validator can declare an amount, named
|
||||
[`commission`](./struct.ValidatorPrefs.html#structfield.commission), that does not get shared
|
||||
[`commission`](https://docs.rs/pallet-staking/latest/pallet_staking/struct.ValidatorPrefs.html#structfield.commission), that does not get shared
|
||||
with the nominators at each reward payout through its
|
||||
[`ValidatorPrefs`](./struct.ValidatorPrefs.html). This value gets deducted from the total reward
|
||||
[`ValidatorPrefs`](https://docs.rs/pallet-staking/latest/pallet_staking/struct.ValidatorPrefs.html). This value gets deducted from the total reward
|
||||
that is paid to the validator and its nominators. The remaining portion is split among the
|
||||
validator and all of the nominators that nominated the validator, proportional to the value
|
||||
staked behind this validator (_i.e._ dividing the
|
||||
[`own`](./struct.Exposure.html#structfield.own) or
|
||||
[`others`](./struct.Exposure.html#structfield.others) by
|
||||
[`total`](./struct.Exposure.html#structfield.total) in [`Exposure`](./struct.Exposure.html)).
|
||||
[`own`](https://docs.rs/pallet-staking/latest/pallet_staking/struct.Exposure.html#structfield.own) or
|
||||
[`others`](https://docs.rs/pallet-staking/latest/pallet_staking/struct.Exposure.html#structfield.others) by
|
||||
[`total`](./struct.Exposure.html#structfield.total) in [`Exposure`](https://docs.rs/pallet-staking/latest/pallet_staking/struct.Exposure.html)).
|
||||
|
||||
All entities who receive a reward have the option to choose their reward destination through the
|
||||
[`Payee`](./struct.Payee.html) storage item (see
|
||||
[`Payee`](https://docs.rs/pallet-staking/latest/pallet_staking/struct.Payee.html) storage item (see
|
||||
[`set_payee`](enum.Call.html#variant.set_payee)), to be one of the following:
|
||||
|
||||
- Controller account, (obviously) not increasing the staked value.
|
||||
@@ -214,9 +214,9 @@ Any funds already placed into stash can be the target of the following operation
|
||||
|
||||
The controller account can free a portion (or all) of the funds using the
|
||||
[`unbond`](enum.Call.html#variant.unbond) call. Note that the funds are not immediately
|
||||
accessible. Instead, a duration denoted by [`BondingDuration`](./struct.BondingDuration.html)
|
||||
accessible. Instead, a duration denoted by [`BondingDuration`](https://docs.rs/pallet-staking/latest/pallet_staking/struct.BondingDuration.html)
|
||||
(in number of eras) must pass until the funds can actually be removed. Once the
|
||||
`BondingDuration` is over, the [`withdraw_unbonded`](./enum.Call.html#variant.withdraw_unbonded)
|
||||
`BondingDuration` is over, the [`withdraw_unbonded`](https://docs.rs/pallet-staking/latest/pallet_staking/enum.Call.html#variant.withdraw_unbonded)
|
||||
call can be used to actually withdraw the funds.
|
||||
|
||||
Note that there is a limitation to the number of fund-chunks that can be scheduled to be
|
||||
@@ -237,13 +237,13 @@ threshold.
|
||||
|
||||
## GenesisConfig
|
||||
|
||||
The Staking module depends on the [`GenesisConfig`](./struct.GenesisConfig.html). The
|
||||
The Staking module depends on the [`GenesisConfig`](https://docs.rs/pallet-staking/latest/pallet_staking/struct.GenesisConfig.html). The
|
||||
`GenesisConfig` is optional and allow to set some initial stakers.
|
||||
|
||||
## Related Modules
|
||||
|
||||
- [Balances](../pallet_balances/index.html): Used to manage values at stake.
|
||||
- [Session](../pallet_session/index.html): Used to manage sessions. Also, a list of new
|
||||
- [Balances](https://docs.rs/pallet-balances/latest/pallet_balances/): Used to manage values at stake.
|
||||
- [Session](https://docs.rs/pallet-session/latest/pallet_session/): Used to manage sessions. Also, a list of new
|
||||
validators is stored in the Session module's `Validators` at the end of each era.
|
||||
|
||||
License: Apache-2.0
|
||||
Reference in New Issue
Block a user