File tree Expand file tree Collapse file tree 1 file changed +19
-0
lines changed Expand file tree Collapse file tree 1 file changed +19
-0
lines changed Original file line number Diff line number Diff line change @@ -273,6 +273,25 @@ jobs:
273273 shell : bash
274274 run : .github/workflows/scripts/verify-cardano-db-restoration.sh ./bin/cdb-v2-download-output.txt "${{ matrix.extra_args }}"
275275
276+ - name : Cardano Database V2 Snapshot / verify tampered and missing immutables from a specific range
277+ if : steps.aggregator_capability_unix.outputs.cardano_database_v2_enabled == 'true' || steps.aggregator_capability_windows.outputs.cardano_database_v2_enabled == 'true'
278+ shell : bash
279+ working-directory : ./bin
280+ run : |
281+ rm -f v2/db/immutable/00007.chunk
282+ rm -f v2/db/immutable/00007.primary
283+ rm -f v2/db/immutable/00007.secondary
284+ rm -f v2/db/immutable/00011.chunk
285+ echo "tampered chunk 5" > v2/db/immutable/00005.chunk
286+ echo "tampered primary 9" > v2/db/immutable/00009.primary
287+ echo "tampered outside verification range" > v2/db/immutable/00012.chunk
288+ ./mithril-client ${{ steps.prepare.outputs.debug_level }} --origin-tag CI cardano-db verify --end 10 --backend v2 --db-dir v2/db $CARDANO_DATABASE_V2_SNAPSHOT_HASH
289+ # Check missing files in immutables_verification_error-*.json
290+ jq -r '.["missing-files"] | sort | @csv' immutables_verification_error-*.json | grep -qx '"00007.chunk","00007.primary","00007.secondary"'
291+ # Check tampered files in immutables_verification_error-*.json
292+ jq -r '.["tampered-files"] | sort | @csv' immutables_verification_error-*.json | grep -qx '"00005.chunk","00009.primary"'
293+
294+
276295 test-docker :
277296 strategy :
278297 fail-fast : false
You can’t perform that action at this time.
0 commit comments