Skip to content

Commit e9e2c6e

Browse files
committed
Rename deprecated snapshot commands to cardano-db snapshot
Update cardano-db 'snapshot show', 'snapshot list' and 'download' command outputs
1 parent 94974ec commit e9e2c6e

File tree

2 files changed

+114
-104
lines changed

2 files changed

+114
-104
lines changed

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

Lines changed: 64 additions & 51 deletions
Original file line numberDiff line numberDiff line change
@@ -99,7 +99,7 @@ To check if the version of the Mithril signer binary is correct, use the followi
9999
You should see something like:
100100

101101
```bash
102-
mithril-client 0.2.0
102+
mithril-client 0.7.6
103103
```
104104

105105
:warning: Verify that the version displayed corresponds to the version specified in the content of the Release/Pre-release notes (refer to the **Build from** column in the 'Mithril networks' table above).
@@ -120,8 +120,10 @@ This program shows, downloads and verifies certified blockchain artifacts.
120120
Usage: mithril-client [OPTIONS] <COMMAND>
121121

122122
Commands:
123-
snapshot Snapshot commands
123+
snapshot Deprecated, use `cardano-db` instead
124+
cardano-db Cardano db management (alias: cdb)
124125
mithril-stake-distribution Mithril Stake Distribution management (alias: msd)
126+
cardano-transaction [unstable] Cardano transactions management (alias: ctx)
125127
help Print this message or the help of the given subcommand(s)
126128

127129
Options:
@@ -132,21 +134,25 @@ Options:
132134
--config-directory <CONFIG_DIRECTORY>
133135
Directory where configuration file is located [default: ./config]
134136
--aggregator-endpoint <AGGREGATOR_ENDPOINT>
135-
Override configuration aggregator endpoint URL
137+
Override configuration Aggregator endpoint URL [env: AGGREGATOR_ENDPOINT=]
138+
--log-format-json
139+
Enable JSON output for logs displayed according to verbosity level
140+
--log-output <LOG_OUTPUT>
141+
Redirect the logs to a file
142+
--unstable
143+
Enable unstable commands (such as Cardano Transactions)
136144
-h, --help
137145
Print help
138146
-V, --version
139147
Print version
140-
141-
142148
```
143149

144150
:::tip
145151

146152
To display results in JSON format for the `list` and `show` commands of the Mithril client, you can use the `--json` option:
147153

148154
```bash
149-
./mithril-client snapshot list --json
155+
./mithril-client cardano-db snapshot list --json
150156
```
151157

152158
:::
@@ -197,7 +203,7 @@ You can now use the `mithril_client` function:
197203
mithril_client help
198204

199205
# 2- List snapshots
200-
mithril_client snapshot list
206+
mithril_client cardano-db snapshot list
201207
```
202208

203209
:::tip
@@ -206,7 +212,7 @@ In the following part of the document, you will need to replace the `./mithril-c
206212

207213
:::
208214

209-
## Bootstrap a Cardano node from a testnet Mithril snapshot
215+
## Bootstrap a Cardano node from a testnet Mithril Cardano DB snapshot
210216

211217
### Step 1: Prepare some useful variables
212218

@@ -217,34 +223,34 @@ export AGGREGATOR_ENDPOINT=**YOUR_AGGREGATOR_ENDPOINT**
217223
# Genesis verification key
218224
export GENESIS_VERIFICATION_KEY=$(wget -q -O - **YOUR_GENESIS_VERIFICATION_KEY**)
219225

220-
# Digest of the latest produced snapshot for convenience of the demo
226+
# Digest of the latest produced cardano db snapshot for convenience of the demo
221227
# 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
222228
export SNAPSHOT_DIGEST=latest
223229
```
224230

225-
### Step 2: Select a snapshot
231+
### Step 2: Select a Cardano DB snapshot
226232

227-
List the available snapshots with which you can bootstrap a Cardano node:
233+
List the available cardano db snapshots with which you can bootstrap a Cardano node:
228234

229235
```bash
230-
./mithril-client snapshot list
236+
./mithril-client cardano-db snapshot list
231237
```
232238

233239
You will see a list of snapshots:
234240

235241
```bash
236-
+-------+-----------+------------------------------------------------------------------+------------+-----------+--------------------------------+
237-
| Epoch | Immutable | Digest | Size | Locations | Created |
238-
+-------+-----------+------------------------------------------------------------------+------------+-----------+--------------------------------+
239-
| 72 | 1379 | a305aa11b0e2ccf737d4f5def8b0a9f2245eded2b4ec4be876f7bd64deddcbbf | 1259745182 | 1 | 2023-05-31T14:02:40.150189810Z |
240-
+-------+-----------+------------------------------------------------------------------+------------+-----------+--------------------------------+
241-
| 72 | 1378 | 5c2214b0b3a00cccacc96b65f9741d4e818df0bc092bee30986e4d554396c6fd | 1258142105 | 1 | 2023-05-31T07:48:08.357263836Z |
242-
+-------+-----------+------------------------------------------------------------------+------------+-----------+--------------------------------+
243-
| 72 | 1377 | 7cea14e5742387ca770a74f3e3cfdd93fc38573e2babbf05df292888a528ab15 | 1256695921 | 1 | 2023-05-31T01:56:38.178640636Z |
244-
+-------+-----------+------------------------------------------------------------------+------------+-----------+--------------------------------+
245-
| 72 | 1376 | 4cb153b55f6cadf47bc48cc3112c16a037ee49416820190dc9e121d4aa49369f | 1255258102 | 1 | 2023-05-30T20:11:54.620669432Z |
246-
+-------+-----------+------------------------------------------------------------------+------------+-----------+--------------------------------+
247-
| | | | | | |
242+
+-------+-----------+---------+------------------------------------------------------------------+------------+-----------+-----------------------------------+
243+
| Epoch | Immutable | Network | Digest | Size | Locations | Created |
244+
+-------+-----------+---------+------------------------------------------------------------------+------------+-----------+-----------------------------------+
245+
| 539 | 10787 | preview | db5f50a060d4b813125c4263b700ecc96e5d8c8710f0430e5c80d2f0fa79b667 | 2323485648 | 1 | 2024-04-16 12:56:22.170174972 UTC |
246+
+-------+-----------+---------+------------------------------------------------------------------+------------+-----------+-----------------------------------+
247+
| 539 | 10786 | preview | 6af5dac31e7697c4481426712742f4d6391aea0a5b1df145e08e9eaa105af4a5 | 2323875790 | 1 | 2024-04-16 11:44:25.583804349 UTC |
248+
+-------+-----------+---------+------------------------------------------------------------------+------------+-----------+-----------------------------------+
249+
| 539 | 10785 | preview | 39770647f027a214ac955668dffe4d6d51b9cf67798041de1b003b21ef2208da | 2323295044 | 1 | 2024-04-16 10:31:26.056746652 UTC |
250+
+-------+-----------+---------+------------------------------------------------------------------+------------+-----------+-----------------------------------+
251+
| 539 | 10784 | preview | 9ce64187cb6af25266563e039e8d15962d281482979df94e3ac5c5ca6a914eea | 2323079205 | 1 | 2024-04-16 09:08:14.605224999 UTC |
252+
+-------+-----------+---------+------------------------------------------------------------------+------------+-----------+-----------------------------------+
253+
| | | | | | | |
248254
249255
```
250256

@@ -254,58 +260,65 @@ If you restore a Cardano node with a version not included in the advertised rang
254260

255261
:::
256262

257-
### Step 3: Show snapshot details
263+
### Step 3: Show Cardano DB snapshot details
258264

259265
To get more details from a specific snapshot (optional), run:
260266

261267
```bash
262-
./mithril-client snapshot show $SNAPSHOT_DIGEST
268+
./mithril-client cardano-db snapshot show $SNAPSHOT_DIGEST
263269
```
264270

265271
You will see more information about the snapshot:
266272

267273
```bash
268-
+-----------------------+-------------------------------------------------------------------------------------------------------------------------------+
269-
| Info | Value |
270-
+-----------------------+-------------------------------------------------------------------------------------------------------------------------------+
271-
| Epoch | 72 |
272-
+-----------------------+-------------------------------------------------------------------------------------------------------------------------------+
273-
| Immutable File Number | 1379 |
274-
+-----------------------+-------------------------------------------------------------------------------------------------------------------------------+
275-
| Digest | a305aa11b0e2ccf737d4f5def8b0a9f2245eded2b4ec4be876f7bd64deddcbbf |
276-
+-----------------------+-------------------------------------------------------------------------------------------------------------------------------+
277-
| Size | 1259745182 |
278-
+-----------------------+-------------------------------------------------------------------------------------------------------------------------------+
279-
| Location 1 | https://storage.googleapis.com/mithril-release-preprod-…aa11b0e2ccf737d4f5def8b0a9f2245eded2b4ec4be876f7bd64deddcbbf.tar.gz |
280-
+-----------------------+-------------------------------------------------------------------------------------------------------------------------------+
281-
| Cardano node version | 8.7.3 |
282-
+-----------------------+-------------------------------------------------------------------------------------------------------------------------------+
283-
| Created | 2023-05-31T14:02:40.150189810Z |
284-
+-----------------------+-------------------------------------------------------------------------------------------------------------------------------+
274+
+-----------------------+--------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+
275+
| Epoch | 539 |
276+
+-----------------------+--------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+
277+
| Immutable File Number | 10787 |
278+
+-----------------------+--------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+
279+
| Network | preview |
280+
+-----------------------+--------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+
281+
| Digest | db5f50a060d4b813125c4263b700ecc96e5d8c8710f0430e5c80d2f0fa79b667 |
282+
+-----------------------+--------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+
283+
| Size | 2323485648 |
284+
+-----------------------+--------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+
285+
| Cardano node version | 8.9.0 |
286+
+-----------------------+--------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+
287+
| Location | https://storage.googleapis.com/cdn.aggregator.testing-preview.api.mithril.network/preview-e539-i10787.db5f50a060d4b813125c4263b700ecc96e5d8c8710f0430e5c80d2f0fa79b667.tar.zst |
288+
+-----------------------+--------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+
289+
| Created | 2024-04-16 12:56:22.170174972 UTC |
290+
+-----------------------+--------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+
291+
| Compression Algorithm | Zstandard |
292+
+-----------------------+--------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+
285293
```
286294

287-
### Step 4: Download the selected snapshot
295+
### Step 4: Download the selected Cardano DB snapshot
288296

289297
To download the selected snapshot from the remote location to your remote location, run:
290298

291299
```bash
292-
./mithril-client snapshot download $SNAPSHOT_DIGEST
300+
./mithril-client cardano-db download $SNAPSHOT_DIGEST
293301
```
294302

295303

296304
You will see that the selected snapshot archive has been downloaded locally, unpacked, and that the associated certificate is valid:
297305

298306
```bash
299-
Unpacking snapshot...
300-
Unpack success cd587611b5ff2445c714bef083d9455ed3e42e9304ae0ad38b02432d03f9b068
301-
to /home/mithril/data/testnet/cd587611b5ff2445c714bef083d9455ed3e42e9304ae0ad38b02432d03f9b068/db
307+
1/5 - Checking local disk info…
308+
2/5 - Fetching the certificate and verifying the certificate chain…
309+
3/5 - Downloading and unpacking the cardano db
310+
4/5 - Computing the cardano db message
311+
5/5 - Verifying the cardano db signature…
312+
Cardano db 'db5f50a060d4b813125c4263b700ecc96e5d8c8710f0430e5c80d2f0fa79b667' has been unpacked and successfully checked against Mithril multi-signature contained in the certificate.
313+
314+
Files in the directory '/home/mithril/data/testnet/db5f50a060d4b813125c4263b700ecc96e5d8c8710f0430e5c80d2f0fa79b667/db' can be used to run a Cardano node with version >= 8.9.0.
302315

303-
Restore a Cardano node:
316+
If you are using Cardano Docker image, you can restore a Cardano Node with:
304317

305-
docker run -v cardano-node-ipc:/ipc -v cardano-node-data:/data --mount type=bind,source="/home/mithril/data/testnet/cd587611b5ff2445c714bef083d9455ed3e42e9304ae0ad38b02432d03f9b068/db",target=/data/db/ -e NETWORK=testnet inputoutput/cardano-node
318+
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:8.9.0
306319
```
307320

308-
### Step 5: Launch a Cardano node from the restored snapshot
321+
### Step 5: Launch a Cardano node from the restored Cardano DB snapshot
309322

310323
Launch an empty Cardano node and make it live in minutes!
311324

0 commit comments

Comments
 (0)