@@ -99,7 +99,7 @@ To check if the version of the Mithril signer binary is correct, use the followi
99
99
You should see something like:
100
100
101
101
``` bash
102
- mithril-client 0.2.0
102
+ mithril-client 0.7.6
103
103
```
104
104
105
105
: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.
120
120
Usage: mithril-client [OPTIONS] < COMMAND>
121
121
122
122
Commands:
123
- snapshot Snapshot commands
123
+ snapshot Deprecated, use ` cardano-db` instead
124
+ cardano-db Cardano db management (alias: cdb)
124
125
mithril-stake-distribution Mithril Stake Distribution management (alias: msd)
126
+ cardano-transaction [unstable] Cardano transactions management (alias: ctx)
125
127
help Print this message or the help of the given subcommand(s)
126
128
127
129
Options:
@@ -132,21 +134,25 @@ Options:
132
134
--config-directory < CONFIG_DIRECTORY>
133
135
Directory where configuration file is located [default: ./config]
134
136
--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)
136
144
-h, --help
137
145
Print help
138
146
-V, --version
139
147
Print version
140
-
141
-
142
148
```
143
149
144
150
::: tip
145
151
146
152
To display results in JSON format for the ` list ` and ` show ` commands of the Mithril client, you can use the ` --json ` option:
147
153
148
154
``` bash
149
- ./mithril-client snapshot list --json
155
+ ./mithril-client cardano-db snapshot list --json
150
156
```
151
157
152
158
:::
@@ -186,7 +192,7 @@ Then, create a shell function for the Mithril client:
186
192
187
193
``` bash
188
194
mithril_client () {
189
- docker run --rm -e NETWORK= $NETWORK -e GENESIS_VERIFICATION_KEY=$GENESIS_VERIFICATION_KEY -e AGGREGATOR_ENDPOINT=$AGGREGATOR_ENDPOINT --name=' mithril-client' -v $( pwd) :/app/data -u $( id -u) ghcr.io/input-output-hk/mithril-client:$MITHRIL_IMAGE_ID $@
195
+ docker run --rm -e GENESIS_VERIFICATION_KEY=$GENESIS_VERIFICATION_KEY -e AGGREGATOR_ENDPOINT=$AGGREGATOR_ENDPOINT --name=' mithril-client' -v $( pwd) :/app/data -u $( id -u) ghcr.io/input-output-hk/mithril-client:$MITHRIL_IMAGE_ID $@
190
196
}
191
197
```
192
198
@@ -197,7 +203,7 @@ You can now use the `mithril_client` function:
197
203
mithril_client help
198
204
199
205
# 2- List snapshots
200
- mithril_client snapshot list
206
+ mithril_client cardano-db snapshot list
201
207
```
202
208
203
209
::: tip
@@ -206,48 +212,45 @@ In the following part of the document, you will need to replace the `./mithril-c
206
212
207
213
:::
208
214
209
- ## Bootstrap a Cardano node from a testnet Mithril snapshot
215
+ ## Bootstrap a Cardano node from a testnet Mithril Cardano DB snapshot
210
216
211
217
### Step 1: Prepare some useful variables
212
218
213
219
``` bash
214
- # Cardano network
215
- export NETWORK=** YOUR_CARDANO_NETWORK**
216
-
217
220
# Aggregator API endpoint URL
218
221
export AGGREGATOR_ENDPOINT=** YOUR_AGGREGATOR_ENDPOINT**
219
222
220
223
# Genesis verification key
221
224
export GENESIS_VERIFICATION_KEY=$( wget -q -O - ** YOUR_GENESIS_VERIFICATION_KEY** )
222
225
223
- # 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
224
227
# 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
225
228
export SNAPSHOT_DIGEST=latest
226
229
```
227
230
228
- ### Step 2: Select a snapshot
231
+ ### Step 2: Select a Cardano DB snapshot
229
232
230
- 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:
231
234
232
235
``` bash
233
- ./mithril-client snapshot list
236
+ ./mithril-client cardano-db snapshot list
234
237
```
235
238
236
239
You will see a list of snapshots:
237
240
238
241
``` bash
239
- +-------+-----------+------------------------------------------------------------------+------------+-----------+--------------------------------+
240
- | Epoch | Immutable | Digest | Size | Locations | Created |
241
- +-------+-----------+------------------------------------------------------------------+------------+-----------+--------------------------------+
242
- | 72 | 1379 | a305aa11b0e2ccf737d4f5def8b0a9f2245eded2b4ec4be876f7bd64deddcbbf | 1259745182 | 1 | 2023-05-31T14:02:40.150189810Z |
243
- +-------+-----------+------------------------------------------------------------------+------------+-----------+--------------------------------+
244
- | 72 | 1378 | 5c2214b0b3a00cccacc96b65f9741d4e818df0bc092bee30986e4d554396c6fd | 1258142105 | 1 | 2023-05-31T07:48:08.357263836Z |
245
- +-------+-----------+------------------------------------------------------------------+------------+-----------+--------------------------------+
246
- | 72 | 1377 | 7cea14e5742387ca770a74f3e3cfdd93fc38573e2babbf05df292888a528ab15 | 1256695921 | 1 | 2023-05-31T01:56:38.178640636Z |
247
- +-------+-----------+------------------------------------------------------------------+------------+-----------+--------------------------------+
248
- | 72 | 1376 | 4cb153b55f6cadf47bc48cc3112c16a037ee49416820190dc9e121d4aa49369f | 1255258102 | 1 | 2023-05-30T20:11:54.620669432Z |
249
- +-------+-----------+------------------------------------------------------------------+------------+-----------+--------------------------------+
250
- | | | | | | |
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
+ | | | | | | | |
251
254
…
252
255
```
253
256
@@ -257,63 +260,70 @@ If you restore a Cardano node with a version not included in the advertised rang
257
260
258
261
:::
259
262
260
- ### Step 3: Show snapshot details
263
+ ### Step 3: Show Cardano DB snapshot details
261
264
262
265
To get more details from a specific snapshot (optional), run:
263
266
264
267
``` bash
265
- ./mithril-client snapshot show $SNAPSHOT_DIGEST
268
+ ./mithril-client cardano-db snapshot show $SNAPSHOT_DIGEST
266
269
```
267
270
268
271
You will see more information about the snapshot:
269
272
270
273
``` bash
271
- +-----------------------+-------------------------------------------------------------------------------------------------------------------------------+
272
- | Info | Value |
273
- +-----------------------+-------------------------------------------------------------------------------------------------------------------------------+
274
- | Epoch | 72 |
275
- +-----------------------+-------------------------------------------------------------------------------------------------------------------------------+
276
- | Immutable File Number | 1379 |
277
- +-----------------------+-------------------------------------------------------------------------------------------------------------------------------+
278
- | Digest | a305aa11b0e2ccf737d4f5def8b0a9f2245eded2b4ec4be876f7bd64deddcbbf |
279
- +-----------------------+-------------------------------------------------------------------------------------------------------------------------------+
280
- | Size | 1259745182 |
281
- +-----------------------+-------------------------------------------------------------------------------------------------------------------------------+
282
- | Location 1 | https://storage.googleapis.com/mithril-release-preprod-…aa11b0e2ccf737d4f5def8b0a9f2245eded2b4ec4be876f7bd64deddcbbf.tar.gz |
283
- +-----------------------+-------------------------------------------------------------------------------------------------------------------------------+
284
- | Cardano node version | 8.7.3 |
285
- +-----------------------+-------------------------------------------------------------------------------------------------------------------------------+
286
- | Created | 2023-05-31T14:02:40.150189810Z |
287
- +-----------------------+-------------------------------------------------------------------------------------------------------------------------------+
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
+ +-----------------------+--------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+
288
293
```
289
294
290
- ### Step 4: Download the selected snapshot
295
+ ### Step 4: Download the selected Cardano DB snapshot
291
296
292
297
To download the selected snapshot from the remote location to your remote location, run:
293
298
294
299
``` bash
295
- ./mithril-client snapshot download $SNAPSHOT_DIGEST
300
+ ./mithril-client cardano-db download $SNAPSHOT_DIGEST
296
301
```
297
302
298
303
299
304
You will see that the selected snapshot archive has been downloaded locally, unpacked, and that the associated certificate is valid:
300
305
301
306
``` bash
302
- Unpacking snapshot...
303
- Unpack success cd587611b5ff2445c714bef083d9455ed3e42e9304ae0ad38b02432d03f9b068
304
- 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.
305
315
306
- Restore a Cardano node :
316
+ If you are using Cardano Docker image, you can restore a Cardano Node with :
307
317
308
- 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
309
319
```
310
320
311
- ### Step 5: Launch a Cardano node from the restored snapshot
321
+ ### Step 5: Launch a Cardano node from the restored Cardano DB snapshot
312
322
313
323
Launch an empty Cardano node and make it live in minutes!
314
324
315
325
``` bash
316
- docker run -v cardano-node-ipc:/ipc -v cardano-node-data:/data --mount type=bind,source=" $( pwd) /data/testnet/$SNAPSHOT_DIGEST /db" ,target=/data/db/ -e NETWORK=** YOUR_CARDANO_NETWORK ** inputoutput/cardano-node
326
+ docker run -v cardano-node-ipc:/ipc -v cardano-node-data:/data --mount type=bind,source=" $( pwd) /data/testnet/$SNAPSHOT_DIGEST /db" ,target=/data/db/ -e NETWORK=testnet inputoutput/cardano-node
317
327
```
318
328
319
329
You will see the node start by validating the files ingested from the snapshot archive:
0 commit comments