Skip to content

Commit 9863d79

Browse files
committed
test: add ledger state snapshot conversion command in Mithril Client multi-platform test workflow
1 parent c8f7d3a commit 9863d79

File tree

1 file changed

+29
-0
lines changed

1 file changed

+29
-0
lines changed

.github/workflows/test-client.yml

Lines changed: 29 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -167,6 +167,14 @@ jobs:
167167
shell: bash
168168
run: .github/workflows/scripts/verify-cardano-db-restoration.sh ./bin/cdb-download-output.txt "${{ matrix.extra_args }}"
169169

170+
- name: Ledger state snapshot conversion from InMemory to LMDB
171+
if: matrix.extra_args == '--include-ancillary'
172+
env:
173+
GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }}
174+
shell: bash
175+
working-directory: ./bin
176+
run: ./mithril-client ${{ steps.prepare.outputs.debug_level }} --unstable tools utxo-hd snapshot-converter --db-directory db --cardano-node-version latest --utxo-hd-flavor LMDB --cardano-network $NETWORK --commit
177+
170178
- name: Remove downloaded artifacts to free up disk space (Linux, Windows)
171179
if: runner.os != 'macOS'
172180
shell: bash
@@ -310,9 +318,30 @@ jobs:
310318
echo "CDB_SNAPSHOT_DIGEST=$(${{ steps.command.outputs.mithril_client }} --origin-tag CI cardano-db snapshot list --json | jq -r '.[0].digest')" >> $GITHUB_ENV
311319
312320
- name: Cardano Database Snapshot / download & restore latest
321+
if: matrix.extra_args != '--include-ancillary'
313322
shell: bash
314323
run: ${{ steps.command.outputs.mithril_client }} ${{ steps.prepare.outputs.debug_level }} --origin-tag CI cardano-db download $CDB_SNAPSHOT_DIGEST --download-dir /app ${{ matrix.extra_args }}
315324

325+
- name: Cardano Database Snapshot / download & restore latest and run conversion from InMemory to LMDB
326+
if: matrix.extra_args == '--include-ancillary'
327+
env:
328+
GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }}
329+
shell: bash
330+
run: |
331+
docker run --rm \
332+
--entrypoint bash \
333+
-e NETWORK=$NETWORK \
334+
-e GENESIS_VERIFICATION_KEY=$GENESIS_VERIFICATION_KEY \
335+
-e ANCILLARY_VERIFICATION_KEY=$ANCILLARY_VERIFICATION_KEY \
336+
-e AGGREGATOR_ENDPOINT=$AGGREGATOR_ENDPOINT \
337+
-e GITHUB_TOKEN=$GITHUB_TOKEN \
338+
--name='mithril-client' \
339+
ghcr.io/input-output-hk/mithril-client:$MITHRIL_IMAGE_ID \
340+
-c "
341+
/app/bin/mithril-client --origin-tag CI cardano-db download $CDB_SNAPSHOT_DIGEST --download-dir /app --include-ancillary &&
342+
/app/bin/mithril-client --unstable tools utxo-hd snapshot-converter --db-directory /app/db --cardano-node-version latest --utxo-hd-flavor LMDB --cardano-network \$NETWORK --commit
343+
"
344+
316345
- name: Remove downloaded artifacts to free up disk space
317346
shell: bash
318347
run: rm --force /app/db/immutable/*.{chunk,primary,secondary}

0 commit comments

Comments
 (0)