Skip to content

Commit

Permalink
docs: update documents on x/stakingplus (#483)
Browse files Browse the repository at this point in the history
* docs: add documents on staking plus module

* docs: add an entry to the common README.md

* docs: fix documentation paths

* docs: use legacy proposal on the documents

* docs: update code lines

* docs: remove an entry "handlers" from README.md

* docs: fix the documentation path

* docs: use the legacy module name

* docs: use the proposal name

* docs: fix a ref

* docs: update CHANGELOG.md
  • Loading branch information
0Tech authored Apr 4, 2022
1 parent 396a1fe commit e2acac9
Show file tree
Hide file tree
Showing 11 changed files with 102 additions and 0 deletions.
2 changes: 2 additions & 0 deletions CHANGELOG.md
Original file line number Diff line number Diff line change
Expand Up @@ -54,3 +54,5 @@ Ref: https://keepachangelog.com/en/1.0.0/
* (ci) [\#469](https://github.com/line/lbm-sdk/pull/469) publish docker image on tag push

### Document Updates

* (docs) [\#483](https://github.com/line/lbm-sdk/pull/483) update documents on x/stakingplus
1 change: 1 addition & 0 deletions x/README.md
Original file line number Diff line number Diff line change
Expand Up @@ -21,6 +21,7 @@ Here are some production-grade modules that can be used in Cosmos SDK applicatio
- [Params](params/spec/README.md) - Globally available parameter store.
- [Slashing](slashing/spec/README.md) - Validator punishment mechanisms.
- [Staking](staking/spec/README.md) - Proof-of-Stake layer for public blockchains.
- [Staking Plus](stakingplus/spec/README.md) - Modified version of staking.
- [Upgrade](upgrade/spec/README.md) - Software upgrades handling and coordination.

To learn more about the process of building modules, visit the [building modules reference documentation](../docs/building-modules/README.md).
7 changes: 7 additions & 0 deletions x/stakingplus/spec/01_state.md
Original file line number Diff line number Diff line change
@@ -0,0 +1,7 @@
<!--
order: 1
-->

# State

There is no difference in state with that of Staking module of the Cosmos-SDK. Refer to the [original document](../../staking/spec/01_state.md) for more information.
7 changes: 7 additions & 0 deletions x/stakingplus/spec/02_state_transitions.md
Original file line number Diff line number Diff line change
@@ -0,0 +1,7 @@
<!--
order: 2
-->

# State Transitions

There is no difference in state trasitions with that of Staking module of the Cosmos-SDK. Refer to the [original document](../../staking/spec/02_state_transitions.md) for more information.
22 changes: 22 additions & 0 deletions x/stakingplus/spec/03_messages.md
Original file line number Diff line number Diff line change
@@ -0,0 +1,22 @@
<!--
order: 3
-->

# Messages

In this section we describe only the changes introduced by LBM-SDK. Refer to the [original document](../../staking/spec/03_messages.md) for more information.

## Msg/CreateValidator

A validator is created using the `Msg/CreateValidator` service message.

+++ https://github.com/line/lbm-sdk/blob/main/proto/lbm/staking/v1/tx.proto#L16-L17

+++ https://github.com/line/lbm-sdk/blob/main/proto/lbm/staking/v1/tx.proto#L35-L51

This service message is expected to fail if:

- one of the conditions described in the staking module of the Cosmos-SDK is met.
- the operator address is not registered on x/consortium through UpdateValidatorAuthsProposal. TODO: add a ref to x/consortium spec file.

The other [statements](../../staking/spec/03_messages.md#msgcreatevalidator) on this message in the exising document are still valid.
7 changes: 7 additions & 0 deletions x/stakingplus/spec/04_begin_block.md
Original file line number Diff line number Diff line change
@@ -0,0 +1,7 @@
<!--
order: 4
-->

# Begin-Block

There is no difference in begin-block with that Staking module of the Cosmos-SDK. Refer to the [original document](../../staking/spec/04_begin_block.md) for more information.
7 changes: 7 additions & 0 deletions x/stakingplus/spec/05_end_block.md
Original file line number Diff line number Diff line change
@@ -0,0 +1,7 @@
<!--
order: 4
-->

# End-Block

There is no difference in end-block with that Staking module of the Cosmos-SDK. Refer to the [original document](../../staking/spec/05_end_block.md) for more information.
7 changes: 7 additions & 0 deletions x/stakingplus/spec/06_hooks.md
Original file line number Diff line number Diff line change
@@ -0,0 +1,7 @@
<!--
order: 5
-->

# Hooks

There is no difference in hooks with that Staking module of the Cosmos-SDK. Refer to the [original document](../../staking/spec/06_hooks.md) for more information.
7 changes: 7 additions & 0 deletions x/stakingplus/spec/07_events.md
Original file line number Diff line number Diff line change
@@ -0,0 +1,7 @@
<!--
order: 6
-->

# Events

There is no difference in events with that Staking module of the Cosmos-SDK. Refer to the [original document](../../staking/spec/07_events.md) for more information.
7 changes: 7 additions & 0 deletions x/stakingplus/spec/08_params.md
Original file line number Diff line number Diff line change
@@ -0,0 +1,7 @@
<!--
order: 8
-->

# Parameters

There is no difference in parameters with that Staking module of the Cosmos-SDK. Refer to the [original document](../../staking/spec/08_params.md) for more information.
28 changes: 28 additions & 0 deletions x/stakingplus/spec/README.md
Original file line number Diff line number Diff line change
@@ -0,0 +1,28 @@
<!--
order: 0
title: Staking Plus Overview
parent:
title: "staking plus"
-->

# `stakingplus`

## Abstract

This paper specifies the Staking Plus module of the LBM-SDK, which extends existing [Staking module](../../staking/spec/README.md) of the Cosmos-SDK.

The module enables LBM-SDK based blockchain to support an advanced Proof-of-Stake system. In this system, holders of the native staking token of the chain can become validators and can delegate tokens to validators, ultimately determining the effective validator set for the system.

This module is almost identical to the previous Staking module of the Cosmos-SDK, but introduces some breaking changes. For example, you must have x/consortium UpdateValidatorAuthsProposal passed before sending x/stakingplus MsgCreateValidator, or the message would fail.

## Contents

1. **[State](01_state.md)**
2. **[State Transitions](02_state_transitions.md)**
3. **[Messages](03_messages.md)**
- [Msg/CreateValidator](03_messages.md#msgcreatevalidator)
4. **[Begin-Block](04_begin_block.md)**
5. **[End-Block ](05_end_block.md)**
6. **[Hooks](06_hooks.md)**
7. **[Events](07_events.md)**
8. **[Parameters](08_params.md)**

0 comments on commit e2acac9

Please sign in to comment.