Skip to content

Commit 55c8ec1

Browse files
committed
[cli] Update docs
1 parent a32bc45 commit 55c8ec1

File tree

2 files changed

+92
-11
lines changed

2 files changed

+92
-11
lines changed

cli/README.md

Lines changed: 38 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -93,13 +93,13 @@ export ANTI_WALLET_PASSPHRASE
9393
You can create a wallet file with the `anti wallet create` command:
9494

9595
```bash
96-
anti wallet create
96+
antij wallet create
9797
```
9898

9999
It will fail to re-create the file if it already exists. You can review this wallet info anytime with
100100

101101
```bash
102-
anti wallet info
102+
antij wallet info
103103
```
104104

105105
Remember to read your wallet passphrase into the `ANTI_WALLET_PASSPHRASE` environment variable before running any command that requires the wallet.
@@ -126,13 +126,48 @@ To do that, you can set the `ANTI_WAIT` environment variable to the number of se
126126
export ANTI_WAIT=120
127127
```
128128

129+
## Querying the token state
130+
131+
You can query the state of the Antithesis token with the following command:
132+
133+
```bash
134+
antij token
135+
```
136+
137+
This will show
138+
- the token owner a.k.a. the oracle identity
139+
- the pending change requests
140+
- the root of the mpf tree
141+
- the current UTxO of the state
142+
129143
## Querying facts of the Antithesis token
130144

131145
You can always query the Antithesis token and its facts
132146

133147
```bash
134-
anti facts | jq '.result'
148+
antij facts
149+
```
150+
151+
Will query all facts
152+
153+
But you can also query specific facts, for example:
154+
155+
```bash
156+
antij facts user
157+
```
158+
will report the GitHub registered users.
159+
160+
Or
161+
162+
```bash
163+
antij facts test-run pending
164+
```
165+
will report the pending test runs.
166+
167+
```bash
168+
anti facts --help
135169
```
170+
will show you all the available facts you can query.
136171

137172
## Design
138173

cli/docs/oracle-role.md

Lines changed: 54 additions & 8 deletions
Original file line numberDiff line numberDiff line change
@@ -1,8 +1,30 @@
11
# Oracle role
22

3-
This is the role of the user that wants to run an oracle service for the Antithesis platform. There will be only one token and so there will be only one oracle service running at a time, but we document it here for completeness.
3+
This is the role of the user that wants to run a service to control access to the Antithesis platform. There will be only one token and so there will be only one oracle service running at a time, but we document it here for completeness.
44

5-
## Creating the anti token (only for testing)
5+
## Creating the anti token (only once)
6+
7+
Oracle operations needs a wallet. Given the role aside setting the `ANTI_WALLET_FILE` environment variable to point to the wallet file, you also wanto to set th `ANTI_WALLET_PASSPHRASE` environment variable to encrypt it.
8+
9+
You can create a wallet with the `anti wallet create` command.
10+
11+
```bash
12+
antij wallet create
13+
```
14+
15+
The current oracle wallet reports
16+
17+
```bash
18+
antij wallet info
19+
```
20+
21+
```json
22+
{
23+
"address": "addr_test1vq04e6lvknx3ettppz5xq9x7nk8j87w5gaammke7z2ymyfqtkl4vv",
24+
"filePath": "tmp/oracle.json",
25+
"owner": "1f5cebecb4cd1cad6108a86014de9d8f23f9d4477bbddb3e1289b224"
26+
}
27+
```
628

729
To create the Antithesis token, you can use the `anti oracle token create` command.
830

@@ -12,19 +34,43 @@ anti oracle token boot
1234

1335
It will create the Antithesis token. This token is a unique identifier for the Antithesis platform and will be used by all users to interact with the platform. You have to distribute it so that users can set the `ANTI_TOKEN_ID` environment variable to point to it.
1436

15-
To test the role change the ANTI_TOKEN_ID environment variable to the new create token id
16-
1737
You can review the token info anytime with
1838

39+
```bash
40+
antij token | jq .state
41+
```
42+
43+
Critically the owner matches the wallet owner.
44+
45+
## Publishing the oracle configuration
46+
47+
Before requesters can request test-runs, the oracle should select the agent identity and in general expose validation parameters so that the requesters and the agent can pre-validate their requests.
48+
49+
This is done with the `anti oracle config set` command.
50+
1951

2052
```bash
21-
anti token | jq '.result'
53+
anti oracle config set --min-test-duration MIN_TEST_HOURS --max-test-duration MAX_TEST_HOURS --agent-pkh PUBLIC_KEY_HASH
2254
```
23-
In the requests field you will notice the `validation` field, which will be set to `validated` for all requests that have been validated .
2455

56+
This will end up in a fact and so we can inspect it with the `anti facts` command.
57+
58+
```bash
59+
antij facts config
60+
```
2561

2662
## Updating the anti token
2763

64+
The main responsibility of the oracle is to include change requests in the Antithesis token.
65+
66+
Pending change requests can be queried with the `antij token` command.
67+
68+
```bash
69+
antij token | jq '.requests'
70+
```
71+
72+
In the requests field you will notice the `validation` field, which will be set to `validated` for all requests that have been validated .
73+
2874
Once you decided what to include in the Antithesis token, you can commit the requests to the token.
2975

3076
Updating the token with new requests is done with the `anti oracle token update` command. As with retract you have to provide the `outputRefId` of the request you want to update. Multiple requests can be updated at once, so you can provide multiple `-o` options.
@@ -33,10 +79,10 @@ Updating the token with new requests is done with the `anti oracle token update`
3379
anti oracle token update -o b6fc7cca5bcae74e6a5983f7922d0e0985285f1f19e62ccc9cb9fd4d3766a81b-0
3480
```
3581

36-
## Deleting the anti token (only for testing)
82+
## Deleting the anti token (DANGEROUS)
3783

3884
To delete the Antithesis token, you can use the `anti oracle token delete` command.
3985

4086
```bash
4187
anti oracle token delete
42-
```
88+
```

0 commit comments

Comments
 (0)