Skip to content

feat: support in memory UTxO-HD ledger state snapshots #2521

New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Merged
merged 6 commits into from
May 27, 2025

Conversation

Alenar
Copy link
Collaborator

@Alenar Alenar commented May 26, 2025

Content

This PR adapt our snapshotting mechanism to support in-memory UTXO-HD ledger state snapshots.

Changes

  • mithril-common:
    • Refactor LedgerFile struct into a LedgerStateSnapshot enum with two variants: Legacy and InMemory
    • Make DummyCardanoDbBuilder able to produce the two kind of supported ledger state snapshots
  • mithril-aggregator: Adapt CompressedArchiveSnapshotter to the refactored LedgerStateSnapshot enum

Pre-submit checklist

  • Branch
    • Tests are provided (if possible)
    • Crates versions are updated (if relevant)
    • Commit sequence broadly makes sense
    • Key commits have useful messages
  • PR
    • All check jobs of the CI have succeeded
    • Self-reviewed the diff
    • Useful pull request description
    • Reviewer requested
  • Documentation
    • No new TODOs introduced

Issue(s)

Closes #2497

@Alenar Alenar self-assigned this May 26, 2025
Copy link

github-actions bot commented May 26, 2025

Test Results

    3 files  ± 0     77 suites  ±0   14m 38s ⏱️ +2s
1 940 tests +11  1 940 ✅ +11  0 💤 ±0  0 ❌ ±0 
3 292 runs  +20  3 292 ✅ +20  0 💤 ±0  0 ❌ ±0 

Results for commit 5c0619a. ± Comparison against base commit 0e2ee54.

This pull request removes 6 and adds 17 tests. Note that renamed tests count towards both.
mithril-aggregator ‑ services::snapshotter::compressed_archive_snapshotter::tests::snapshot_ancillary::create_archive_generate_sign_and_include_manifest_file
mithril-aggregator ‑ services::snapshotter::compressed_archive_snapshotter::tests::snapshot_ancillary::getting_files_to_include_copy_them_to_a_target_directory_while_keeping_source_dir_structure
mithril-common ‑ digesters::ledger_file::tests::list_all_ledger_file_fail_if_not_in_ledger_dir
mithril-common ‑ digesters::ledger_file::tests::list_all_ledger_file_order_should_be_deterministic
mithril-common ‑ digesters::ledger_file::tests::list_all_ledger_file_should_work_with_non_ledger_files
mithril-common ‑ digesters::ledger_file::tests::list_all_ledger_file_should_works_in_a_empty_folder
mithril-aggregator ‑ services::snapshotter::compressed_archive_snapshotter::tests::snapshot_ancillary::create_archive_of_in_memory_ledger_snapshot_generate_sign_and_include_manifest_file
mithril-aggregator ‑ services::snapshotter::compressed_archive_snapshotter::tests::snapshot_ancillary::create_archive_of_legacy_ledger_snapshot_generate_sign_and_include_manifest_file
mithril-aggregator ‑ services::snapshotter::compressed_archive_snapshotter::tests::snapshot_ancillary::getting_files_to_include_for_in_memory_ledger_snapshot_copy_them_to_a_target_directory_while_keeping_source_dir_structure
mithril-aggregator ‑ services::snapshotter::compressed_archive_snapshotter::tests::snapshot_ancillary::getting_files_to_include_for_legacy_ledger_snapshot_copy_them_to_a_target_directory_while_keeping_source_dir_structure
mithril-common ‑ digesters::dummy_cardano_db::tests::adding_non_completed_immutable_files_trio_is_not_take_in_account_in_resulting_db_metadata
mithril-common ‑ digesters::dummy_cardano_db::tests::setting_file_sizes
mithril-common ‑ digesters::dummy_cardano_db::tests::writing_empty_dummy_cardano_db_structure
mithril-common ‑ digesters::dummy_cardano_db::tests::writing_immutable_files
mithril-common ‑ digesters::dummy_cardano_db::tests::writing_ledger_snapshots
mithril-common ‑ digesters::dummy_cardano_db::tests::writing_non_immutable_files
…

♻️ This comment has been updated with latest results.

@Alenar Alenar temporarily deployed to testing-preview May 26, 2025 14:36 — with GitHub Actions Inactive
@Alenar Alenar force-pushed the djo/2497/adapt_ledger_snapshot_to_utxo-hd branch from b5add36 to e183225 Compare May 26, 2025 14:37
@Alenar Alenar changed the title feat: support in memory UTXO-HD hd ledger state snapshots feat: support in memory UTXo-HD hd ledger state snapshots May 26, 2025
@Alenar Alenar changed the title feat: support in memory UTXo-HD hd ledger state snapshots feat: support in memory UTxO-HD hd ledger state snapshots May 26, 2025
@Alenar Alenar changed the title feat: support in memory UTxO-HD hd ledger state snapshots feat: support in memory UTxO-HD ledger state snapshots May 26, 2025
@Alenar Alenar temporarily deployed to testing-preview May 26, 2025 14:46 — with GitHub Actions Inactive
Alenar added 3 commits May 26, 2025 18:12
This prepare its adaptation in order to support Utxo-Hd in-memory
variant that contains more than one file
To easilly add the Utxo-hd memory variant afterward
@Alenar Alenar force-pushed the djo/2497/adapt_ledger_snapshot_to_utxo-hd branch from e183225 to e405700 Compare May 26, 2025 16:12
@Alenar Alenar temporarily deployed to testing-preview May 26, 2025 16:21 — with GitHub Actions Inactive
Alenar added 3 commits May 27, 2025 12:00
by adding a path for all ledger state snapshot variant (+ the 'non' file)
+ add unit tests to the builder
* mithril-aggregator from `0.7.54` to `0.7.55`
* mithril-client from `0.12.8` to `0.12.9`
* mithril-common from `0.5.32` to `0.5.33`
* mithril-end-to-end from `0.4.86` to `0.4.87`
@Alenar Alenar force-pushed the djo/2497/adapt_ledger_snapshot_to_utxo-hd branch from e405700 to 5c0619a Compare May 27, 2025 10:01
@Alenar Alenar temporarily deployed to testing-preview May 27, 2025 10:17 — with GitHub Actions Inactive
@Alenar Alenar merged commit e6135c6 into main May 27, 2025
38 checks passed
@Alenar Alenar deleted the djo/2497/adapt_ledger_snapshot_to_utxo-hd branch May 27, 2025 12:41
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

Adapt ledger state snapshot artifact creation in Cardano database certification
3 participants