Skip to content

Commit 4ddd6e3

Browse files
committed
nodeOci: update the readme w/ snapshot-converter info
1 parent 2bd026b commit 4ddd6e3

File tree

1 file changed

+23
-0
lines changed

1 file changed

+23
-0
lines changed

nix/docker/README.md

Lines changed: 23 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -209,6 +209,29 @@ docker volume inspect opt-cardano
209209
sudo tree /var/lib/docker/volumes/opt-cardano/_data
210210
```
211211

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+
212235

213236
## Legacy Tracing System
214237
Cardano-node now defaults to using the new tracing system. The legacy tracing

0 commit comments

Comments
 (0)