File tree Expand file tree Collapse file tree 3 files changed +35
-1
lines changed Expand file tree Collapse file tree 3 files changed +35
-1
lines changed Original file line number Diff line number Diff line change 487
487
customConfig . haskellNix
488
488
] ;
489
489
cardanoNodePackages = mkCardanoNodePackages final . cardanoNodeProject ;
490
- inherit ( final . cardanoNodePackages ) cardano-node cardano-cli cardano-submit-api cardano-tracer bech32 locli db-analyser tx-generator ;
490
+ inherit ( final . cardanoNodePackages )
491
+ bech32
492
+ cardano-cli
493
+ cardano-node
494
+ cardano-submit-api
495
+ cardano-tracer
496
+ db-analyser
497
+ locli
498
+ snapshot-converter
499
+ tx-generator ;
491
500
} ;
492
501
nixosModules = {
493
502
cardano-node = {
Original file line number Diff line number Diff line change @@ -209,6 +209,29 @@ docker volume inspect opt-cardano
209
209
sudo tree /var/lib/docker/volumes/opt-cardano/_data
210
210
```
211
211
212
+ ## Cardano Ledger Snapshot Conversion
213
+ The snapshot-converter utility is included in the cardano-node image at path
214
+ ` /usr/local/bin/snapshot-converter ` . It can be used to convert between ledger
215
+ state types as needed, without relying on host level tooling or full
216
+ chain ledger replays.
217
+
218
+ An example follows to convert preprod ledger state in a named docker volume in
219
+ snapshot ` 295420 ` from ` Legacy ` to ` Mem ` when node is not already
220
+ running:
221
+ ```
222
+ docker run -v preprod-data:/data --rm -it --entrypoint=bash ghcr.io/intersectmbo/cardano-node:dev -c '
223
+ mv /data/db/ledger /data/db/ledger-old \
224
+ && mkdir -p /data/db/ledger \
225
+ && snapshot-converter Legacy /data/db/ledger-old/295420 Mem /data/db/ledger/295420 cardano --config /opt/cardano/config/preprod/config.json
226
+ '
227
+ ```
228
+
229
+ Note that once ledger state is converted, the cardano-node container will need
230
+ to be run with a node configuration aligned with the new ledger state type,
231
+ otherwise ledger replay from genesis will re-occur.
232
+
233
+ For more info, see the [ UTxO Migration Guide] ( https://ouroboros-consensus.cardano.intersectmbo.org/docs/for-developers/utxo-hd/migrating/ ) .
234
+
212
235
213
236
## Legacy Tracing System
214
237
Cardano-node now defaults to using the new tracing system. The legacy tracing
Original file line number Diff line number Diff line change 18
18
# The main contents of the image.
19
19
, cardano-cli
20
20
, cardano-node
21
+ , snapshot-converter
21
22
, scripts
22
23
23
24
# Set gitrev to null, to ensure the version below is used
161
162
cp -v ${ context } /bin/* usr/local/bin
162
163
ln -sv ${ cardano-node } /bin/cardano-node usr/local/bin/cardano-node
163
164
ln -sv ${ cardano-cli } /bin/cardano-cli usr/local/bin/cardano-cli
165
+ ln -sv ${ snapshot-converter } /bin/snapshot-converter usr/local/bin/snapshot-converter
164
166
ln -sv ${ jq } /bin/jq usr/local/bin/jq
165
167
166
168
# Create iohk-nix network configs, organized by network directory.
You can’t perform that action at this time.
0 commit comments