Skip to content

Commit d054343

Browse files
authored
Merge pull request oasisprotocol#2169 from oasisprotocol/matevz/docs/rofl-app-id-derivation
docs: Document App ID derivation
2 parents fc4b55e + 8ff2de3 commit d054343

File tree

1 file changed

+21
-0
lines changed

1 file changed

+21
-0
lines changed

docs/rofl/app.mdx

Lines changed: 21 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -140,6 +140,27 @@ multi-sigs or DAOs with veto powers to control the upgrade process.
140140

141141
:::
142142

143+
:::tip App ID calculation
144+
145+
App ID is derived using one of the two schemes:
146+
147+
- **Creator address + creator account nonce (default)**: This approach is
148+
suitable for running tests (e.g. in [`sapphire-localnet`]) where you want
149+
deterministic app ID.
150+
- **Creator address + block round number + index of the `rofl.Create`
151+
transaction in the block**: This approach is non-deterministic and preferred
152+
in production environments so that the potential attacker cannot simply
153+
determine ROFL app ID in advance, even if they knew what the creator address
154+
is.
155+
156+
You can select the app ID derivation scheme by passing the
157+
[`--scheme` parameter][scheme-parameter].
158+
159+
:::
160+
161+
[`sapphire-localnet`]: https://github.com/oasisprotocol/docs/blob/main/docs/build/tools/localnet.mdx
162+
[scheme-parameter]: https://github.com/oasisprotocol/cli/blob/master/docs/rofl.md#create
163+
143164
## Oracle Contract
144165

145166
:::info

0 commit comments

Comments
 (0)