Skip to content

Commit 36ec60f

Browse files
authored
Merge pull request #1190 from oasisprotocol/anzoman/docs-node-paratime-observer
docs/node: Document ParaTime observer node
2 parents 478cbb8 + 784757e commit 36ec60f

File tree

5 files changed

+165
-5
lines changed

5 files changed

+165
-5
lines changed

docs/node/run-your-node/README.mdx

Lines changed: 6 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -53,12 +53,14 @@ efficiently.
5353

5454
## Client Nodes
5555

56-
A Client Node is a type of node within the Oasis Network that serves as
56+
A [Client Node] is a type of node within the Oasis Network that serves as
5757
an interface for users or other applications to interact with the blockchain.
5858
Unlike compute nodes, which handle transaction processing and smart contract
5959
execution, client nodes are primarily responsible for tasks such as querying
6060
the blockchain, submitting transactions, and retrieving other data from the
61-
network.
61+
network. For confidential ParaTimes such as Sapphire and Cipher, there is a
62+
special mode of client node called [Observer Node] that supports confidential
63+
smart contact queries.
6264

6365
- **[Non-Validator Node]** is a type of node in the Oasis Network that does not
6466
participate in the consensus process of validating and proposing new blocks.
@@ -84,6 +86,8 @@ to deploy and manage decentralized applications (dApps) that utilize the
8486
Ethereum Virtual Machine (EVM).
8587

8688
[Non-Validator Node]: ./non-validator-node.mdx
89+
[Client Node]: ./paratime-client-node.mdx
90+
[Observer Node]: ./paratime-observer-node.mdx
8791
[Sapphire Client Node]: ./paratime-client-node.mdx
8892
[Cipher Client Node]: ./paratime-client-node.mdx
8993
[Emerald Client Node]: ./paratime-client-node.mdx

docs/node/run-your-node/paratime-client-node.mdx

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -7,7 +7,7 @@ import TabItem from '@theme/TabItem';
77

88
:::info
99

10-
These instructions are for setting up a _ParaTime client_ node which only observes ParaTime activity and can submit transactions. If you want to run a _ParaTime_ node instead, see the [instructions for running a ParaTime node](paratime-node.mdx). Similarly, if you want to run a _validator_ or a _non-validator_ node instead, see the [instructions for running a validator node](validator-node.mdx) or [instructions for running a non-validator node](non-validator-node.mdx).
10+
These instructions are for setting up a _ParaTime client_ node which only observes ParaTime activity and can submit transactions. Check out [instructions for running a ParaTime observer node](paratime-observer-node.mdx) for running _ParaTime observer_ node if you want to support confidential queries. If you want to run a _ParaTime_ node instead, see the [instructions for running a ParaTime node](paratime-node.mdx). Similarly, if you want to run a _validator_ or a _non-validator_ node instead, see the [instructions for running a validator node](validator-node.mdx) or [instructions for running a non-validator node](non-validator-node.mdx).
1111

1212
:::
1313

Lines changed: 145 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,145 @@
1+
import DocCard from '@theme/DocCard';
2+
import {findSidebarItem} from '@site/src/sidebarUtils';
3+
4+
# ParaTime Observer Node
5+
6+
:::info
7+
8+
These instructions are for setting up a _ParaTime observer_ node, which is a special client node that supports
9+
confidential smart contact queries. If you just want to run a _ParaTime client_ node, see the
10+
[instructions for running a ParaTime client node](paratime-client-node.mdx). If you want to run a _ParaTime_ node
11+
instead, see the [instructions for running a ParaTime node](paratime-node.mdx). Similarly, if you want to run a
12+
_validator_ or a _non-validator_ node instead, see the [instructions for running a validator node](validator-node.mdx)
13+
or [instructions for running a non-validator node](non-validator-node.mdx).
14+
15+
:::
16+
17+
:::tip
18+
19+
[TEE support] and a ParaTime client node with a confidential ParaTime is required to run a ParaTime observer node.
20+
21+
:::
22+
23+
:::tip
24+
25+
There may be per-ParaTime on-chain policy requirements (such as whitelisting) for running observer nodes.
26+
27+
:::
28+
29+
This guide will cover setting up your ParaTime observer node for the Oasis Network. Observer nodes are ParaTime
30+
client nodes that support confidential queries without being elected into the compute committee. They are registered on
31+
chain so that their eligibility can be enforced by an on-chain policy (e.g. key manager committees can grant them
32+
permissions). This way users can, for example, run confidential transactions and view calls on [Sapphire] ParaTime.
33+
This guide assumes some basic knowledge on the use of command line tools.
34+
35+
[Sapphire]: ../../build/sapphire/README.mdx
36+
37+
## Prerequisites
38+
39+
Before following this guide, make sure you've followed the [Prerequisites](prerequisites),
40+
[Run a Non-validator Node](non-validator-node.mdx), and [Run a ParaTime client Node](paratime-client-node.mdx)
41+
sections and have a working ParaTime client node with [TEE support].
42+
43+
### Stake Requirements
44+
45+
To be able to register as a ParaTime observer node on the Oasis Network, you need to have enough tokens staked in your
46+
entity's escrow account.
47+
48+
Current minimum staking requirements for a specific ParaTime are listed on the [Stake Requirements] page. You can also
49+
use [Oasis CLI tools] to check that as described in [Common Staking Info].
50+
51+
Finally, to stake the tokens and to check if you staked correctly, you can use any wallet and any explorer. If using
52+
our [Oasis CLI tools] and if everything was set up correctly, you should see something like below when running
53+
[`oasis account show`] command for your entity's account (this is an example for Testnet):
54+
55+
![code shell](../../../external/cli/examples/account/show-delegations.in.static)
56+
57+
![code](../../../external/cli/examples/account/show-delegations.out.static)
58+
59+
:::caution
60+
61+
The stake requirements may differ from ParaTime to ParaTime and are subject to change in the future.
62+
63+
Currently, for example, if you want to register an observer node for Testnet/Mainnet, you currently need to have at
64+
least **200 TEST/ROSE** tokens delegated:
65+
- **100 TEST/ROSE** for registering a new node entity and,
66+
- **100 TEST/ROSE** for each observer node.
67+
68+
See the [Stake Requirements] page for more details.
69+
70+
:::
71+
72+
[Stake Requirements]: prerequisites/stake-requirements.md
73+
[Run a ParaTime Node]: ../../get-involved/run-node/paratime-node.mdx
74+
[Common Staking Info]: ../../general/manage-tokens/cli/network.md#show-native-token
75+
[TEE support]: prerequisites/set-up-trusted-execution-environment-tee.md
76+
[Oasis CLI tools]: ../../general/manage-tokens/cli/account.md#delegate
77+
[`oasis account show`]: ../../general/manage-tokens/cli/account.md#show
78+
79+
### Register a New Entity or Update Your Entity Registration
80+
81+
:::danger
82+
83+
Everything in this section should be done on the `localhost` as there are sensitive items that will be created.
84+
85+
:::
86+
87+
:::danger
88+
89+
If you plan to run an observer node for Mainnet and Testnet make sure you create and use two separate entities to
90+
prevent replay attacks.
91+
92+
:::
93+
94+
1. If you don't have an entity yet, create a new one by following the [Initialize Entity] instructions for validators.
95+
96+
2. If you will be running the ParaTime on a new Oasis node, also initialize a new node by following the
97+
[Starting the Oasis Node] instructions for validators.
98+
99+
3. Now, [list your node ID] in the entity descriptor file `nodes` field.
100+
101+
4. [Register] the updated entity descriptor.
102+
103+
5. By adding the created entity ID in the node config file, you will [configure the node] to automatically register for
104+
the roles it has enabled (i.e. observer role) via the `registration.entity_id` configuration flag. No manual node
105+
registration is necessary.
106+
107+
```yaml
108+
mode: client
109+
# ... sections not relevant are omitted ...
110+
registration:
111+
entity_id: {{ entity_id }}
112+
```
113+
114+
6. Once the registration is complete, please share the Entity IDs with us so that we can whitelist them accordingly.
115+
116+
[Initialize Entity]: validator-node.mdx#initialize-entity
117+
[Starting the Oasis Node]: validator-node.mdx#starting-the-oasis-node
118+
[list your node ID]: validator-node.mdx#add-your-node-id-to-the-entity-descriptor
119+
[Register]: validator-node.mdx#entity-registration
120+
[`oasis account withdraw`]: ../../general/manage-tokens/cli/account.md#withdraw
121+
[configure the node]: paratime-node.mdx#configuration
122+
123+
## (Re)starting the Oasis Node
124+
125+
You can (re)start the node by running the following command:
126+
127+
```bash
128+
oasis-node --config /node/etc/config.yml
129+
```
130+
131+
After one epoch the node should register as observer (assuming it satisfies per-ParaTime policy requirements).
132+
133+
## Checking Node Status
134+
135+
To ensure that your node has the observer node, you can run the following command after the node has started:
136+
137+
```bash
138+
oasis-node control status -a unix:/node/data/internal.sock
139+
```
140+
141+
You should see `"observer"` in the `.registration.descriptor.roles` output entry.
142+
143+
## See also
144+
145+
<DocCard item={findSidebarItem('/node/web3')} />

docs/node/run-your-node/prerequisites/stake-requirements.md

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -56,12 +56,13 @@ want to set up a working node from scratch.
5656
| [Validator node] | 1. Registration of entity<br/>2. Registration of the validator node<br/>3. Member of the validator set |
5757
| [Non-validator node] | / |
5858
| [ParaTime node] | 1. Registration of entity<br/>2. Registration of the compute node<br/>3. Extra ParaTime-specific compute node stake<br/>4. Member of the validator set (Mainnet only) |
59-
| [ParaTime client node] | 1. Registration of entity<br/>2. Registration of the observer node |
59+
| [ParaTime observer node] | 1. Registration of entity<br/>2. Registration of the observer node | |
6060

6161
[Validator node]: ../validator-node.mdx
6262
[Non-validator node]: ../non-validator-node.mdx
6363
[ParaTime node]: ../paratime-node.mdx
6464
[ParaTime client node]: ../paratime-client-node.mdx
65+
[ParaTime observer node]: ../paratime-observer-node.mdx
6566

6667
[Oasis Explorer]: https://explorer.oasis.io/mainnet/consensus
6768
[Oasis Scan]: https://www.oasisscan.com

sidebarNode.ts

Lines changed: 11 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -78,7 +78,17 @@ export const sidebarNode: SidebarsConfig = {
7878
'node/run-your-node/seed-node',
7979
'node/run-your-node/archive-node',
8080
'node/run-your-node/paratime-node',
81-
'node/run-your-node/paratime-client-node',
81+
{
82+
type: 'category',
83+
label: 'ParaTime Client Node',
84+
link: {
85+
type: 'doc',
86+
id: 'node/run-your-node/paratime-client-node',
87+
},
88+
items: [
89+
'node/run-your-node/paratime-observer-node',
90+
],
91+
},
8292
{
8393
type: 'category',
8494
label: 'Key Manager Node',

0 commit comments

Comments
 (0)