|
| 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 | + |
| 56 | + |
| 57 | + |
| 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')} /> |
0 commit comments