From 47bfcba519c4784e7c7f3ae2d99f02a7c09ef3ba Mon Sep 17 00:00:00 2001 From: Alexander Kolesov Date: Mon, 9 Aug 2021 20:44:11 +0300 Subject: [PATCH] docs: Fix vesting doc. (#9883) ## Description Closes: https://github.com/cosmos/cosmos-sdk/issues/9882 Add info about PermanentLockedAccount. Add info about MsgCreateVestingAccount. --- ### 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 - [x] 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 - [x] followed the guidelines for [building modules](https://github.com/cosmos/cosmos-sdk/blob/master/docs/building-modules) - [x] included the necessary unit and integration [tests](https://github.com/cosmos/cosmos-sdk/blob/master/CONTRIBUTING.md#testing) - [x] added a changelog entry to `CHANGELOG.md` - [x] included comments for [documenting Go code](https://blog.golang.org/godoc) - [x] 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... - [x] confirmed the correct [type prefix](https://github.com/commitizen/conventional-commit-types/blob/v3.0.0/index.json) in the PR title - [x] confirmed `!` in the type prefix if API or client breaking change - [x] confirmed all author checklist items have been addressed - [ ] reviewed state machine logic - [ ] reviewed API design and naming - [x] reviewed documentation is accurate - [ ] reviewed tests and test coverage - [ ] manually tested (if applicable) --- x/auth/spec/05_vesting.md | 16 ++++++++++++---- 1 file changed, 12 insertions(+), 4 deletions(-) diff --git a/x/auth/spec/05_vesting.md b/x/auth/spec/05_vesting.md index b15526ba6..858579b6f 100644 --- a/x/auth/spec/05_vesting.md +++ b/x/auth/spec/05_vesting.md @@ -39,7 +39,7 @@ are included, the vesting will occur over the specified number of periods. For all vesting accounts, the owner of the vesting account is able to delegate and undelegate from validators, however they cannot transfer coins to another -account until those coins are vested. This specification allows for three +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. @@ -53,13 +53,15 @@ 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 +still be used for delegating and for governance votes even while locked. ## Note Vesting accounts can be initialized with some vesting and non-vesting coins. -The non-vesting coins would be immediately transferable. The current -specification does not allow for vesting accounts to be created with normal -messages after genesis. All vesting accounts must be created at genesis, or as +The non-vesting coins would be immediately transferable. DelayedVesting and +ContinuousVesting accounts can be created with normal messages after genesis. +Other types of vesting accounts must be created at genesis, or as part of a manual network upgrade. The current specification only allows for _unconditional_ vesting (ie. there is no possibility of reaching `ET` and having coins fail to vest). @@ -132,6 +134,10 @@ type ViewKeeper interface { } ``` +### PermanentLockedAccount + ++++ 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: @@ -614,3 +620,5 @@ linearly over time. all coins at a given time. - PeriodicVestingAccount: A vesting account implementation that vests coins according to a custom vesting schedule. +- 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. \ No newline at end of file