You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
Copy file name to clipboardExpand all lines: cli/README.md
+22-12Lines changed: 22 additions & 12 deletions
Display the source diff
Display the rich diff
Original file line number
Diff line number
Diff line change
@@ -2,8 +2,8 @@
2
2
3
3
## Context
4
4
5
-
This is a command line interface (CLI) to track accesses to expensive resources. In particular we are focusing on the Cardano Foundation controlled Antithesis instance. The only command relative to the specific instance is the `anti agent run-test` command, which is used to run tests on the Antithesis platform. The rest of the commands are independent of the resource. This CLI uses MPFS as a backend meaning all data is stored on the Cardano blockchain. ATM MPFS is only supporting preprod.
6
-
The CLI should be used to book tests on the Antithesis platform. ATM it supports only projects on GitHub.
5
+
This is a command line interface (CLI) to track accesses to expensive resources. In particular we are focusing on the Cardano Foundation controlled Antithesis instance. The only command relative to the specific instance is the `anti agent run-test` command, which is used to run tests on the Antithesis platform. The rest of the commands are independent of the resource. This CLI uses MPFS as a backend meaning all data is stored on the Cardano blockchain. Currently MPFS is only supporting preprod.
6
+
The CLI should be used to book tests on the Antithesis platform. Currently it supports only projects on GitHub.
7
7
8
8
## Prerequisites
9
9
@@ -61,8 +61,7 @@ export ANTI_PRETTY=1
61
61
62
62
For scripting purposes you can disable the pretty effect of the env-var by passing `--no-pretty` switch.
63
63
64
-
65
-
### Environment variables
64
+
### Environment variables and preliminaries
66
65
67
66
#### MPFS host
68
67
If you do not want to host your own MPFS service, you can use a public one at `https://mpfs.plutimus.com`.
ATM the anti CLI works only by reading a wallet file containing a mnemonic phrase.
77
+
Currently the anti CLI works only by reading a wallet file containing a mnemonic phrase.
79
78
80
79
The anti command will read the wallet file from the `ANTI_WALLET_FILE` environment variable.
81
80
@@ -131,21 +130,20 @@ anti wallet decrypt path/to/decrypted/secret/file
131
130
132
131
For the both cases `ANTI_WALLET_FILE` is set as before.
133
132
133
+
> Store a copy of your encrypted/plaintext wallet file in a password manager. Think twice before storing a plaintext wallet file. Store your passphrase in a password manager too. Currently we do not support hardware wallets like Ledger or Trezor.
134
134
135
-
> Store a copy of your encrypted/plaintext wallet file in a password manager. Think twice before storing a plaintext wallet file. Store your passphrase in a password manager too. ATM we do not support hardware wallets like Ledger or Trezor.
136
-
137
-
`> Fund your wallet with some tAda tokens on preprod, for example using the [Cardano Testnet Faucet](https://docs.cardano.org/cardano-testnets/tools/faucet/).
135
+
> Fund your wallet with some tAda tokens on preprod, for example using the [Cardano Testnet Faucet](https://docs.cardano.org/cardano-testnets/tools/faucet/).
138
136
139
137
140
-
### Antithesis token
138
+
####Antithesis token
141
139
142
140
This is the unique token that identifies the Antithesis access interface. You need to refer to it setting the `ANTI_TOKEN_ID` environment variable.
When submitting txs to the chain, it's quite convenient to wait for the transaction to be included in the chain, so that you can immediately use the result of the transaction.
151
149
@@ -155,7 +153,19 @@ To do that, you can set the `ANTI_WAIT` environment variable to the number of se
155
153
export ANTI_WAIT=120
156
154
```
157
155
158
-
## Querying the token state
156
+
#### Configuring access to GitHub
157
+
158
+
The tool will query the GitHub platform on your behalf in order to obtain (public) information about repositories (where Antithesis test runs are stored) and users (requesting a test run).
159
+
160
+
In order to make this possible you must provide a GitHub Personal Access Token (PAT) for read-only access to public data. See the GitHub platform's documentation for how to create one.
161
+
162
+
Provide your GitHub PAT to the tool by setting an environment variable:
docker run cardano-foundation/anti-oracle:$version
29
29
```
30
30
31
+
## Running oracle commands manually
32
+
33
+
Alternatively, oracle commands can be run manually, using the `anti` CLI. See the [README.md](../README.md) for how to install it.
34
+
31
35
## Creating the anti token (only once)
32
36
33
-
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 setth`ANTI_WALLET_PASSPHRASE` environment variable to encrypt it.
37
+
Oracle operations need a wallet. Since the oracle role is critical, in addition to setting the `ANTI_WALLET_FILE` environment variable to point to the wallet file, you should also setthe`ANTI_WALLET_PASSPHRASE` environment variable to encrypt the wallet.
34
38
35
39
You can create a wallet with the `anti wallet create` command.
Copy file name to clipboardExpand all lines: cli/docs/requester-role.md
+20-11Lines changed: 20 additions & 11 deletions
Display the source diff
Display the rich diff
Original file line number
Diff line number
Diff line change
@@ -2,46 +2,55 @@
2
2
3
3
This is the role of the user who wants to run tests using the Antithesis platform.
4
4
5
-
Before you can request a test run, you need to register yourself as github user with an ed25519 public key.
5
+
Before you can request a test run, you need to register yourself as GitHub user with an SSH ed25519 public key.
6
6
7
7
## Registrations
8
8
9
9
A couple of requests have to be made once before the regular test-run requests can succeed. These requests are used to register the user and the project on the Antithesis platform.
10
10
11
-
ATM we only support Github as a platform, but we plan to support other platforms in the future.
11
+
Currently we only support GitHub as a platform, but we plan to support other platforms in the future.
12
12
13
-
Registration and unregistrations can be requested by anyone. The oracle role will simply validate the facts against the Github platform and update the Antithesis token accordingly. You cannot register a user or project that is already registered.
13
+
Registration and unregistrations can be requested by anyone. The oracle role will simply validate the facts against the GitHub platform and update the Antithesis token accordingly. You cannot register a user or project that is already registered.
14
14
15
-
Be careful that there is no imperativity here, so i.e. you cannot unregister a user public key if it's present in Github.
15
+
Be careful that there is no imperativity here, so i.e. you cannot unregister a user public key if it's present in GitHub.
16
16
17
17
### Registering a user public key
18
18
19
19
To register yourself as a user, you can use the `anti requester register-user` command.
20
20
21
+
You must provide (using the incorrectly-named `pubkeyhash` flag) the actual (base64-encoded) ed15519 public key (without the ssh-ed25519 prefix and without the optional key-id). So, for example, if your GitHub username is `alice` and you have configured this public key in your GitHub account:
then you should copy/paste the second field into the following command:
29
+
21
30
```bash
22
31
anti requester register-user --platform github --username alice --pubkeyhash AAAAC3NzaC1lZDI1NTE5AAAAIO773JHqlyLm5XzOjSe+Q5yFJyLFuMLL6+n63t4t7HR8
23
32
```
24
33
25
-
As with all other requests, once submitted regularly you have to wait for the oracle to merge your request into the Antithesis token.
34
+
As with all other requests, once submitted you have to wait for the oracle to merge your request into the Antithesis token.
26
35
27
36
You can use the `anti token` command to inspect your pending requests in the Antithesis token.
28
37
29
38
You can use the `anti facts` command to query the Antithesis token and see if your user is part of the facts.
30
39
31
40
```bash
32
-
anti token | jq '.requests'"
41
+
anti token --no-pretty | jq '.requests'
33
42
```
34
43
35
-
Until your requests is there, you cannot proceed with the next steps.
44
+
As long as your request is listed by `anti token`, you cannot proceed with the next steps.
36
45
37
-
As with all requests to an mpfs you can retract your request using the `anti retract` command, anytime before the oracle merges it into the Antithesis token.
46
+
As with all requests to an MPFS you can retract your request using the `anti retract` command, anytime before the oracle merges it into the Antithesis token.
38
47
39
48
Get the `outputRefId` of your request from pending requests command output and use it to retract your request
40
49
41
50
```bash
42
51
anti retract -o 9ec36572e01bca9f7d32d791a5a6c529ef91c10d536f662735af26311b2c8766-0
43
52
```
44
-
ATM the oracle is not able to justify a request rejection. But anti cli will apply the oracle validation before submitting it, so rejections will be caught before submitting the request.
53
+
Currently the oracle is not able to justify a request rejection. But anti cli will apply the oracle validation before submitting it, so rejections will be caught before submitting the request.
45
54
46
55
### Unregistering a user public key
47
56
@@ -53,15 +62,15 @@ anti requester unregister-user --platform github --username alice --pubkeyhash A
53
62
54
63
### Registering a role
55
64
56
-
This is necessary to register a user as a github repository antitheisistest requester.
65
+
This is necessary to register a user as a GitHub repository antithesis test requester.
57
66
58
67
Before you do this make sure your repository CODEOWNERS file contains a line like this:
59
68
60
69
```
61
70
antithesis: @your-github-username
62
71
```
63
72
64
-
You can have as many user as you want but registering them as test-run requesters has to be done one by one.
73
+
You can have as many users as you want but registering them as test-run requesters has to be done one by one.
65
74
66
75
To register a role, you can use the `anti requester register-role` command.
0 commit comments