docs: Improve markdownlint configuration (#11104)

## Description

Closes: #9404



---

### Author Checklist

*All items are required. Please add a note to the item if the item is not applicable and
please add links to any relevant follow up issues.*

I have...

- [x] included the correct [type prefix](https://github.com/commitizen/conventional-commit-types/blob/v3.0.0/index.json) in the PR title
- [ ] added `!` to the type prefix if API or client breaking change
- [x] targeted the correct branch (see [PR Targeting](https://github.com/cosmos/cosmos-sdk/blob/master/CONTRIBUTING.md#pr-targeting))
- [x] provided a link to the relevant issue or specification
- [ ] followed the guidelines for [building modules](https://github.com/cosmos/cosmos-sdk/blob/master/docs/building-modules)
- [ ] included the necessary unit and integration [tests](https://github.com/cosmos/cosmos-sdk/blob/master/CONTRIBUTING.md#testing)
- [ ] added a changelog entry to `CHANGELOG.md`
- [ ] included comments for [documenting Go code](https://blog.golang.org/godoc)
- [ ] updated the relevant documentation or specification
- [x] reviewed "Files changed" and left comments if necessary
- [x] confirmed all CI checks have passed

### Reviewers Checklist

*All items are required. Please add a note if the item is not applicable and please add
your handle next to the items reviewed if you only reviewed selected items.*

I have...

- [ ] confirmed the correct [type prefix](https://github.com/commitizen/conventional-commit-types/blob/v3.0.0/index.json) in the PR title
- [ ] confirmed `!` in the type prefix if API or client breaking change
- [ ] confirmed all author checklist items have been addressed 
- [ ] reviewed state machine logic
- [ ] reviewed API design and naming
- [ ] reviewed documentation is accurate
- [ ] reviewed tests and test coverage
- [ ] manually tested (if applicable)
This commit is contained in:
Julien Robert
2022-02-10 12:07:01 +00:00
committed by GitHub
parent b1f9a117f7
commit 58597139fa
212 changed files with 3792 additions and 3755 deletions
+1 -1
View File
@@ -4,4 +4,4 @@ order: 0
# Auth
- [Auth](spec/README.md) - Authentication of accounts and transactions for Cosmos SDK applications.
* [Auth](spec/README.md) - Authentication of accounts and transactions for Cosmos SDK applications.
+1 -1
View File
@@ -15,7 +15,7 @@ Accounts are exposed externally as an interface, and stored internally as
either a base account or vesting account. Module clients wishing to add more
account types may do so.
- `0x01 | Address -> ProtocolBuffer(account)`
* `0x01 | Address -> ProtocolBuffer(account)`
### Account Interface
+13 -13
View File
@@ -13,28 +13,28 @@ Note that the `AnteHandler` is called on both `CheckTx` and `DeliverTx`, as Tend
The auth module provides `AnteDecorator`s that are recursively chained together into a single `AnteHandler` in the following order:
- `SetUpContextDecorator`: Sets the `GasMeter` in the `Context` and wraps the next `AnteHandler` with a defer clause to recover from any downstream `OutOfGas` panics in the `AnteHandler` chain to return an error with information on gas provided and gas used.
* `SetUpContextDecorator`: Sets the `GasMeter` in the `Context` and wraps the next `AnteHandler` with a defer clause to recover from any downstream `OutOfGas` panics in the `AnteHandler` chain to return an error with information on gas provided and gas used.
- `RejectExtensionOptionsDecorator`: Rejects all extension options which can optionally be included in protobuf transactions.
* `RejectExtensionOptionsDecorator`: Rejects all extension options which can optionally be included in protobuf transactions.
- `MempoolFeeDecorator`: Checks if the `tx` fee is above local mempool `minFee` parameter during `CheckTx`.
* `MempoolFeeDecorator`: Checks if the `tx` fee is above local mempool `minFee` parameter during `CheckTx`.
- `ValidateBasicDecorator`: Calls `tx.ValidateBasic` and returns any non-nil error.
* `ValidateBasicDecorator`: Calls `tx.ValidateBasic` and returns any non-nil error.
- `TxTimeoutHeightDecorator`: Check for a `tx` height timeout.
* `TxTimeoutHeightDecorator`: Check for a `tx` height timeout.
- `ValidateMemoDecorator`: Validates `tx` memo with application parameters and returns any non-nil error.
* `ValidateMemoDecorator`: Validates `tx` memo with application parameters and returns any non-nil error.
- `ConsumeGasTxSizeDecorator`: Consumes gas proportional to the `tx` size based on application parameters.
* `ConsumeGasTxSizeDecorator`: Consumes gas proportional to the `tx` size based on application parameters.
- `DeductFeeDecorator`: Deducts the `FeeAmount` from first signer of the `tx`. If the `x/feegrant` module is enabled and a fee granter is set, it deducts fees from the fee granter account.
* `DeductFeeDecorator`: Deducts the `FeeAmount` from first signer of the `tx`. If the `x/feegrant` module is enabled and a fee granter is set, it deducts fees from the fee granter account.
- `SetPubKeyDecorator`: Sets the pubkey from a `tx`'s signers that does not already have its corresponding pubkey saved in the state machine and in the current context.
* `SetPubKeyDecorator`: Sets the pubkey from a `tx`'s signers that does not already have its corresponding pubkey saved in the state machine and in the current context.
- `ValidateSigCountDecorator`: Validates the number of signatures in `tx` based on app-parameters.
* `ValidateSigCountDecorator`: Validates the number of signatures in `tx` based on app-parameters.
- `SigGasConsumeDecorator`: Consumes parameter-defined amount of gas for each signature. This requires pubkeys to be set in context for all signers as part of `SetPubKeyDecorator`.
* `SigGasConsumeDecorator`: Consumes parameter-defined amount of gas for each signature. This requires pubkeys to be set in context for all signers as part of `SetPubKeyDecorator`.
- `SigVerificationDecorator`: Verifies all signatures are valid. This requires pubkeys to be set in context for all signers as part of `SetPubKeyDecorator`.
* `SigVerificationDecorator`: Verifies all signatures are valid. This requires pubkeys to be set in context for all signers as part of `SetPubKeyDecorator`.
- `IncrementSequenceDecorator`: Increments the account sequence for each signer to prevent replay attacks.
* `IncrementSequenceDecorator`: Increments the account sequence for each signer to prevent replay attacks.
+70 -64
View File
@@ -4,28 +4,34 @@ order: 5
# Vesting
- [Vesting](#vesting)
- [Intro and Requirements](#intro-and-requirements)
- [Note](#note)
- [Vesting Account Types](#vesting-account-types)
- [Vesting Account Specification](#vesting-account-specification)
- [Determining Vesting & Vested Amounts](#determining-vesting--vested-amounts)
- [Continuously Vesting Accounts](#continuously-vesting-accounts)
- [Periodic Vesting Accounts](#periodic-vesting-accounts)
- [Delayed/Discrete Vesting Accounts](#delayeddiscrete-vesting-accounts)
- [Transferring/Sending](#transferringsending)
- [Keepers/Handlers](#keepershandlers)
- [Delegating](#delegating)
- [Keepers/Handlers](#keepershandlers-1)
- [Undelegating](#undelegating)
- [Keepers/Handlers](#keepershandlers-2)
- [Keepers & Handlers](#keepers--handlers)
- [Genesis Initialization](#genesis-initialization)
- [Examples](#examples)
- [Simple](#simple)
- [Slashing](#slashing)
- [Periodic Vesting](#periodic-vesting)
- [Glossary](#glossary)
* [Vesting](#vesting)
* [Intro and Requirements](#intro-and-requirements)
* [Note](#note)
* [Vesting Account Types](#vesting-account-types)
* [BaseVestingAccount](#basevestingaccount)
* [ContinuousVestingAccount](#continuousvestingaccount)
* [DelayedVestingAccount](#delayedvestingaccount)
* [Period](#period)
* [PeriodicVestingAccount](#periodicvestingaccount)
* [PermanentLockedAccount](#permanentlockedaccount)
* [Vesting Account Specification](#vesting-account-specification)
* [Determining Vesting & Vested Amounts](#determining-vesting--vested-amounts)
* [Continuously Vesting Accounts](#continuously-vesting-accounts)
* [Periodic Vesting Accounts](#periodic-vesting-accounts)
* [Delayed/Discrete Vesting Accounts](#delayeddiscrete-vesting-accounts)
* [Transferring/Sending](#transferringsending)
* [Keepers/Handlers](#keepershandlers)
* [Delegating](#delegating)
* [Keepers/Handlers](#keepershandlers-1)
* [Undelegating](#undelegating)
* [Keepers/Handlers](#keepershandlers-2)
* [Keepers & Handlers](#keepers--handlers)
* [Genesis Initialization](#genesis-initialization)
* [Examples](#examples)
* [Simple](#simple)
* [Slashing](#slashing)
* [Periodic Vesting](#periodic-vesting)
* [Glossary](#glossary)
## Intro and Requirements
@@ -42,10 +48,10 @@ and undelegate from validators, however they cannot transfer coins to another
account until those coins are vested. This specification allows for four
different kinds of vesting:
- Delayed vesting, where all coins are vested once `ET` is reached.
- Continous vesting, where coins begin to vest at `ST` and vest linearly with
* Delayed vesting, where all coins are vested once `ET` is reached.
* Continous vesting, where coins begin to vest at `ST` and vest linearly with
respect to time until `ET` is reached
- Periodic vesting, where coins begin to vest at `ST` and vest periodically
* Periodic vesting, where coins begin to vest at `ST` and vest periodically
according to number of periods and the vesting amount per period.
The number of periods, length per period, and amount per period are
configurable. A periodic vesting account is distinguished from a continuous
@@ -53,7 +59,7 @@ vesting account in that coins can be released in staggered tranches. For
example, a periodic vesting account could be used for vesting arrangements
where coins are relased quarterly, yearly, or over any other function of
tokens over time.
- Permanent locked vesting, where coins are locked forever. Coins in this account can
* Permanent locked vesting, where coins are locked forever. Coins in this account can
still be used for delegating and for governance votes even while locked.
## Note
@@ -94,19 +100,19 @@ type VestingAccount interface {
### BaseVestingAccount
+++ https://github.com/cosmos/cosmos-sdk/blob/v0.40.0/proto/cosmos/vesting/v1beta1/vesting.proto#L10-L33
+++ <https://github.com/cosmos/cosmos-sdk/blob/v0.40.0/proto/cosmos/vesting/v1beta1/vesting.proto#L10-L33>
### ContinuousVestingAccount
+++ https://github.com/cosmos/cosmos-sdk/blob/v0.40.0/proto/cosmos/vesting/v1beta1/vesting.proto#L35-L43
+++ <https://github.com/cosmos/cosmos-sdk/blob/v0.40.0/proto/cosmos/vesting/v1beta1/vesting.proto#L35-L43>
### DelayedVestingAccount
+++ https://github.com/cosmos/cosmos-sdk/blob/v0.40.0/proto/cosmos/vesting/v1beta1/vesting.proto#L45-L53
+++ <https://github.com/cosmos/cosmos-sdk/blob/v0.40.0/proto/cosmos/vesting/v1beta1/vesting.proto#L45-L53>
### Period
+++ https://github.com/cosmos/cosmos-sdk/blob/v0.40.0/proto/cosmos/vesting/v1beta1/vesting.proto#L56-L62
+++ <https://github.com/cosmos/cosmos-sdk/blob/v0.40.0/proto/cosmos/vesting/v1beta1/vesting.proto#L56-L62>
```go
// Stores all vesting periods passed as part of a PeriodicVestingAccount
@@ -116,7 +122,7 @@ type Periods []Period
### PeriodicVestingAccount
+++ https://github.com/cosmos/cosmos-sdk/blob/v0.40.0/proto/cosmos/vesting/v1beta1/vesting.proto#L64-L73
+++ <https://github.com/cosmos/cosmos-sdk/blob/v0.40.0/proto/cosmos/vesting/v1beta1/vesting.proto#L64-L73>
In order to facilitate less ad-hoc type checking and assertions and to support
flexibility in account balance usage, the existing `x/bank` `ViewKeeper` interface
@@ -136,23 +142,23 @@ type ViewKeeper interface {
### PermanentLockedAccount
+++ https://github.com/cosmos/cosmos-sdk/blob/v0.40.0/proto/cosmos/vesting/v1beta1/vesting.proto#L78-L83
+++ <https://github.com/cosmos/cosmos-sdk/blob/v0.40.0/proto/cosmos/vesting/v1beta1/vesting.proto#L78-L83>
## Vesting Account Specification
Given a vesting account, we define the following in the proceeding operations:
- `OV`: The original vesting coin amount. It is a constant value.
- `V`: The number of `OV` coins that are still _vesting_. It is derived by
* `OV`: The original vesting coin amount. It is a constant value.
* `V`: The number of `OV` coins that are still _vesting_. It is derived by
`OV`, `StartTime` and `EndTime`. This value is computed on demand and not on a
per-block basis.
- `V'`: The number of `OV` coins that are _vested_ (unlocked). This value is
* `V'`: The number of `OV` coins that are _vested_ (unlocked). This value is
computed on demand and not a per-block basis.
- `DV`: The number of delegated _vesting_ coins. It is a variable value. It is
* `DV`: The number of delegated _vesting_ coins. It is a variable value. It is
stored and modified directly in the vesting account.
- `DF`: The number of delegated _vested_ (unlocked) coins. It is a variable
* `DF`: The number of delegated _vested_ (unlocked) coins. It is a variable
value. It is stored and modified directly in the vesting account.
- `BC`: The number of `OV` coins less any coins that are transferred
* `BC`: The number of `OV` coins less any coins that are transferred
(which can be negative or delegated). It is considered to be balance of the
embedded base account. It is stored and modified directly in the vesting account.
@@ -461,7 +467,7 @@ func ToAccount(gacc GenesisAccount) Account {
Given a continuous vesting account with 10 vesting coins.
```
```text
OV = 10
DF = 0
DV = 0
@@ -472,33 +478,33 @@ V' = 0
1. Immediately receives 1 coin
```
```text
BC = 11
```
2. Time passes, 2 coins vest
```
```text
V = 8
V' = 2
```
3. Delegates 4 coins to validator A
```
```text
DV = 4
BC = 7
```
4. Sends 3 coins
```
```text
BC = 4
```
5. More time passes, 2 more coins vest
```
```text
V = 6
V' = 4
```
@@ -506,7 +512,7 @@ V' = 0
6. Sends 2 coins. At this point the account cannot send anymore until further
coins vest or it receives additional coins. It can still however, delegate.
```
```text
BC = 2
```
@@ -516,21 +522,21 @@ Same initial starting conditions as the simple example.
1. Time passes, 5 coins vest
```
```text
V = 5
V' = 5
```
2. Delegate 5 coins to validator A
```
```text
DV = 5
BC = 5
```
3. Delegate 5 coins to validator B
```
```text
DF = 5
BC = 0
```
@@ -538,7 +544,7 @@ Same initial starting conditions as the simple example.
4. Validator A gets slashed by 50%, making the delegation to A now worth 2.5 coins
5. Undelegate from validator A (2.5 coins)
```
```text
DF = 5 - 2.5 = 2.5
BC = 0 + 2.5 = 2.5
```
@@ -547,7 +553,7 @@ Same initial starting conditions as the simple example.
send 2.5 coins unless it receives more coins or until more coins vest.
It can still however, delegate.
```
```text
DV = 5 - 2.5 = 2.5
DF = 2.5 - 2.5 = 0
BC = 2.5 + 5 = 7.5
@@ -568,7 +574,7 @@ Periods:
- amount: 25stake, length: 7884000
```
```
```text
OV = 100
DF = 0
DV = 0
@@ -579,46 +585,46 @@ V' = 0
1. Immediately receives 1 coin
```
```text
BC = 101
```
2. Vesting period 1 passes, 25 coins vest
```
```text
V = 75
V' = 25
```
3. During vesting period 2, 5 coins are transfered and 5 coins are delegated
```
```text
DV = 5
BC = 91
```
4. Vesting period 2 passes, 25 coins vest
```
```text
V = 50
V' = 50
```
## Glossary
- OriginalVesting: The amount of coins (per denomination) that are initially
* OriginalVesting: The amount of coins (per denomination) that are initially
part of a vesting account. These coins are set at genesis.
- StartTime: The BFT time at which a vesting account starts to vest.
- EndTime: The BFT time at which a vesting account is fully vested.
- DelegatedFree: The tracked amount of coins (per denomination) that are
* StartTime: The BFT time at which a vesting account starts to vest.
* EndTime: The BFT time at which a vesting account is fully vested.
* DelegatedFree: The tracked amount of coins (per denomination) that are
delegated from a vesting account that have been fully vested at time of delegation.
- DelegatedVesting: The tracked amount of coins (per denomination) that are
* DelegatedVesting: The tracked amount of coins (per denomination) that are
delegated from a vesting account that were vesting at time of delegation.
- ContinuousVestingAccount: A vesting account implementation that vests coins
* ContinuousVestingAccount: A vesting account implementation that vests coins
linearly over time.
- DelayedVestingAccount: A vesting account implementation that only fully vests
* DelayedVestingAccount: A vesting account implementation that only fully vests
all coins at a given time.
- PeriodicVestingAccount: A vesting account implementation that vests coins
* PeriodicVestingAccount: A vesting account implementation that vests coins
according to a custom vesting schedule.
- PermanentLockedAccount: It does not ever release coins, locking them indefinitely.
* PermanentLockedAccount: It does not ever release coins, locking them indefinitely.
Coins in this account can still be used for delegating and for governance votes even while locked.
+17 -17
View File
@@ -21,26 +21,26 @@ This module is used in the Cosmos Hub.
## Contents
1. **[Concepts](01_concepts.md)**
- [Gas & Fees](01_concepts.md#gas-&-fees)
* [Gas & Fees](01_concepts.md#gas-&-fees)
2. **[State](02_state.md)**
- [Accounts](02_state.md#accounts)
* [Accounts](02_state.md#accounts)
3. **[AnteHandlers](03_antehandlers.md)**
- [Handlers](03_antehandlers.md#handlers)
* [Handlers](03_antehandlers.md#handlers)
4. **[Keepers](04_keepers.md)**
- [Account Keeper](04_keepers.md#account-keeper)
* [Account Keeper](04_keepers.md#account-keeper)
5. **[Vesting](05_vesting.md)**
- [Intro and Requirements](05_vesting.md#intro-and-requirements)
- [Vesting Account Types](05_vesting.md#vesting-account-types)
- [Vesting Account Specification](05_vesting.md#vesting-account-specification)
- [Keepers & Handlers](05_vesting.md#keepers-&-handlers)
- [Genesis Initialization](05_vesting.md#genesis-initialization)
- [Examples](05_vesting.md#examples)
- [Glossary](05_vesting.md#glossary)
* [Intro and Requirements](05_vesting.md#intro-and-requirements)
* [Vesting Account Types](05_vesting.md#vesting-account-types)
* [Vesting Account Specification](05_vesting.md#vesting-account-specification)
* [Keepers & Handlers](05_vesting.md#keepers-&-handlers)
* [Genesis Initialization](05_vesting.md#genesis-initialization)
* [Examples](05_vesting.md#examples)
* [Glossary](05_vesting.md#glossary)
6. **[Parameters](06_params.md)**
7. **[Client](07_client.md)**
- **[Auth](07_client.md#auth)**
- [CLI](07_client.md#cli)
- [gRPC](07_client.md#grpc)
- [REST](07_client.md#rest)
- **[Vesting](07_client.md#vesting)**
- [CLI](07_client.md#vesting#cli)
* **[Auth](07_client.md#auth)**
* [CLI](07_client.md#cli)
* [gRPC](07_client.md#grpc)
* [REST](07_client.md#rest)
* **[Vesting](07_client.md#vesting)**
* [CLI](07_client.md#vesting#cli)