Skip to content

Add a Mithril client CLI command for UTxO-HD ledger state snapshot conversion #2492

Open
@jpraynaud

Description

@jpraynaud

Why

We need to provide a convenient way for Mithril client CLI users to convert a restored InMemory UTxO-HD snapshot (with Cardano DB v1 or Cardano DB v2) to another flavor (e.g. Legacy, LMDB). This conversion must be available for Linux, MacOS and Windows. It will leverage the new snapshot-converter CLI tool distributed with the Cardano Node in the GitHub release. Migration guide is available here.

What

Add a conversion command to the client CLI that will do the conversion of the UTxO-HD InMemory snapshot to another flavor.

How

  • Display a guidance message (with the Mithril client CLI command) when restoring a Cardano database snapshot with --include-ancillary option (iif Cardano node version used for snapshotting is 10.4+):
    • Cardano DB v1
    • Cardano DB v2
  • Add a new tooling command that does the conversion tools utxo-hd snapshot-converter:
    • Make the command unstable
    • Parameters: --cardano-node-version, --cardano-network, --utxo-hd-flavor, --db-directory and --commit
    • Download files from the associated Cardano node distribution on GitHub (select the asset for the target platform, download and unpack the converter CLI):
      • snapshot-converter CLI
      • Cardano config file
    • Automatically detect the Cardano network in the protocolMagicId file?
    • Support latest (and pre-release) distribution of the Cardano node
    • Execute converter command:
      • Convert from InMemory flavor
      • On the less recent ledger state snapshot
      • Or support retry if most recent fails?
      • Replace the ledger state when the --commit option is set
      • Otherwise display a message with its location
    • Cleanup converter (and all downloaded files) after command execution
  • Update documentation:
    • Mithril client node
    • Bootstrap Cardano node tutorial
  • Add tests in the Mithril Client multi-platform test workflow in the CI
    • Binaries
    • Docker
  • Add dev blog post

Metadata

Metadata

Assignees

Labels

Type

No type

Projects

No projects

Milestone

No milestone

Relationships

None yet

Development

No branches or pull requests

Issue actions