@@ -16,72 +16,44 @@ OFfchain Logic (ROFL)][rofl] apps:
1616
1717[ rofl ] : https://github.com/oasisprotocol/docs/blob/main/docs/build/rofl/README.mdx
1818
19- ## Build ROFL {#build}
20-
21- The ` build ` command will execute a series of build commands depending on the
22- target Trusted Execution Environment (TEE) and produce the Oasis Runtime
23- Container (ORC) bundle.
24-
25- Building a ROFL bundle requires a ROFL app manifest (` rofl.yaml ` ) to be present
26- in the current working directory. All information about what kind of ROFL app
27- to build is specified in the manifest.
28-
29- Additionally, the following flags are available:
30-
31- - ` --output ` the filename of the output ORC bundle. Defaults to the package name
32- inside ` Cargo.toml ` and the ` .orc ` extension.
33-
34- ::: info
35-
36- Building ROFL apps involves ** cross compilation** , so you do not need a working
37- TEE on your machine. However, you do need to install all corresponding compilers
38- and toolchains. Check out the [ ROFL Prerequisites] chapter for details.
39-
40- :::
41-
42- [ ROFL Prerequisites ] : https://github.com/oasisprotocol/oasis-sdk/blob/main/docs/rofl/prerequisites.md
43- [ npa ] : ./account.md#npa
19+ ## Initialize a new ROFL app manifest {#init}
4420
45- ## Show ROFL identity {#identity}
21+ The ` rofl init ` command will prepare a new ROFL app manifest in the given
22+ directory (defaults to the current directory). The manifest is a YAML file named
23+ ` rofl.yaml ` which defines the versions of all components, upgrade policies, etc.
24+ needed to manage, build and deploy the ROFL app.
4625
47- Run ` rofl identity ` to compute the ** cryptographic identity ** of the ROFL app:
48-
49- ![ code shell ] ( ../examples/rofl/identity.in.static )
26+ You can also define specific [ Network, ParaTime and Account ] [ npa ] parameters
27+ as those get recorded into the manfiest so you don't need to specify them on
28+ each invocation:
5029
51- ![ code] ( ../examples/rofl/identity.out .static )
30+ ![ code shell ] ( ../examples/rofl/init.in .static )
5231
53- The output above is Base64-encoded enclave identity which depends on the ROFL
54- source code and the build environment. Enclave identities should be reproducible
55- on any computer and are used to prove and verify the integrity of ROFL binaries
56- on the network. See the [ Reproducibility] chapter to learn more.
57-
58- [ Reproducibility ] : https://github.com/oasisprotocol/oasis-sdk/blob/main/docs/runtime/reproducibility.md
32+ ![ code] ( ../examples/rofl/init.out.static )
5933
6034## Create a new ROFL app on the network {#create}
6135
62- Use ` rofl create ` to register a new ROFL app on the network using a
63- specific [ policy ] file:
36+ Use ` rofl create ` to register a new ROFL app on the network using an existing
37+ manifest.
6438
6539![ code shell] ( ../examples/rofl/create.in.static )
6640
6741![ code] ( ../examples/rofl/create.out.static )
6842
6943Returned is the unique ROFL app ID starting with ` rofl1 ` and which you
70- will refer to for managing your ROFL app in the future.
44+ will refer to for managing your ROFL app in the future. If you specify the
45+ ` --update-manifest ` parameter the manifest will be automatically updated with
46+ the newly assigned app identifier.
7147
7248::: info
7349
7450In order to prevent spam attacks registering a ROFL app requires a
7551certain amount to be deposited from your account until you decide to
7652[ remove it] ( #remove ) . The deposit remains locked for the lifetime of the app.
77- Check out the [ ROFL chapter] [ policy ] to view the current staking requirements.
53+ Check out the [ ROFL chapter] [ app ] to view the current staking requirements.
7854
7955:::
8056
81- You can also define specific [ Network, ParaTime and Account] [ npa ] parameters:
82-
83- ![ code shell] ( ../examples/rofl/create-npa.in.static )
84-
8557With the ` --scheme ` parameter, you can select one of the following ROFL app ID
8658derivation schemes:
8759
@@ -92,28 +64,46 @@ derivation schemes:
9264- ` cri ` uses the ROFL app creator address combined with the block round the
9365 transaction will be validated in and its position inside that block.
9466
95- [ policy ] : https://github.com/oasisprotocol/oasis-sdk/blob/main/docs/rofl/deployment.md#register-the- app
67+ [ app ] : https://github.com/oasisprotocol/oasis-sdk/blob/main/docs/rofl/app.mdx
9668[ smart contract address derivation ] : https://ethereum.org/en/developers/docs/accounts/#contract-accounts
9769
98- ## Update ROFL policy {#update }
70+ ## Build ROFL {#build }
9971
100- Use ` rofl update ` command to set the new policy and the new administrator of the
101- ROFL app:
72+ The ` rofl build ` command will execute a series of build commands depending on
73+ the target Trusted Execution Environment (TEE) and produce the Oasis Runtime
74+ Container (ORC) bundle.
10275
103- ![ code shell ] ( ../examples/rofl/update.in.static )
76+ Additionally, the following flags are available:
10477
105- ![ code shell] ( ../examples/rofl/update.out.static )
78+ - ` --update-manifest ` updates the enclave identity in the app manifest with the
79+ identity of the locally built app.
80+
81+ - ` --output ` the filename of the output ORC bundle. Defaults to the pattern
82+ ` <name>.<deployment>.orc ` where ` <name> ` is the app name from the manifest and
83+ ` <deployment> ` is the deployment name from the manifest.
84+
85+ - ` --verify ` also verifies the locally built enclave identity against the
86+ identity that is currently defined in the manifest and also against the
87+ identity that is currently set in the on-chain policy.
10688
107- For the administrator, you can also specify an account name in your wallet or
108- address book.
89+ ::: info
10990
110- To keep the existing administrator, pass ` self ` :
91+ Building ROFL apps does not require a working TEE on your machine. However, you
92+ do need to install all corresponding tools. Check out the [ ROFL Prerequisites]
93+ chapter for details.
11194
112- ![ code shell ] ( ../examples/rofl/update-self.in.static )
95+ :::
11396
114- You can also define specific [ Network, ParaTime and Account] [ npa ] parameters:
97+ [ ROFL Prerequisites ] : https://github.com/oasisprotocol/oasis-sdk/blob/main/docs/rofl/prerequisites.md
98+ [ npa ] : ./account.md#npa
11599
116- ![ code shell] ( ../examples/rofl/update-npa.in.static )
100+ ## Update ROFL app config {#update}
101+
102+ Use ` rofl update ` command to update the ROFL app's configuration on chain:
103+
104+ ![ code shell] ( ../examples/rofl/update.in.static )
105+
106+ ![ code shell] ( ../examples/rofl/update.out.static )
117107
118108## Remove ROFL app from the network {#remove}
119109
@@ -126,10 +116,6 @@ Run `rofl remove` to deregister your ROFL app:
126116The deposit required to register the ROFL app will be returned to the current
127117administrator account.
128118
129- You can also define specific [ Network, ParaTime and Account] [ npa ] parameters:
130-
131- ![ code shell] ( ../examples/rofl/remove-npa.in.static )
132-
133119## Show ROFL information {#show}
134120
135121Run ` rofl show ` to obtain the information from the network on the ROFL admin
@@ -139,11 +125,22 @@ account, staked amount, current ROFL policy and running instances:
139125
140126![ code] ( ../examples/rofl/show.out.static )
141127
142- You can also define specific [ Network and ParaTime ] [ npa ] parameters:
128+ ## Advanced
143129
144- ![ code shell ] ( ../examples/rofl/show-np.in.static )
130+ ### Show ROFL identity {#identity}
145131
146- ## Advanced
132+ Run ` rofl identity ` to compute the ** cryptographic identity** of the ROFL app:
133+
134+ ![ code shell] ( ../examples/rofl/identity.in.static )
135+
136+ ![ code] ( ../examples/rofl/identity.out.static )
137+
138+ The output above is Base64-encoded enclave identity which depends on the ROFL
139+ source code and the build environment. Enclave identities should be reproducible
140+ on any computer and are used to prove and verify the integrity of ROFL binaries
141+ on the network. See the [ Reproducibility] chapter to learn more.
142+
143+ [ Reproducibility ] : https://github.com/oasisprotocol/oasis-sdk/blob/main/docs/runtime/reproducibility.md
147144
148145### Show the current trust-root {#trust-root}
149146
0 commit comments