Skip to content

Adapt ledger state snapshot artifact creation in Cardano database certification #2497

Closed
@jpraynaud

Description

@jpraynaud

Why

With the release of UTxO-HD, the memory ledger state snapshot is modified (from a single file to a directory with multiple files). We need to adapt the ancillary files artifact production done withe the Cardano databse certification to support this modification (while being backward compatible).

What

Extend the LedgerFile structure to support multiple files in a ledger state snapshot in the aggregator

How

  • Rename the LedgerFile structure to LegderStateSnapshot
  • Make the LegderStateSnapshot an enum with the variants:
    • Legacy: one file for the snapshot with a name composed of digits only
    • InMemory: one directory with a name composed of digits only (and files meta, state and tables/tvar in it)
  • Add a get_files_relative_path(&self) -> Vec<PathBuf> function to the LegderStateSnapshot which lists the string lossy path of the files (string lossy conversion done in the from_path(path: &Path) -> Option<LedgerSnapshot> function)
  • In the CompressedArchiveSnapshotter, adapt the get_files_and_directories_for_ancillary_snapshot function to list all the filenames of all the ledger state snapshots used

Metadata

Metadata

Assignees

Labels

Type

No type

Projects

No projects

Milestone

No milestone

Relationships

None yet

Development

No branches or pull requests

Issue actions