Skip to content

Commit 2c97920

Browse files
authored
Merge pull request #2441 from input-output-hk/djo/2362/update-doc
doc(website): update cardano node boostrap page with ancillary verification
2 parents 85f3bc7 + 8d1596c commit 2c97920

File tree

2 files changed

+62
-38
lines changed

2 files changed

+62
-38
lines changed

docs/website/root/manual/develop/nodes/mithril-client-library.md

Lines changed: 5 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -208,7 +208,9 @@ async fn main() -> mithril_client::MithrilResult<()> {
208208
const AGGREGATOR_ENDPOINT: &str =
209209
"https://aggregator.release-preprod.api.mithril.network/aggregator";
210210
const GENESIS_VERIFICATION_KEY: &str = "5b3132372c37332c3132342c3136312c362c3133372c3133312c3231332c3230372c3131372c3139382c38352c3137362c3139392c3136322c3234312c36382c3132332c3131392c3134352c31332c3233322c3234332c34392c3232392c322c3234392c3230352c3230352c33392c3233352c34345d";
211+
const ANCILLARY_VERIFICATION_KEY: &str = "5b3138392c3139322c3231362c3135302c3131342c3231362c3233372c3231302c34352c31382c32312c3139362c3230382c3234362c3134362c322c3235322c3234332c3235312c3139372c32382c3135372c3230342c3134352c33302c31342c3232382c3136382c3132392c38332c3133362c33365d";
211212
let client = ClientBuilder::aggregator(AGGREGATOR_ENDPOINT, GENESIS_VERIFICATION_KEY)
213+
.set_ancillary_verification_key(ANCILLARY_VERIFICATION_KEY.to_string())
212214
.with_origin_tag(Some("EXAMPLE".to_string()))
213215
.build()?;
214216
let snapshots = client.cardano_database().list().await?;
@@ -225,7 +227,7 @@ async fn main() -> mithril_client::MithrilResult<()> {
225227
let target_directory = Path::new(".");
226228
client
227229
.cardano_database()
228-
.download_unpack(&snapshot, target_directory)
230+
.download_unpack_full(&snapshot, target_directory)
229231
.await?;
230232

231233
if let Err(e) = client.cardano_database().add_statistics(&snapshot).await {
@@ -303,7 +305,9 @@ async fn main() -> mithril_client::MithrilResult<()> {
303305
const AGGREGATOR_ENDPOINT: &str =
304306
"https://aggregator.testing-preview.api.mithril.network/aggregator";
305307
const GENESIS_VERIFICATION_KEY: &str = "5b3132372c37332c3132342c3136312c362c3133372c3133312c3231332c3230372c3131372c3139382c38352c3137362c3139392c3136322c3234312c36382c3132332c3131392c3134352c31332c3233322c3234332c34392c3232392c322c3234392c3230352c3230352c33392c3233352c34345d";
308+
const ANCILLARY_VERIFICATION_KEY: &str = "5b3138392c3139322c3231362c3135302c3131342c3231362c3233372c3231302c34352c31382c32312c3139362c3230382c3234362c3134362c322c3235322c3234332c3235312c3139372c32382c3135372c3230342c3134352c33302c31342c3232382c3136382c3132392c38332c3133362c33365d";
306309
let client = ClientBuilder::aggregator(AGGREGATOR_ENDPOINT, GENESIS_VERIFICATION_KEY)
310+
.set_ancillary_verification_key(ANCILLARY_VERIFICATION_KEY.to_string())
307311
.with_origin_tag(Some("EXAMPLE".to_string()))
308312
.build()?;
309313

docs/website/root/manual/getting-started/bootstrap-cardano-node.md

Lines changed: 57 additions & 37 deletions
Original file line numberDiff line numberDiff line change
@@ -350,6 +350,9 @@ export AGGREGATOR_ENDPOINT=**YOUR_AGGREGATOR_ENDPOINT**
350350
# Genesis verification key
351351
export GENESIS_VERIFICATION_KEY=$(wget -q -O - **YOUR_GENESIS_VERIFICATION_KEY**)
352352
353+
# Ancillary verification key
354+
export ANCILLARY_VERIFICATION_KEY=$(wget -q -O - **YOUR_ANCILLARY_VERIFICATION_KEY**)
355+
353356
# Digest of the latest produced cardano db snapshot for convenience of the demo
354357
# You can also modify this variable and set it to the value of the digest of a snapshot that you can retrieve at step 2
355358
export SNAPSHOT_DIGEST=latest
@@ -369,6 +372,9 @@ export AGGREGATOR_ENDPOINT=https://aggregator.pre-release-preview.api.mithril.ne
369372
# Genesis verification key
370373
export GENESIS_VERIFICATION_KEY=$(wget -q -O - https://raw.githubusercontent.com/input-output-hk/mithril/main/mithril-infra/configuration/pre-release-preview/genesis.vkey)
371374
375+
# Ancillary verification key
376+
export ANCILLARY_VERIFICATION_KEY=$(wget -q -O - https://raw.githubusercontent.com/input-output-hk/mithril/main/mithril-infra/configuration/pre-release-preview/ancillary.vkey)
377+
372378
# Digest of the latest produced cardano db snapshot for convenience of the demo
373379
export SNAPSHOT_DIGEST=latest
374380
```
@@ -386,18 +392,17 @@ List the available Cardano db snapshots with which you can bootstrap a Cardano n
386392
You will see a list of snapshots:
387393
388394
```bash
389-
+-------+-----------+---------+------------------------------------------------------------------+------------+-----------+-----------------------------------+
390-
| Epoch | Immutable | Network | Digest | Size | Locations | Created |
391-
+-------+-----------+---------+------------------------------------------------------------------+------------+-----------+-----------------------------------+
392-
| 539 | 10787 | preview | db5f50a060d4b813125c4263b700ecc96e5d8c8710f0430e5c80d2f0fa79b667 | 2323485648 | 1 | 2024-04-16 12:56:22.170174972 UTC |
393-
+-------+-----------+---------+------------------------------------------------------------------+------------+-----------+-----------------------------------+
394-
| 539 | 10786 | preview | 6af5dac31e7697c4481426712742f4d6391aea0a5b1df145e08e9eaa105af4a5 | 2323875790 | 1 | 2024-04-16 11:44:25.583804349 UTC |
395-
+-------+-----------+---------+------------------------------------------------------------------+------------+-----------+-----------------------------------+
396-
| 539 | 10785 | preview | 39770647f027a214ac955668dffe4d6d51b9cf67798041de1b003b21ef2208da | 2323295044 | 1 | 2024-04-16 10:31:26.056746652 UTC |
397-
+-------+-----------+---------+------------------------------------------------------------------+------------+-----------+-----------------------------------+
398-
| 539 | 10784 | preview | 9ce64187cb6af25266563e039e8d15962d281482979df94e3ac5c5ca6a914eea | 2323079205 | 1 | 2024-04-16 09:08:14.605224999 UTC |
399-
+-------+-----------+---------+------------------------------------------------------------------+------------+-----------+-----------------------------------+
400-
| | | | | | | |
395+
+-------+-----------+---------+------------------------------------------------------------------+----------+-----------+-----------------------------------+
396+
| Epoch | Immutable | Network | Digest | Size | Locations | Created |
397+
+-------+-----------+---------+------------------------------------------------------------------+----------+-----------+-----------------------------------+
398+
| 916 | 18323 | preview | a1b5e6f43521fd9c5f55e3d6bf27dc4a62f43980681cb67e28cc40582a0d1974 | 3.14 GiB | 1 | 2025-04-28 08:40:34.353548187 UTC |
399+
+-------+-----------+---------+------------------------------------------------------------------+----------+-----------+-----------------------------------+
400+
| 916 | 18322 | preview | 1d5172a41f400a61cb7504a6f83f5c40b0f24908aa116bfe150652ccf17ae21d | 3.13 GiB | 1 | 2025-04-28 07:22:51.737425114 UTC |
401+
+-------+-----------+---------+------------------------------------------------------------------+----------+-----------+-----------------------------------+
402+
| 916 | 18321 | preview | 9cd5131547a7ee1e70bbeb2bb3172392aa4f92748664294619f9a65c41fcb6d1 | 3.13 GiB | 1 | 2025-04-28 06:26:46.276160645 UTC |
403+
+-------+-----------+---------+------------------------------------------------------------------+----------+-----------+-----------------------------------+
404+
| 916 | 18320 | preview | 550bc24850f69117e2adb6974d910bf9ec97c6ac322e6eac5d5012502e8eb05f | 3.13 GiB | 1 | 2025-04-28 05:18:16.835951479 UTC |
405+
+-------+-----------+---------+------------------------------------------------------------------+----------+-----------+-----------------------------------+
401406
402407
```
403408
@@ -418,50 +423,65 @@ To get more details from a specific snapshot (optional), run:
418423
You will see more information about the snapshot:
419424
420425
```bash
421-
+-----------------------+--------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+
422-
| Epoch | 539 |
423-
+-----------------------+--------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+
424-
| Immutable File Number | 10787 |
425-
+-----------------------+--------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+
426-
| Network | preview |
427-
+-----------------------+--------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+
428-
| Digest | db5f50a060d4b813125c4263b700ecc96e5d8c8710f0430e5c80d2f0fa79b667 |
429-
+-----------------------+--------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+
430-
| Size | 2323485648 |
431-
+-----------------------+--------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+
432-
| Cardano node version | 10.2.1 |
433-
+-----------------------+--------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+
434-
| Location | https://storage.googleapis.com/cdn.aggregator.testing-preview.api.mithril.network/preview-e539-i10787.db5f50a060d4b813125c4263b700ecc96e5d8c8710f0430e5c80d2f0fa79b667.tar.zst |
435-
+-----------------------+--------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+
436-
| Created | 2024-04-16 12:56:22.170174972 UTC |
437-
+-----------------------+--------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+
438-
| Compression Algorithm | Zstandard |
439-
+-----------------------+--------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+
426+
+-----------------------+-----------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+
427+
| Epoch | 916 |
428+
+-----------------------+-----------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+
429+
| Immutable File Number | 18323 |
430+
+-----------------------+-----------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+
431+
| Network | preview |
432+
+-----------------------+-----------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+
433+
| Digest | a1b5e6f43521fd9c5f55e3d6bf27dc4a62f43980681cb67e28cc40582a0d1974 |
434+
+-----------------------+-----------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+
435+
| Size | 3.14 GiB |
436+
+-----------------------+-----------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+
437+
| Cardano node version | 10.2.1 |
438+
+-----------------------+-----------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+
439+
| Location | https://storage.googleapis.com/cdn.aggregator.pre-release-preview.api.mithril.network/cardano-immutable-files-full/preview-e916-i18323.a1b5e6f43521fd9c5f55e3d6bf27dc4a62f43980681cb67e28cc40582a0d1974.tar.zst |
440+
+-----------------------+-----------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+
441+
| Created | 2025-04-28 08:40:34.353548187 UTC |
442+
+-----------------------+-----------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+
443+
| Compression Algorithm | Zstandard |
444+
+-----------------------+-----------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+
440445
```
441446
442447
### Step 4: Download the selected Cardano DB snapshot
443448
444449
To download the selected snapshot from the remote location to your remote location, run:
445450
446451
```bash
447-
./mithril-client cardano-db download $SNAPSHOT_DIGEST
452+
./mithril-client cardano-db download --include-ancillary $SNAPSHOT_DIGEST
448453
```
449454
455+
:::warning
456+
457+
To enable fast boostrap, ancillary files must be downloaded by using the `--include-ancillary` option.
458+
459+
Ancillary files contain files that can't be currently signed by the Mithril protocol: the last ledger state snapshot
460+
and the last immutable file.
461+
462+
For additional security, ancillary files are signed using `Ed25519` and the signature is checked against the provided
463+
`ANCILLARY_VERIFICATION_KEY`.
464+
465+
:::
466+
450467
You will see that the selected snapshot archive has been downloaded locally unpacked and that the associated certificate is valid:
451468

452469
```bash
453470
1/5 - Checking local disk info…
454471
2/5 - Fetching the certificate and verifying the certificate chain…
455-
3/5 - Downloading and unpacking the cardano db
472+
Certificate chain validated
473+
4/5 - Downloading and unpacking the cardano db
474+
[00:00:22] [###############################################################################################] 3.14 GiB/3.14 GiB (0.0s)
475+
[00:00:01] [###########################################################################################] 165.88 MiB/165.88 MiB (0.0s)
456476
4/5 - Computing the cardano db message
457477
5/5 - Verifying the cardano db signature…
458-
Cardano db 'db5f50a060d4b813125c4263b700ecc96e5d8c8710f0430e5c80d2f0fa79b667' has been unpacked and successfully checked against Mithril multi-signature contained in the certificate.
478+
Cardano db 'a1b5e6f43521fd9c5f55e3d6bf27dc4a62f43980681cb67e28cc40582a0d1974' has been unpacked and successfully checked against Mithril multi-signature contained in the certificate.
459479
460-
Files in the directory '/home/mithril/data/testnet/db5f50a060d4b813125c4263b700ecc96e5d8c8710f0430e5c80d2f0fa79b667/db' can be used to run a Cardano node with version >= 10.2.1.
480+
Files in the directory 'db' can be used to run a Cardano node with version >= 10.2.1.
461481
462-
If you are using a Cardano Docker image, you can restore a Cardano node with:
482+
If you are using Cardano Docker image, you can restore a Cardano Node with:
463483
464-
docker run -v cardano-node-ipc:/ipc -v cardano-node-data:/data --mount type=bind,source="/home/mithril/data/testnet/db5f50a060d4b813125c4263b700ecc96e5d8c8710f0430e5c80d2f0fa79b667/db",target=/data/db/ -e NETWORK=preview ghcr.io/intersectmbo/cardano-node:10.2.1
484+
docker run -v cardano-node-ipc:/ipc -v cardano-node-data:/data --mount type=bind,source="/home/mithril/data/testnet/a1b5e6f43521fd9c5f55e3d6bf27dc4a62f43980681cb67e28cc40582a0d1974/db",target=/data/db/ -e NETWORK=preview ghcr.io/intersectmbo/cardano-node:10.2.1
465485
```
466486
467487
### Step 5: Launch a Cardano node from the restored Cardano DB snapshot

0 commit comments

Comments
 (0)