Skip to content
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

Feat: implement signable builder for incremental Cardano DB #2146

Open
wants to merge 15 commits into
base: main
Choose a base branch
from

Conversation

dlachaume
Copy link
Collaborator

@dlachaume dlachaume commented Nov 28, 2024

Content

This PR implements the signable builder for the CardanoDatabase. The signed entity type is now activated in the end-to-end test.

Pre-submit checklist

  • Branch
    • Tests are provided (if possible)
    • Crates versions are updated (if relevant)
    • CHANGELOG file is updated (if relevant)
    • Commit sequence broadly makes sense
    • Key commits have useful messages
  • PR
    • No clippy warnings in the CI
    • Self-reviewed the diff
    • Useful pull request description
    • Reviewer requested
  • Documentation
    • Update README file (if relevant)
    • Update documentation website (if relevant)
    • Add dev blog post (if relevant)

Issue(s)

Closes #2122

@dlachaume dlachaume self-assigned this Nov 28, 2024
Copy link

github-actions bot commented Nov 28, 2024

Test Results

    4 files  ±0     52 suites  ±0   11m 45s ⏱️ +3s
1 425 tests +8  1 425 ✅ +8  0 💤 ±0  0 ❌ ±0 
1 636 runs  +8  1 636 ✅ +8  0 💤 ±0  0 ❌ ±0 

Results for commit f9b6de0. ± Comparison against base commit 60db5ce.

This pull request removes 3 and adds 11 tests. Note that renamed tests count towards both.
mithril-common ‑ digesters::cardano_immutable_digester::tests::cache_read_failure_dont_block_computation
mithril-common ‑ digesters::cardano_immutable_digester::tests::digests_are_stored_into_cache_provider
mithril-common ‑ signable_builder::signable_builder_service::tests::pythagoras_era::build_cardano_database_signable_when_given_cardano_database_entity_type_return_error
mithril-aggregator ‑ services::signed_entity::tests::metrics_counter_value_is_not_incremented_when_compute_artifact_error
mithril-aggregator ‑ services::signed_entity::tests::metrics_counter_value_is_not_incremented_when_store_signed_entity_error
mithril-common ‑ digesters::cardano_immutable_digester::tests::cache_read_failure_dont_block_computations
mithril-common ‑ digesters::cardano_immutable_digester::tests::can_compute_merkle_tree_of_a_hundred_immutable_file_trio
mithril-common ‑ digesters::cardano_immutable_digester::tests::compute_digest_store_digests_into_cache_provider
mithril-common ‑ digesters::cardano_immutable_digester::tests::compute_merkle_tree_store_digests_into_cache_provider
mithril-common ‑ digesters::cardano_immutable_digester::tests::computed_merkle_tree_with_cold_or_hot_or_without_any_cache_are_equals
mithril-common ‑ entities::protocol_message::tests::test_protocol_message_compute_hash_include_cardano_database_merkle_root
mithril-common ‑ signable_builder::cardano_database::tests::compute_signable
mithril-common ‑ signable_builder::signable_builder_service::tests::pythagoras_era::build_cardano_database_signable_when_given_cardano_database_entity_type
…

♻️ This comment has been updated with latest results.

@dlachaume dlachaume force-pushed the dlachaume/2122/implement-signable-builder-for-incremental-cardano-db branch 2 times, most recently from ed9a9b9 to 24cb386 Compare November 28, 2024 14:29
@dlachaume dlachaume marked this pull request as ready for review November 28, 2024 14:33
@dlachaume dlachaume force-pushed the dlachaume/2122/implement-signable-builder-for-incremental-cardano-db branch 3 times, most recently from ff077ba to 324d255 Compare November 28, 2024 17:22
@dlachaume dlachaume force-pushed the dlachaume/2122/implement-signable-builder-for-incremental-cardano-db branch from 324d255 to 5430666 Compare November 28, 2024 18:07
@dlachaume dlachaume force-pushed the dlachaume/2122/implement-signable-builder-for-incremental-cardano-db branch from 5430666 to c132412 Compare November 29, 2024 09:29
Copy link
Collaborator

@sfauvel sfauvel left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

LGTM

mithril-common/src/digesters/cardano_immutable_digester.rs Outdated Show resolved Hide resolved
Copy link
Member

@jpraynaud jpraynaud left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

LGTM 🚀

dlachaume and others added 8 commits November 29, 2024 12:11
…larity by isolating responsibilities into smaller scopes and functions

Co-authored-by: DJO <[email protected]>
…ate_cache` responsibility to reduce code duplication

Co-authored-by: DJO <[email protected]>
- use `StdError` alias instead of `anyhow::Error`
- remove unnecessary `ComputedImmutablesDigestsResult` alias
…`MithrilSignableBuilderService` constructor

It reduces the number of parameters in the constructor by encapsulating dependencies into a single struct.
@dlachaume dlachaume force-pushed the dlachaume/2122/implement-signable-builder-for-incremental-cardano-db branch from c132412 to 9821bd2 Compare November 29, 2024 11:11
@dlachaume dlachaume force-pushed the dlachaume/2122/implement-signable-builder-for-incremental-cardano-db branch from 9821bd2 to ac1e197 Compare November 29, 2024 11:19
@dlachaume dlachaume force-pushed the dlachaume/2122/implement-signable-builder-for-incremental-cardano-db branch 3 times, most recently from 4b5fd86 to d4d838b Compare November 29, 2024 17:00
… warnings

Also introduce `SignedEntityServiceArtifactsDependencies` to reduce the number of parameters in `MithrilSignedEntityService` constructor.
@dlachaume dlachaume force-pushed the dlachaume/2122/implement-signable-builder-for-incremental-cardano-db branch from d4d838b to c27ba75 Compare November 29, 2024 17:01
* mithril-aggregator from `0.5.117` to `0.5.118`
* mithril-common from `0.4.91` to `0.4.92`
* mithril-signer from `0.2.217` to `0.2.218`
* mithril-end-to-end from `0.4.50` to `0.4.51`
@dlachaume dlachaume deployed to testing-preview November 29, 2024 17:21 — with GitHub Actions Active
@dlachaume dlachaume deployed to testing-sanchonet November 29, 2024 17:21 — with GitHub Actions Active
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.

Implement signable builder for Incremental Cardano DB
4 participants