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:
+1
-1
@@ -4,4 +4,4 @@ order: 0
|
||||
|
||||
# Authz
|
||||
|
||||
- [Authz](spec/README.md) - Authorization for accounts to perform actions on behalf of other accounts.
|
||||
* [Authz](spec/README.md) - Authorization for accounts to perform actions on behalf of other accounts.
|
||||
|
||||
@@ -14,7 +14,7 @@ Authorization is an interface that must be implemented by a concrete authorizati
|
||||
|
||||
**Note:** The authz module is different from the [auth (authentication)](../modules/auth/) module that is responsible for specifying the base transaction and account types.
|
||||
|
||||
+++ https://github.com/cosmos/cosmos-sdk/blob/v0.43.0-beta1/x/authz/authorizations.go#L11-L25
|
||||
+++ <https://github.com/cosmos/cosmos-sdk/blob/v0.43.0-beta1/x/authz/authorizations.go#L11-L25>
|
||||
|
||||
## Built-in Authorizations
|
||||
|
||||
@@ -24,29 +24,29 @@ The Cosmos SDK `x/authz` module comes with following authorization types:
|
||||
|
||||
`GenericAuthorization` implements the `Authorization` interface that gives unrestricted permission to execute the provided Msg on behalf of granter's account.
|
||||
|
||||
+++ https://github.com/cosmos/cosmos-sdk/blob/v0.43.0-beta1/proto/cosmos/authz/v1beta1/authz.proto#L14-L19
|
||||
+++ <https://github.com/cosmos/cosmos-sdk/blob/v0.43.0-beta1/proto/cosmos/authz/v1beta1/authz.proto#L14-L19>
|
||||
|
||||
+++ https://github.com/cosmos/cosmos-sdk/blob/v0.43.0-beta1/x/authz/generic_authorization.go#L18-L31
|
||||
+++ <https://github.com/cosmos/cosmos-sdk/blob/v0.43.0-beta1/x/authz/generic_authorization.go#L18-L31>
|
||||
|
||||
- `msg` stores Msg type URL.
|
||||
* `msg` stores Msg type URL.
|
||||
|
||||
### SendAuthorization
|
||||
|
||||
`SendAuthorization` implements the `Authorization` interface for the `cosmos.bank.v1beta1.MsgSend` Msg. It takes a `SpendLimit` that specifies the maximum amount of tokens the grantee can spend. The `SpendLimit` is updated as the tokens are spent.
|
||||
|
||||
+++ https://github.com/cosmos/cosmos-sdk/blob/v0.43.0-beta1/proto/cosmos/bank/v1beta1/authz.proto#L10-L19
|
||||
+++ <https://github.com/cosmos/cosmos-sdk/blob/v0.43.0-beta1/proto/cosmos/bank/v1beta1/authz.proto#L10-L19>
|
||||
|
||||
+++ https://github.com/cosmos/cosmos-sdk/blob/v0.43.0-beta1/x/bank/types/send_authorization.go#L25-L40
|
||||
+++ <https://github.com/cosmos/cosmos-sdk/blob/v0.43.0-beta1/x/bank/types/send_authorization.go#L25-L40>
|
||||
|
||||
- `spend_limit` keeps track of how many coins are left in the authorization.
|
||||
* `spend_limit` keeps track of how many coins are left in the authorization.
|
||||
|
||||
### StakeAuthorization
|
||||
|
||||
`StakeAuthorization` implements the `Authorization` interface for messages in the [staking module](https://docs.cosmos.network/v0.44/modules/staking/). It takes an `AuthorizationType` to specify whether you want to authorise delegating, undelegating or redelegating (i.e. these have to be authorised seperately). It also takes a `MaxTokens` that keeps track of a limit to the amount of tokens that can be delegated/undelegated/redelegated. If left empty, the amount is unlimited. Additionally, this Msg takes an `AllowList` and a `DenyList`, which allows you to select which validators you allow grantees to stake with.
|
||||
|
||||
+++ https://github.com/cosmos/cosmos-sdk/blob/v0.43.0-beta1/proto/cosmos/staking/v1beta1/authz.proto#L11-L31
|
||||
+++ <https://github.com/cosmos/cosmos-sdk/blob/v0.43.0-beta1/proto/cosmos/staking/v1beta1/authz.proto#L11-L31>
|
||||
|
||||
+++ https://github.com/cosmos/cosmos-sdk/blob/v0.43.0-beta1/x/staking/types/authz.go#L18-L38
|
||||
+++ <https://github.com/cosmos/cosmos-sdk/blob/v0.43.0-beta1/x/staking/types/authz.go#L18-L38>
|
||||
|
||||
## Gas
|
||||
|
||||
|
||||
@@ -8,8 +8,8 @@ order: 2
|
||||
|
||||
Grants are identified by combining granter address (the address bytes of the granter), grantee address (the address bytes of the grantee) and Authorization type (its type URL). Hence we only allow one grant for the (granter, grantee, Authorization) triple.
|
||||
|
||||
- Grant: `0x01 | granter_address_len (1 byte) | granter_address_bytes | grantee_address_len (1 byte) | grantee_address_bytes | msgType_bytes-> ProtocolBuffer(AuthorizationGrant)`
|
||||
* Grant: `0x01 | granter_address_len (1 byte) | granter_address_bytes | grantee_address_len (1 byte) | grantee_address_bytes | msgType_bytes-> ProtocolBuffer(AuthorizationGrant)`
|
||||
|
||||
The grant object encapsulates an `Authorization` type and an expiration timestamp:
|
||||
|
||||
+++ https://github.com/cosmos/cosmos-sdk/blob/v0.43.0-beta1/proto/cosmos/authz/v1beta1/authz.proto#L21-L26
|
||||
+++ <https://github.com/cosmos/cosmos-sdk/blob/v0.43.0-beta1/proto/cosmos/authz/v1beta1/authz.proto#L21-L26>
|
||||
|
||||
+12
-12
@@ -11,25 +11,25 @@ In this section we describe the processing of messages for the authz module.
|
||||
An authorization grant is created using the `MsgGrant` message.
|
||||
If there is already a grant for the `(granter, grantee, Authorization)` triple, then the new grant overwrites the previous one. To update or extend an existing grant, a new grant with the same `(granter, grantee, Authorization)` triple should be created.
|
||||
|
||||
+++ https://github.com/cosmos/cosmos-sdk/blob/v0.43.0-beta1/proto/cosmos/authz/v1beta1/tx.proto#L32-L37
|
||||
+++ <https://github.com/cosmos/cosmos-sdk/blob/v0.43.0-beta1/proto/cosmos/authz/v1beta1/tx.proto#L32-L37>
|
||||
|
||||
The message handling should fail if:
|
||||
|
||||
- both granter and grantee have the same address.
|
||||
- provided `Expiration` time is less than current unix timestamp.
|
||||
- provided `Grant.Authorization` is not implemented.
|
||||
- `Authorization.MsgTypeURL()` is not defined in the router (there is no defined handler in the app router to handle that Msg types).
|
||||
* both granter and grantee have the same address.
|
||||
* provided `Expiration` time is less than current unix timestamp.
|
||||
* provided `Grant.Authorization` is not implemented.
|
||||
* `Authorization.MsgTypeURL()` is not defined in the router (there is no defined handler in the app router to handle that Msg types).
|
||||
|
||||
## MsgRevoke
|
||||
|
||||
A grant can be removed with the `MsgRevoke` message.
|
||||
|
||||
+++ https://github.com/cosmos/cosmos-sdk/blob/v0.43.0-beta1/proto/cosmos/authz/v1beta1/tx.proto#L60-L64
|
||||
+++ <https://github.com/cosmos/cosmos-sdk/blob/v0.43.0-beta1/proto/cosmos/authz/v1beta1/tx.proto#L60-L64>
|
||||
|
||||
The message handling should fail if:
|
||||
|
||||
- both granter and grantee have the same address.
|
||||
- provided `MsgTypeUrl` is empty.
|
||||
* both granter and grantee have the same address.
|
||||
* provided `MsgTypeUrl` is empty.
|
||||
|
||||
NOTE: The `MsgExec` message removes a grant if the grant has expired.
|
||||
|
||||
@@ -37,10 +37,10 @@ NOTE: The `MsgExec` message removes a grant if the grant has expired.
|
||||
|
||||
When a grantee wants to execute a transaction on behalf of a granter, they must send `MsgExec`.
|
||||
|
||||
+++ https://github.com/cosmos/cosmos-sdk/blob/v0.43.0-beta1/proto/cosmos/authz/v1beta1/tx.proto#L47-L53
|
||||
+++ <https://github.com/cosmos/cosmos-sdk/blob/v0.43.0-beta1/proto/cosmos/authz/v1beta1/tx.proto#L47-L53>
|
||||
|
||||
The message handling should fail if:
|
||||
|
||||
- provided `Authorization` is not implemented.
|
||||
- grantee doesn't have permission to run the transaction.
|
||||
- if granted authorization is expired.
|
||||
* provided `Authorization` is not implemented.
|
||||
* grantee doesn't have permission to run the transaction.
|
||||
* if granted authorization is expired.
|
||||
|
||||
@@ -15,16 +15,16 @@ parent:
|
||||
granting arbitrary privileges from one account (the granter) to another account (the grantee). Authorizations must be granted for a particular Msg service method one by one using an implementation of the `Authorization` interface.
|
||||
|
||||
1. **[Concept](01_concepts.md)**
|
||||
- [Authorization and Grant](01_concepts.md#Authorization-and-Grant)
|
||||
- [Built-in Authorizations](01_concepts.md#Built-in-Authorizations)
|
||||
- [Gas](01_concepts.md#gas)
|
||||
* [Authorization and Grant](01_concepts.md#Authorization-and-Grant)
|
||||
* [Built-in Authorizations](01_concepts.md#Built-in-Authorizations)
|
||||
* [Gas](01_concepts.md#gas)
|
||||
2. **[State](02_state.md)**
|
||||
3. **[Messages](03_messages.md)**
|
||||
- [MsgGrant](03_messages.md#MsgGrant)
|
||||
- [MsgRevoke](03_messages.md#MsgRevoke)
|
||||
- [MsgExec](03_messages.md#MsgExec)
|
||||
* [MsgGrant](03_messages.md#MsgGrant)
|
||||
* [MsgRevoke](03_messages.md#MsgRevoke)
|
||||
* [MsgExec](03_messages.md#MsgExec)
|
||||
4. **[Events](04_events.md)**
|
||||
5. **[Client](05_client.md)**
|
||||
- [CLI](05_client.md#cli)
|
||||
- [gRPC](05_client.md#grpc)
|
||||
- [REST](05_client.md#rest)
|
||||
* [CLI](05_client.md#cli)
|
||||
* [gRPC](05_client.md#grpc)
|
||||
* [REST](05_client.md#rest)
|
||||
|
||||
Reference in New Issue
Block a user