Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

[Document] Improve documentation for pocket nodes #1521

Merged
merged 1 commit into from
Feb 3, 2023
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
21 changes: 18 additions & 3 deletions app/cmd/cli/node.go
Original file line number Diff line number Diff line change
Expand Up @@ -3,9 +3,10 @@ package cli
import (
"encoding/json"
"fmt"
"strconv"

"github.com/pokt-network/pocket-core/app"
"github.com/spf13/cobra"
"strconv"
)

func init() {
Expand All @@ -17,8 +18,22 @@ func init() {
var nodesCmd = &cobra.Command{
Use: "nodes",
Short: "node management",
Long: `The node namespace handles all node related interactions,
from staking and unstaking; to unjailing.`,
Long: `The node namespace handles all node related interactions, from staking and unstaking; to unjailing.

---

Operator Address (i.e. Non-Custodial Address) can do the following:
- Submit Block, Claim & Proof Txs

Output Address (i.e. Custodial Address) can do the following:
- Receive earned rewards
- Receive funds after unstaking

Both Operator and Output Addresses can do the following:
- Submit Stake, EditStake, Unstake, Unjail Txs

---
`,
}

func init() {
Expand Down
73 changes: 46 additions & 27 deletions doc/specs/cli/node.md
Original file line number Diff line number Diff line change
Expand Up @@ -4,6 +4,27 @@ description: Functions for Node management.

# Nodes Namespace

Terminology:

- `Operator Address`: `Non-Custodial Address` aka `Node Runner` aka `Devops`
- `Output Address`: `Custodial Address` aka `Deposit Owner` aka `Reward Earner`

Basic Rules

1. The `Operator Address` is the **only** valid signer for:
1. Block Tx
2. Claim & Proof Tx
2. `Operator` and `Output` Address are valid signers for:
1. Stake Tx
2. EditStake Tx
3. Unstake Tx
4. Unjail Tx
3. The `Output Address` is where:
1. Rewards are sent
2. Unstaked funds are sent (after unstaking)
4. `Operator` and `Output` Address **cannot** be edited once staked
1. Requires unstaking to change either one

## Stake a Node / Update Stake (Custodial)

```text
Expand All @@ -21,16 +42,15 @@ the parameter, just enter the current parameter value \(the same one you entered

Arguments:

* `<fromAddr>`: Target Address to stake.
* `<amount>`: The amount of uPOKT to stake. Must be higher than the current value of the `StakeMinimum` parameter,
- `<fromAddr>`: Target Address to stake.
- `<amount>`: The amount of uPOKT to stake. Must be higher than the current value of the `StakeMinimum` parameter,
found [here](https://docs.pokt.network/learn/protocol-parameters/#stakeminimum).
* `<relayChainIDs>`: A comma separated list of RelayChain Network Identifiers. Find the RelayChain Network
- `<relayChainIDs>`: A comma separated list of RelayChain Network Identifiers. Find the RelayChain Network
Identifiers [here](https://docs.pokt.network/supported-blockchains/).
* `<serviceURI>`: The Service URI Applications will use to communicate with Nodes for Relays.
* `<networkID>`: The Pocket chain identifier; "mainnet" or "testnet".
* `<fee>`: An amount of uPOKT for the network.
* `<isBefore8.0>`: true or false depending if non-custodial upgrade is activated.

- `<serviceURI>`: The Service URI Applications will use to communicate with Nodes for Relays.
- `<networkID>`: The Pocket chain identifier; "mainnet" or "testnet".
- `<fee>`: An amount of uPOKT for the network.
- `<isBefore8.0>`: true or false depending if non-custodial upgrade is activated.

Example output:

Expand All @@ -54,16 +74,16 @@ the parameter, just enter the current parameter value \(the same one you entered

Arguments:

* `<operatorPublicKey>`: operatorAddress is the only valid signer for blocks & relays.
* `<outputAddress>`: outputAddress is where reward and staked funds are directed.
* `<amount>`: The amount of uPOKT to stake. Must be higher than the current value of the `StakeMinimum` parameter,
- `<operatorPublicKey>`: operatorAddress is the only valid signer for blocks & relays.
- `<outputAddress>`: outputAddress is where reward and staked funds are directed.
- `<amount>`: The amount of uPOKT to stake. Must be higher than the current value of the `StakeMinimum` parameter,
found [here](https://docs.pokt.network/learn/protocol-parameters/#stakeminimum).
* `<relayChainIDs>`: A comma separated list of RelayChain Network Identifiers. Find the RelayChain Network
- `<relayChainIDs>`: A comma separated list of RelayChain Network Identifiers. Find the RelayChain Network
Identifiers [here](https://docs.pokt.network/supported-blockchains/).
* `<serviceURI>`: The Service URI Applications will use to communicate with Nodes for Relays.
* `<networkID>`: The Pocket chain identifier; "mainnet" or "testnet".
* `<fee>`: An amount of uPOKT for the network.
* `<isBefore8.0>`: true or false depending if non custodial upgrade is activated.
- `<serviceURI>`: The Service URI Applications will use to communicate with Nodes for Relays.
- `<networkID>`: The Pocket chain identifier; "mainnet" or "testnet".
- `<fee>`: An amount of uPOKT for the network.
- `<isBefore8.0>`: true or false depending if non custodial upgrade is activated.

Example output:

Expand All @@ -82,11 +102,11 @@ the `<fromAddr>` account passphrase.

Arguments:

* `<operatorAddr>`: Target staked operator address.
* `<fromAddr>`: Signer address.
* `<networkID>`: The Pocket chain identifier; "mainnet" or "testnet".
* `<fee>`: An amount of uPOKT for the network.
* `<isBefore8.0>`: true or false depending if non custodial upgrade is activated.
- `<operatorAddr>`: Target staked operator address.
- `<fromAddr>`: Signer address.
- `<networkID>`: The Pocket chain identifier; "mainnet" or "testnet".
- `<fee>`: An amount of uPOKT for the network.
- `<isBefore8.0>`: true or false depending if non custodial upgrade is activated.

Example output:

Expand All @@ -105,15 +125,14 @@ user for the `<fromAddr>` account passphrase.

Arguments:

* `<operatorAddr>`: Target jailed operator address.
* `<fromAddr>`: Signer address.
* `<networkID>`: The Pocket chain identifier; "mainnet" or "testnet".
* `<fee>`: An amount of uPOKT for the network.
* `<isBefore8.0>`: true or false depending if non custodial upgrade is activated.
- `<operatorAddr>`: Target jailed operator address.
- `<fromAddr>`: Signer address.
- `<networkID>`: The Pocket chain identifier; "mainnet" or "testnet".
- `<fee>`: An amount of uPOKT for the network.
- `<isBefore8.0>`: true or false depending if non custodial upgrade is activated.

Example output:

```text
Transaction submitted with hash: <Transaction Hash>
```