Skip to content

Commit

Permalink
docs: Order network show subcommands
Browse files Browse the repository at this point in the history
  • Loading branch information
matevz committed Nov 14, 2024
1 parent 10d7b31 commit b908d7d
Showing 1 changed file with 81 additions and 78 deletions.
159 changes: 81 additions & 78 deletions docs/network.md
Original file line number Diff line number Diff line change
Expand Up @@ -259,50 +259,87 @@ historic value of the property.

The command expects one of the following parameters:

#### `entities` {#show-entities}
#### `<id>` {#show-id}

Shows all registered entities in the network registry. See the
[`account entity`] command, if you want to register or update your own entity.
The provided ID can be one of the following:

[`account entity`]: ./account.md#entity
- If the [ParaTime ID] is provided, Oasis CLI shows ParaTime information stored
in the network's registry.

:::info
For example, at time of writing information on Sapphire stored in the Mainnet
registry were as follows:

This call is not enabled on public Oasis gRPC endpoints. You will have to run
your own client node to enable this functionality.
![code shell](../examples/network-show/id-paratime.in.static)

:::
![code json](../examples/network-show/id-paratime.out.static)

#### `nodes` {#show-nodes}
Those running the compute node may be interested in the **ParaTime-specific
staking threshold** which are stored inside the `staking.thresholds.node-compute`
field:

Shows all registered nodes in the network registry. See the [`account entity`],
to add a node to your entity.
```shell
oasis network show 000000000000000000000000000000000000000000000000f80306c9858e7279 | jq '.staking.thresholds."node-compute"'
```

:::info
```
"5000000000000000"
```

This call is not enabled on public Oasis gRPC endpoints. You will have to run
your own client node to enable this functionality.
In the example above, the amount to run a Sapphire compute node on the Mainnet
is 5,000,000 tokens and should be considered on top of the `node-compute`
staking thresholds obtained by the
[`network show native-token`](#show-native-token) command.

:::
- If the entity ID is provided, Oasis CLI shows information on the entity and
its corresponding nodes in the network registry. For example:

#### `parameters` {#show-parameters}
![code shell](../examples/network-show/id-entity.in)

Shows all consensus parameters for the following modules: consensus,
key manager, registry, roothash, staking, scheduler, beacon, and governance.
![code json](../examples/network-show/id-entity.out)

![code shell](../examples/network-show/parameters.in)
- If the node ID is provided, Oasis CLI shows detailed information of the node
such as the Oasis Core software version, the node's role, supported
ParaTimes, trusted execution environment support and more. For example:

![code](../examples/network-show/parameters.out)
![code shell](../examples/network-show/id-node.in.static)

![code json](../examples/network-show/id-node.out.static)

By passing `--format json`, the output is formatted as JSON.
[ParaTime ID]: https://github.com/oasisprotocol/oasis-core/blob/master/docs/runtime/identifiers.md

#### `paratimes` {#show-paratimes}
#### `committees` {#committees}

Shows all registered ParaTimes in the network registry.
Shows runtime committees.

#### `validators` {#show-validators}
![code shell](../examples/network-show/committees.in.static)

Shows all IDs of the nodes in the validator set.
![code](../examples/network-show/committees.out.static)

#### `entities` {#show-entities}

Shows all registered entities in the network registry. See the
[`account entity`] command, if you want to register or update your own entity.

[`account entity`]: ./account.md#entity

:::info

This call is not enabled on public Oasis gRPC endpoints. You will have to run
your own client node to enable this functionality.

:::

#### `gas-costs` {#show-gas-costs}

Shows minimum gas costs for each consensus transaction.

![code shell](../examples/network-show/gas-costs.in)

![code](../examples/network-show/gas-costs.out)

Above, we can see that the [maximum amount of gas](./account.md#gas-limit) our
transaction can spend must be set to at least 1000 **gas units**, otherwise it
will be rejected by the network.

#### `native-token` {#show-native-token}

Expand Down Expand Up @@ -342,72 +379,38 @@ Apart from the `node-compute` threshold above, a ParaTime may require additional

:::

#### `gas-costs` {#show-gas-costs}

Shows minimum gas costs for each consensus transaction.

![code shell](../examples/network-show/gas-costs.in)

![code](../examples/network-show/gas-costs.out)

Above, we can see that the [maximum amount of gas](./account.md#gas-limit) our
transaction can spend must be set to at least 1000 **gas units**, otherwise it
will be rejected by the network.

#### `committees` {#committees}

Shows runtime committees.

![code shell](../examples/network-show/committees.in.static)

![code](../examples/network-show/committees.out.static)

#### `<id>` {#show-id}

The provided ID can be one of the following:
#### `nodes` {#show-nodes}

- If the [ParaTime ID] is provided, Oasis CLI shows ParaTime information stored
in the network's registry.
Shows all registered nodes in the network registry. See the [`account entity`],
to add a node to your entity.

For example, at time of writing information on Sapphire stored in the Mainnet
registry were as follows:
:::info

![code shell](../examples/network-show/id-paratime.in.static)
This call is not enabled on public Oasis gRPC endpoints. You will have to run
your own client node to enable this functionality.

![code json](../examples/network-show/id-paratime.out.static)
:::

Network validators may be interested in the **ParaTime staking threshold**
stored inside the `thresholds` field:
#### `parameters` {#show-parameters}

```shell
oasis network show 000000000000000000000000000000000000000000000000f80306c9858e7279 | jq '.staking.thresholds."node-compute"'
```

```
"5000000000000000"
```
Shows all consensus parameters for the following modules: consensus,
key manager, registry, roothash, staking, scheduler, beacon, and governance.

In the example above, the amount to run a Sapphire compute node on the Mainnet
is 5,000,000 tokens and should be considered on top of the consensus-layer
validator staking thresholds obtained by the
[`network show native-token`](#show-native-token) command.
![code shell](../examples/network-show/parameters.in)

- If the entity ID is provided, Oasis CLI shows information on the entity and
its corresponding nodes in the network registry. For example:
![code](../examples/network-show/parameters.out)

![code shell](../examples/network-show/id-entity.in)
By passing [`--format json`], the output is formatted as JSON.

![code json](../examples/network-show/id-entity.out)
[`--format json`]: ./account.md#format

- If the node ID is provided, Oasis CLI shows detailed information of the node
such as the Oasis Core software version, the node's role, supported
ParaTimes, trusted execution environment support and more. For example:
#### `paratimes` {#show-paratimes}

![code shell](../examples/network-show/id-node.in.static)
Shows all registered ParaTimes in the network registry.

![code json](../examples/network-show/id-node.out.static)
#### `validators` {#show-validators}

[ParaTime ID]: https://github.com/oasisprotocol/oasis-core/blob/master/docs/runtime/identifiers.md
Shows all IDs of the nodes in the validator set.

### Status of the Network's Endpoint {#status}

Expand All @@ -428,7 +431,7 @@ Mainnet was reported:

![code json](../examples/network/status.out.static)

By passing `--format json`, the output is formatted as JSON.
By passing [`--format json`], the output is formatted as JSON.

:::info

Expand Down

0 comments on commit b908d7d

Please sign in to comment.