input-output-hk / mithril

Stake-based threshold multi-signatures protocol
https://mithril.network
Apache License 2.0
130 stars 41 forks source link

Get rid of store adapter in signer #2126

Closed sfauvel closed 1 day ago

sfauvel commented 4 days ago

Content

Replace the store using the legacy store adapter and replace them with a repository implementation in the Signer.

This PR includes:

[!WARNING] The migration number for signed_beacon was fixed (4 instead of 31). That need to manually update db_version just before merging this PR.

Pre-submit checklist

Comments

Issue(s)

Relates to #2118

github-actions[bot] commented 4 days ago

Test Results

    4 files  ±0     51 suites  ±0   11m 38s ⏱️ -19s 1 455 tests +9  1 455 ✅ +9  0 💤 ±0  0 ❌ ±0  1 666 runs  +9  1 666 ✅ +9  0 💤 ±0  0 ❌ ±0 

Results for commit a14746c8. ± Comparison against base commit 0b8564cf.

This pull request removes 12 and adds 21 tests. Note that renamed tests count towards both. ``` mithril-signer ‑ store::protocol_initializer_store::tests::check_retention_limit mithril-signer ‑ store::protocol_initializer_store::tests::get_protocol_initializer_for_empty_epoch mithril-signer ‑ store::protocol_initializer_store::tests::get_protocol_initializer_for_existing_epoch mithril-signer ‑ store::protocol_initializer_store::tests::save_key_in_empty_store mithril-signer ‑ store::protocol_initializer_store::tests::update_protocol_initializer_in_store mithril-signer ‑ store::stake_store::tests::check_retention_limit mithril-signer ‑ store::stake_store::tests::get_stakes_for_empty_epoch mithril-signer ‑ store::stake_store::tests::get_stakes_for_existing_epoch mithril-signer ‑ store::stake_store::tests::retrieve_returns_stake_distribution mithril-signer ‑ store::stake_store::tests::retrieve_with_no_stakes_returns_none … ``` ``` mithril-persistence ‑ sqlite::connection_builder::tests::test_apply_a_partial_migrations mithril-signer ‑ database::query::stake_pool::delete_stake_pool::tests::test_prune_below_epoch_threshold mithril-signer ‑ database::query::stake_pool::get_stake_pool::tests::test_query_sorts_the_return_stake_pool_by_epoch_stack_and_stake_pool_id mithril-signer ‑ database::query::stake_pool::insert_or_replace_stake_pool::tests::test_update_stakes mithril-signer ‑ database::tests::protocol_initializer::migration::should_migrate_data_from_adapter mithril-signer ‑ database::tests::protocol_initializer::pruning::prune_epoch_older_than_threshold mithril-signer ‑ database::tests::protocol_initializer::pruning::without_threshold_nothing_is_pruned mithril-signer ‑ database::tests::protocol_initializer::request::get_last_protocol_initializer_return_all_when_too_few_records mithril-signer ‑ database::tests::protocol_initializer::request::get_last_protocol_initializer_return_last_one_first mithril-signer ‑ database::tests::protocol_initializer::request::get_protocol_initializer_for_empty_epoch … ```

:recycle: This comment has been updated with latest results.