Skip to content

Commit c16d122

Browse files
committed
Update aggregator and signer doc
1 parent 8900bfd commit c16d122

File tree

2 files changed

+72
-30
lines changed

2 files changed

+72
-30
lines changed

docs/root/manual/developer-docs/nodes/mithril-aggregator.md

Lines changed: 70 additions & 30 deletions
Original file line numberDiff line numberDiff line change
@@ -124,6 +124,7 @@ Usage: mithril-aggregator [OPTIONS] <COMMAND>
124124

125125
Commands:
126126
genesis Genesis tools
127+
era Era tools
127128
serve Server runtime mode
128129
help Print this message or the help of the given subcommand(s)
129130

@@ -137,9 +138,9 @@ Options:
137138
--config-directory <CONFIG_DIRECTORY>
138139
Directory where configuration file is located [default: ./config]
139140
-h, --help
140-
Print help information
141+
Print help
141142
-V, --version
142-
Print version information
143+
Print version
143144
```
144145

145146
Run 'serve' command in release with default configuration
@@ -160,7 +161,7 @@ Run 'serve' command in release with a custom configuration via env vars
160161
GENESIS_VERIFICATION_KEY=$(wget -q -O - **YOUR_GENESIS_VERIFICATION_KEY**) RUN_INTERVAL=60000 NETWORK=**YOUR_CARDANO_NETWORK** ./mithril-aggregator serve
161162
```
162163

163-
## Release build and run binary 'genesis' command
164+
## Release build and run binary 'era' command
164165

165166
Build in release with default configuration
166167

@@ -171,60 +172,80 @@ make build
171172
Display the help menu
172173

173174
```bash
174-
./mithril-aggregator genesis --help
175+
./mithril-aggregator era --help
175176
```
176177

177178
You should see
178179

179180
```bash
180-
mithril-aggregator-genesis
181-
Genesis tools
181+
Era tools
182182

183-
USAGE:
184-
mithril-aggregator genesis <SUBCOMMAND>
183+
Usage: mithril-aggregator era <COMMAND>
185184

186-
OPTIONS:
187-
-h, --help Print help information
185+
Commands:
186+
list Era list command
187+
generate-tx-datum Era tx datum generate command
188+
help Print this message or the help of the given subcommand(s)
189+
190+
Options:
191+
-h, --help Print help
192+
```
193+
194+
Run 'era list' to list the supported eras embedded in the binary
195+
196+
```bash
197+
./mithril-aggregator era list
198+
```
188199

189-
SUBCOMMANDS:
190-
bootstrap Genesis certificate bootstrap command
191-
export Genesis certificate export command
192-
help Print this message or the help of the given subcommand(s)
193-
import Genesis certificate import command
200+
You should see something like
194201

202+
```bash
203+
Supported Eras:
204+
[
205+
Thales,
206+
]
195207
```
196208

197-
Run 'genesis bootstrap' command in release with default configuration, **only in test mode**.
198-
This allows the Mithril Aggregator node to bootstrap a `Genesis Certificate`. After this operation, the Mithril Aggregator will be able to produce new snapshots and certificates.
209+
:::tip
210+
211+
You can use the `--json` option in order to display results in `JSON` format for the `list` command:
199212

200213
```bash
201-
./mithril-aggregator genesis bootstrap
214+
./mithril-aggregator era list --json
202215
```
203216

204-
Or with a specific `Genesis Secret Key`, **only in test mode**.
217+
You should see something like
205218

206219
```bash
207-
./mithril-aggregator genesis bootstrap --genesis-secret-key **YOUR_SECRET_KEY**
220+
["thales"]
208221
```
209222

210-
Run 'genesis export' command in release with default configuration.
211-
This allows the Mithril Aggregator node to export the `Genesis Payload` that needs to be signed (and later reimported) of the `Genesis Certificate`. The signature of the `Genesis Payload` must be done manually with the owner of the `Genesis Secret Key`.
223+
:::
224+
225+
Run 'era generate-tx-datum' to generate the transaction datum file to be stored on the Cardano chain that will provide era markers to the 'cardano-chain' era reader adapter
226+
227+
**Case 1**: There is only one supported era in the code, create the datum file with
212228

213229
```bash
214-
./mithril-aggregator genesis export --target-path **YOUR_TARGET_PATH**
230+
./mithril-aggregator era generate-tx-datum --current-era-epoch **EPOCH_AT_WHICH_CURRENT_ERA_STARTS** --era-markers-secret-key **YOUR_ERA_ACTIVATION_SECRET_KEY**
215231
```
216232

217-
Run 'genesis import' command in release with default configuration.
218-
This allows the Mithril Aggregator node to import the signed payload of the `Genesis Certificate` and create it in the store. After this operation, the Mithril Aggregator will be able to produce new snapshots and certificates.
233+
You should see something like
219234

220235
```bash
221-
./mithril-aggregator genesis import --signed-payload-path **YOUR_SIGNED_PAYLOAD_PATH**
236+
{"constructor":0,"fields":[{"bytes":"5b7b226e223a227468616c6573222c2265223a317d5d"},{"bytes":"a58fe8e336f465ded3bba7c5a7afe5b5a26f2fb65b7c4e6e742e680645f13df28bf2b63a61cc72d9c826be490e2c1f1098d955df503580a4e899b5173884e30e"}]}
222237
```
223238

224-
Run 'genesis import' command in release with a custom configuration via env vars
239+
**Case 2**: There are two supported era in the code, in order to announce the upcoming era (i.e. the activation epoch of this era is not known yet), run the command
225240

226241
```bash
227-
GENESIS_VERIFICATION_KEY=$(wget -q -O - **YOUR_GENESIS_VERIFICATION_KEY**) RUN_INTERVAL=60000 NETWORK=**YOUR_CARDANO_NETWORK** ./mithril-aggregator genesis import --signed-payload-path **YOUR_SIGNED_PAYLOAD_PATH**
242+
./mithril-aggregator era generate-tx-datum --current-era-epoch **EPOCH_AT_WHICH_CURRENT_ERA_STARTS** --era-markers-secret-key **YOUR_ERA_ACTIVATION_SECRET_KEY**
243+
```
244+
245+
**Case 3**: There are two supported era in the code, in order to activate the era switch at a following epoch (i.e. the activation epoch of this era known), run the command
246+
247+
```bash
248+
./mithril-aggregator era generate-tx-datum --current-era-epoch **EPOCH_AT_WHICH_CURRENT_ERA_STARTS** --next-era-epoch **EPOCH_AT_WHICH_NEXT_ERA_STARTS** --era-markers-secret-key **YOUR_ERA_ACTIVATION_SECRET_KEY**
228249
```
229250

230251
:::tip
@@ -238,6 +259,7 @@ If you want to dig deeper, you can get access to several level of logs from the
238259

239260
:::
240261

262+
241263
<CompiledBinaries />
242264

243265
## Build and run Docker container
@@ -265,6 +287,8 @@ Here are the subcommands available:
265287
| **genesis export** | Export genesis payload to sign with genesis secret key |
266288
| **genesis import** | Import genesis signature (payload signed with genesis secret key) and create & import a genesis certificate in the store |
267289
| **genesis bootstrap** | Bootstrap a genesis certificate (test only usage) |
290+
| **era list** | List the supported eras |
291+
| **era generate-tx-datum** | Generate era markers transaction datum to be stored on chain |
268292

269293
## Configuration parameters
270294

@@ -304,6 +328,8 @@ General parameters:
304328
| `snapshot_bucket_name` | - | - | `SNAPSHOT_BUCKET_NAME` | Name of the bucket where the snapshots are stored | - | `snapshot-bucket` | :heavy_check_mark: | Required if `snapshot_uploader_type` is `gcp`
305329
| `run_interval` | - | - | `RUN_INTERVAL` | Interval between two runtime cycles in ms | - | `60000` | :heavy_check_mark: |
306330
| `url_snapshot_manifest` | - | - | `URL_SNAPSHOT_MANIFEST` | Snapshots manifest location | - | Only if `snapshot_store_type` is `gcp`, else it should be `` | :heavy_check_mark: |
331+
| `era_reader_adapter_type` | `--era-reader-adapter-type` | - | `ERA_READER_ADAPTER_TYPE` | Era reader adapter type that can be `cardano-chain`, `file` or `bootstrap`. | `bootstrap` | - | - |
332+
| `era_reader_adapter_params` | `--era-reader-adapter-params` | - | `ERA_READER_ADAPTER_PARAMS` | Era reader adapter params that is an optional JSON encoded parameters structure that is expected depending on the `era_reader_adapter_type` parameter | - | - | - |
307333

308334
`genesis bootstrap` command:
309335

@@ -315,10 +341,24 @@ General parameters:
315341

316342
| Parameter | Command Line (long) | Command Line (short) | Environment Variable | Description | Default Value | Example | Mandatory |
317343
|-----------|---------------------|:---------------------:|----------------------|-------------|---------------|---------|:---------:|
318-
| `signed-payload-path` | `--signed-payload-path` | - | - | Path of the payload to import. | - | - | - | - |
344+
| `signed_payload_path` | `--signed-payload-path` | - | - | Path of the payload to import. | - | - | - | - |
319345

320346
`genesis export` command:
321347

322348
| Parameter | Command Line (long) | Command Line (short) | Environment Variable | Description | Default Value | Example | Mandatory |
323349
|-----------|---------------------|:---------------------:|----------------------|-------------|---------------|---------|:---------:|
324-
| `target-path` | `--target-path` | - | - | Path of the file to export the payload to. | - | - | - | - |
350+
| `target_path` | `--target-path` | - | - | Path of the file to export the payload to. | - | - | - | - |
351+
352+
`era list` command:
353+
354+
| Parameter | Command Line (long) | Command Line (short) | Environment Variable | Description | Default Value | Example | Mandatory |
355+
|-----------|---------------------|:---------------------:|----------------------|-------------|---------------|---------|:---------:|
356+
| `json` | `--json` | - | - | Export the supported era list to JSON format. | - | - | - | - |
357+
358+
`era generate-tx-datum` command:
359+
360+
| Parameter | Command Line (long) | Command Line (short) | Environment Variable | Description | Default Value | Example | Mandatory |
361+
|-----------|---------------------|:---------------------:|----------------------|-------------|---------------|---------|:---------:|
362+
| `current_era_epoch` | `--current-era-epoch` | - | `CURRENT_ERA_EPOCH` | Epoch at which current era starts. | - | - | - | :heavy_check_mark: |
363+
| `next_era_epoch` | `--next-era-epoch` | - | `NEXT_ERA_EPOCH` | Epoch at which the next era starts. If not specified and an upcoming era is available, it will announce the next era. If specified, it must be strictly greater than `current-epoch-era` | - | - | - | - |
364+
| `era_markers_secret_key` | `--era-markers-secret-key` | - | `ERA_MARKERS_SECRET_KEY` | Era Markers Secret Key that is used to verify the authenticity of the era markers on chain. | - | - | - | :heavy_check_mark: |

docs/root/manual/developer-docs/nodes/mithril-signer.md

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -209,3 +209,5 @@ Here is a list of the available parameters:
209209
| `store_retention_limit` | - | - | `STORE_RETENTION_LIMIT` | Maximum number of records in stores. If not set, no limit is set. | - | - | - |
210210
| `kes_secret_key_path` | - | - | `KES_SECRET_KEY_PATH` | Path to the `Cardano KES Secret Key` file. Mandatory in `Pool Id Certification Mode` where the owner is verified (experimental, soon to be stable & preferred mode) | - | - | - |
211211
| `operational_certificate_path` | - | - | `OPERATIONAL_CERTIFICATE_PATH` | Path to the `Cardano Operational Certificate` file. Mandatory in `Pool Id Certification Mode` where the owner is verified (experimental, soon to be stable & preferred mode) | - | - | - |
212+
| `era_reader_adapter_type` | `--era-reader-adapter-type` | - | `ERA_READER_ADAPTER_TYPE` | Era reader adapter type that can be `cardano-chain`, `file` or `bootstrap`. | `bootstrap` | - | - |
213+
| `era_reader_adapter_params` | `--era-reader-adapter-params` | - | `ERA_READER_ADAPTER_PARAMS` | Era reader adapter params that is an optional JSON encoded parameters structure that is expected depending on the `era_reader_adapter_type` parameter | - | - | - |

0 commit comments

Comments
 (0)