Skip to content

Commit 76c6930

Browse files
authored
Merge pull request #1013 from input-output-hk/djo/1001/recompute-cert-hash-command
Add `tools recompute-certificates-hash` command to aggregator
2 parents 763c17c + 53ade49 commit 76c6930

File tree

20 files changed

+1766
-535
lines changed

20 files changed

+1766
-535
lines changed

Cargo.lock

Lines changed: 2 additions & 2 deletions
Some generated files are not rendered by default. Learn more about customizing how changed files appear on GitHub.

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

Lines changed: 41 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -126,6 +126,7 @@ Commands:
126126
genesis Genesis tools
127127
era Era tools
128128
serve Server runtime mode
129+
tools List of tools to upkeep the aggregator
129130
help Print this message or the help of the given subcommand(s)
130131

131132
Options:
@@ -323,6 +324,42 @@ You should see something like
323324
./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**
324325
```
325326

327+
## Release build and run binary 'tools' command
328+
329+
Build in release with default configuration
330+
331+
```bash
332+
make build
333+
```
334+
335+
Display the help menu
336+
337+
```bash
338+
./mithril-aggregator tools --help
339+
```
340+
341+
You should see
342+
343+
```bash
344+
List of tools to upkeep the aggregator
345+
346+
Usage: mithril-aggregator tools <COMMAND>
347+
348+
Commands:
349+
recompute-certificates-hash Load all certificates in the database to recompute their hash and update all related entities
350+
help Print this message or the help of the given subcommand(s)
351+
352+
Options:
353+
-h, --help Print help
354+
```
355+
356+
Run 'tools recompute-certificates-hash' command in release with default configuration.
357+
This allows the Mithril Aggregator node to recompute all of its certificates hashes, useful to avoid a chain re-genesis after an update that changes the structure of the certificates.
358+
359+
```bash
360+
./mithril-aggregator tools recompute-certificates-hash
361+
```
362+
326363
:::tip
327364

328365
If you want to dig deeper, you can get access to several level of logs from the Mithril Aggregator:
@@ -364,6 +401,7 @@ Here are the subcommands available:
364401
| **genesis bootstrap** | Bootstrap a genesis certificate (test only usage) |
365402
| **era list** | List the supported eras |
366403
| **era generate-tx-datum** | Generate era markers transaction datum to be stored on chain |
404+
| **tools recompute-certificates-hash** | Load all certificates in the database to recompute their hash and update all related entities |
367405

368406
## Configuration parameters
369407

@@ -436,4 +474,6 @@ General parameters:
436474
|-----------|---------------------|:---------------------:|----------------------|-------------|---------------|---------|:---------:|
437475
| `current_era_epoch` | `--current-era-epoch` | - | `CURRENT_ERA_EPOCH` | Epoch at which current era starts. | - | - | - | :heavy_check_mark: |
438476
| `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` | - | - | - | - |
439-
| `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: |
477+
| `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: |
478+
479+
`tools recompute-certificates-hash` command has no dedicated parameter

mithril-aggregator/Cargo.toml

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,6 @@
11
[package]
22
name = "mithril-aggregator"
3-
version = "0.3.42"
3+
version = "0.3.43"
44
description = "A Mithril Aggregator server"
55
authors = { workspace = true }
66
edition = { workspace = true }

0 commit comments

Comments
 (0)