Closed
Description
Why
We want to add the capability of verifying an existing Cardano database folder with a new command in the client CLI.
What
Add a new cardano-db-v2 verify
command to check the authenticity of a local Cardano node database.
How
- Add a new
verify
command in the Cardano DB v2 command - throw a error if
verify
command is used in v1 :
The "verify" subcommand is not available for the v1, use --backend v2 instead
- Verify the existing immutable files (same as in
download
command, onlydownload_and_unpack_cardano_database_snapshot
is skipped)- Download digest for merkle proof in tmp directory (both download and verify command will write in a tmp directory instead of provided database directory)
- Verify presence of immutable folder with at least one file before downloading/processing digest
- Clean existing temporary digest from tmp folder if a previously verify/download command have failed.
- add log message at the end of the verify command :
Cardano database snapshot 'e19159370709ac2da1f2643b0aca5a93a3e8ee3640aeb958b059b27b657da375' archives have been successfully verified. Immutable files have been successfully checked against Mithril multi-signature contained in the certificate.
- json log message :
{"timestamp":"2025-06-12T15:33:16.225279587+00:00","verified_db_directory":"/home/clem/dev/mithril/mithril-client-cli/db"}
- Update documentation
- Add a step in the client tests workflow (to verify a previously restored database)