Skip to content

Commit 26e10d6

Browse files
authored
Merge pull request #1472 from oasisprotocol/anzoman/run-your-node-client-stateless
docs/node/run-your-node: Document use of client-stateless mode
2 parents e5b1431 + bfb417f commit 26e10d6

File tree

4 files changed

+77
-1
lines changed

4 files changed

+77
-1
lines changed

docs/node/grpc.mdx

Lines changed: 13 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -117,17 +117,28 @@ static_resources:
117117
Consensus/(\
118118
EstimateGas|\
119119
GetBlock|\
120+
GetBlockResults|\
120121
GetChainContext|\
121122
GetGenesisDocument|\
123+
GetLastRetainedHeight|\
124+
GetLatestHeight|\
125+
GetLightBlock|\
122126
GetNextBlockState|\
123127
GetParameters|\
124128
GetSignerNonce|\
125129
GetStatus|\
126130
GetTransactions|\
127131
GetTransactionsWithResults|\
132+
GetTransactionsWithProofs|\
128133
GetUnconfirmedTransactions|\
129134
MinGasPrice|\
130-
SubmitTx)|\
135+
SubmitEvidence|\
136+
SubmitTx|\
137+
SubmitTxWithProof|\
138+
StateSyncGet|\
139+
StateSyncGetPrefixes|\
140+
StateSyncIterate|\
141+
WatchBlocks)|\
131142
Governance/(\
132143
ActiveProposals|\
133144
ConsensusParameters|\
@@ -157,6 +168,7 @@ static_resources:
157168
RuntimeClient/(\
158169
CheckTx|\
159170
GetBlock|\
171+
GetBlockResults|\
160172
GetEvents|\
161173
GetGenesisBlock|\
162174
GetLastRetainedBlock|\

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

Lines changed: 5 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -84,9 +84,14 @@ one or more [ROFL apps].
8484
ParaTimes such as Sapphire and Cipher that supports confidential smart contact
8585
queries.
8686

87+
- **[Stateless Node]** is a special type of client node that operates without
88+
maintaining state, allowing it to bootstrap instantly, making it particularly
89+
well-suited for ROFL development.
90+
8791
[Non-Validator Node]: ./non-validator-node.mdx
8892
[Client Node]: ./paratime-client-node.mdx
8993
[Observer Node]: ./paratime-observer-node.mdx
94+
[Stateless Node]: ./paratime-client-node.mdx#stateless-client-node-optional
9095
[Sapphire Client Node]: ./paratime-client-node.mdx
9196
[Cipher Client Node]: ./paratime-client-node.mdx
9297
[ROFL Node]: ./rofl-node.mdx

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

Lines changed: 52 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -76,6 +76,58 @@ accessible on the internet (for `TCP` and `UDP` traffic).
7676
[Mainnet]: ../network/mainnet.md
7777
[Testnet]: ../network/testnet.md
7878

79+
### Stateless Client Node (optional)
80+
81+
:::info
82+
83+
Stateless client is still in early stage, and thus not suitable for use cases where you need high availability.
84+
85+
:::
86+
87+
Client node requires sufficient disk space and must wait for state synchronization.
88+
A stateless client node avoids these problems by fetching the state and light blocks via configured gRPC endpoints
89+
(provider node addresses) and using a light client to verify the data against state roots from block headers.
90+
It can be started using the following configuration:
91+
92+
```yaml
93+
mode: client-stateless
94+
# ... sections not relevant are omitted ...
95+
consensus:
96+
# Light client configuration
97+
light_client:
98+
trust:
99+
# ... sections less relevant are omitted ...
100+
providers:
101+
- <node-address-1>
102+
- <node-address-2>
103+
# Add more node addresses as needed
104+
```
105+
106+
We recommend configuring a recent trust root (e.g. 1000 blocks old), that is younger than your providers last retained
107+
height, taking their pruning into account.
108+
109+
:::info
110+
111+
See the [State Sync](./advanced/sync-node-using-state-sync.md) documentation for more info on configuring trusted
112+
period, height and hash for the light client.
113+
114+
:::
115+
116+
The provider address can be a domain name, IP of a node on the network, or a path to the socket of a local node.
117+
To ensure compatibility, all provider nodes specified must be running the latest version of Oasis Core.
118+
119+
:::note
120+
121+
Make sure you allow all the methods listed in [this example](../grpc.mdx#envoy) in your gRPC proxy for Oasis node.
122+
123+
:::
124+
125+
:::tip
126+
127+
You can use `grpc.oasis.io:443` or `grpc.testnet.oasis.io:443` as provider addresses for Mainnet and Testnet.
128+
129+
:::
130+
79131
### TEE ParaTime Client Node (optional)
80132

81133
If your node requires the ability to issue queries that can access confidential

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

Lines changed: 7 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -34,6 +34,13 @@ Node instructions:
3434
[Testnet]: ../network/testnet.md#sapphire
3535
[Intel TDX]: ./prerequisites/set-up-tee.mdx#tdx
3636
[rofl-types]: https://github.com/oasisprotocol/oasis-sdk/blob/main/docs/rofl/workflow/init.md
37+
[client-stateless]: ./paratime-client-node.mdx#stateless-client-node-optional
38+
39+
:::tip
40+
41+
Consider running ROFL node in [client-stateless] mode for faster bootstrapping and using less resources.
42+
43+
:::
3744

3845
### Configure Firewall
3946

0 commit comments

Comments
 (0)