From da7d6f10af6fb32ae2eff689c0016974b5359ca9 Mon Sep 17 00:00:00 2001 From: Martin Tomazic Date: Mon, 17 Nov 2025 14:43:01 +0100 Subject: [PATCH] docs/node/run-your-node: Fix state sync documentation Add new `oasis network trust` command. Also removed the part that suggested taking latest height as a trust, which won't work for the stateful nodes. --- .../advanced/sync-node-using-state-sync.md | 67 ++----------------- 1 file changed, 7 insertions(+), 60 deletions(-) diff --git a/docs/node/run-your-node/advanced/sync-node-using-state-sync.md b/docs/node/run-your-node/advanced/sync-node-using-state-sync.md index 3d37866607..ea24339fa4 100644 --- a/docs/node/run-your-node/advanced/sync-node-using-state-sync.md +++ b/docs/node/run-your-node/advanced/sync-node-using-state-sync.md @@ -98,8 +98,9 @@ penalized for their misbehaviour and you may be tricked into following the wrong ::: -We recommend using `trust_period=288h` (12 days). This way the time required -to verify headers, submit possible misbehavior evidence and penalize nodes +We recommend using `trust_period=288h` (12 days). Even better you can query the +latest suggested trust period running `oasis network trust` (TODO insert link). +This way the time required to verify headers, submit possible misbehavior evidence and penalize nodes is still less than the debonding period, giving nodes strong incentive not to lie. ### Obtaining Trusted Height and Hash @@ -138,34 +139,11 @@ obtain the trusted height and hash there: [Oasis Explorer]: https://explorer.oasis.io/ [Oasis Scan]: https://www.oasisscan.com -#### A Trusted Node - -If you have an existing node that you trust, you can use its status output to -retrieve the current block height and hash by running: - -```bash -oasis-node control status -a unix:/node/data/internal.sock -``` - -This will give you output like the following (non-relevant fields omitted): +#### Oasis CLI -```json -{ - "software_version": "23.0.5", - "identity": { - ... - }, - "consensus": { - ... - "latest_height": 18466200, - "latest_hash": "9611c81c7e231a281f1de491047a833364f97c38142a80abd65ce41bce123378", - "latest_time": "2023-11-27T08:31:15Z", - "latest_epoch": 30760, - ... - }, - ... -} -``` +If you have Oasis CLI conected to an existing node that you trust, or if your +trust assumptions are fine with using (default) public grpc endpoints (e.g. testnet) +run `oasis network trust` (TODO insert link). the values you need are `latest_height` and `latest_hash`. @@ -236,34 +214,3 @@ The values you need are `index` and `hash`: } } ``` - -#### Oasis CLI - -Query our public Oasis node's endpoint using the Oasis CLI and obtain the -trusted height and hash there: - -```bash -oasis network status -``` - -This will give you output like the following (non-relevant fields omitted): - -```json -{ - "software_version": "23.0.5", - "identity": { - ... - }, - "consensus": { - ... - "latest_height": 18466200, - "latest_hash": "9611c81c7e231a281f1de491047a833364f97c38142a80abd65ce41bce123378", - "latest_time": "2023-11-27T08:31:15Z", - "latest_epoch": 30760, - ... - }, - ... -} -``` - -The values you need are `latest_height` and `latest_hash` .