Skip to content

Commit 537a642

Browse files
committed
docs/rofl: Document set-trust-root subcommand
Document the new `set-trust-root` subcommand and its positional arguments, and update the `trust-root` section to reflect the JSON output.
1 parent 12d2ea2 commit 537a642

3 files changed

Lines changed: 20 additions & 1 deletion

File tree

docs/rofl.md

Lines changed: 18 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -541,7 +541,7 @@ needs to have a hardcoded *trust root*. Typically, it consists of:
541541
- the [chain domain separation context],
542542
- the specific consensus block hash and its height.
543543

544-
To obtain the latest trust root in rust programming language, run
544+
To obtain the latest trust root in JSON format, run
545545
`oasis rofl trust-root`:
546546

547547
![code shell](../examples/rofl/trust-root.in.static)
@@ -554,3 +554,20 @@ You can also define specific [Network and ParaTime][npa] parameters:
554554

555555
[ParaTime ID]: https://github.com/oasisprotocol/oasis-core/blob/master/docs/runtime/identifiers.md
556556
[chain domain separation context]: https://github.com/oasisprotocol/oasis-core/blob/master/docs/crypto.md#chain-domain-separation
557+
558+
### Set the trust root in the app manifest {#set-trust-root}
559+
560+
The consensus block height and hash of the [trust root](#trust-root) are stored
561+
in the deployment section of the `rofl.yaml` app manifest and are embedded into
562+
the app at build time. Instead of editing the manifest by hand, you can fetch
563+
the latest trust root and update the manifest automatically by running
564+
`oasis rofl set-trust-root`:
565+
566+
![code shell](../examples/rofl/set-trust-root.in.static)
567+
568+
![code](../examples/rofl/set-trust-root.out.static)
569+
570+
By default the latest finalized consensus block is used. You can also pass the
571+
block `height` (and optionally the block `hash`) as positional arguments to pin
572+
a specific block, or `--deployment` to update a non-default deployment. After
573+
setting the trust root, run [`oasis rofl build`](#build) for it to take effect.
Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1 @@
1+
oasis rofl set-trust-root
Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1 @@
1+
Updated 'rofl.yaml' with trust root: height=1022, hash=bb3e63d729dd568ce07b37eea33eddf8082ed4cacbd64097aad32168a4a4fc9a

0 commit comments

Comments
 (0)