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

signer retrieves registrations with epoch settings route #1913

Conversation

sfauvel
Copy link
Collaborator

@sfauvel sfauvel commented Sep 3, 2024

Content

In order to decentralize further the protocol, we want to get rid of the centralized orchestration of the signatures which is done with the pending certificate mechanism. The signer registrations for the current and the next epoch should be accessible from a different route than the /certificate-pending route and this should be the source of the signer registrations for the current and the next epoch for all the signers.

This PR depreciates fields in openapiand CertificatePendingMessage (protocol_parameters, next_protocol_parameters, signers and next_signers).
An EpochService is added to store Epoch settings (epoch, current signers, next signers, nex protocol parameters) and the signer use it to get information instead of using the pending certificate.

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)

Comments

Fields have been deprecated from CertificatePendingMessage but not removed from CertificatePending

Issue(s)

Closes #1897

Copy link

github-actions bot commented Sep 3, 2024

Test Results

    4 files  ±0     53 suites  ±0   9m 26s ⏱️ -1s
1 250 tests +3  1 250 ✅ +3  0 💤 ±0  0 ❌ ±0 
1 461 runs  +3  1 461 ✅ +3  0 💤 ±0  0 ❌ ±0 

Results for commit 59a8894. ± Comparison against base commit 82b2f93.

This pull request removes 5 and adds 8 tests. Note that renamed tests count towards both.
mithril-aggregator ‑ message_adapters::to_epoch_settings_message::tests::test_simple_message
mithril-common ‑ entities::certificate_pending::tests::certificate_pending_get_signers
mithril-common ‑ messages::epoch_settings::tests::test_v1
mithril-signer ‑ message_adapters::from_pending_certificate_message::tests::adapt_signers
mithril-signer ‑ runtime::runner::tests::test_associate_signers_with_stake
mithril-common ‑ messages::epoch_settings::tests::test_actual_json_deserialized_into_actual_message
mithril-common ‑ messages::epoch_settings::tests::test_actual_json_deserialized_into_previous_message
mithril-signer ‑ services::epoch_service::tests::test_data_are_available_after_register_epoch_settings_call
mithril-signer ‑ services::epoch_service::tests::test_retrieve_data_return_error_before_register_epoch_settings_was_call
mithril-signer ‑ services::epoch_service::tests::test_signers_with_stake_are_available_after_register_epoch_settings_call
mithril-signer::create_cardano_transaction_single_signature ‑ test_extensions::certificate_handler::tests::retrieve_epoch_settings
mithril-signer::create_immutable_files_full_single_signature ‑ test_extensions::certificate_handler::tests::retrieve_epoch_settings
mithril-signer::era_switch ‑ test_extensions::certificate_handler::tests::retrieve_epoch_settings

♻️ This comment has been updated with latest results.

@sfauvel sfauvel changed the title Ensemble/1897/signer retrieves registrations with epoch settings route signer retrieves registrations with epoch settings route Sep 3, 2024
@sfauvel sfauvel marked this pull request as ready for review September 3, 2024 15:45
mithril-common/src/messages/epoch_settings.rs Outdated Show resolved Hide resolved
mithril-common/src/messages/message_parts/signer.rs Outdated Show resolved Hide resolved
openapi.yaml Outdated Show resolved Hide resolved
mithril-signer/src/services/epoch_service.rs Outdated Show resolved Hide resolved
mithril-signer/src/services/epoch_service.rs Outdated Show resolved Hide resolved
mithril-signer/src/runtime/runner.rs Outdated Show resolved Hide resolved
@sfauvel sfauvel force-pushed the ensemble/1897/signer_retrieves_registrations_with_epoch_settings_route branch from d60e407 to 429beca Compare September 6, 2024 09:22
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.

Overall looks almost good 👍

I left few suggestions and comments below.

mithril-common/src/messages/epoch_settings.rs Outdated Show resolved Hide resolved
mithril-signer/src/message_adapters/from_epoch_settings.rs Outdated Show resolved Hide resolved
mithril-signer/src/runtime/runner.rs Outdated Show resolved Hide resolved
mithril-signer/src/runtime/runner.rs Outdated Show resolved Hide resolved
mithril-signer/src/runtime/runner.rs Outdated Show resolved Hide resolved
mithril-signer/src/services/epoch_service.rs Outdated Show resolved Hide resolved
mithril-signer/src/services/epoch_service.rs Show resolved Hide resolved
@sfauvel sfauvel force-pushed the ensemble/1897/signer_retrieves_registrations_with_epoch_settings_route branch from 429beca to f5fcf39 Compare September 9, 2024 13:29
Copy link
Collaborator

@Alenar Alenar left a comment

Choose a reason for hiding this comment

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

LGTM

@sfauvel sfauvel force-pushed the ensemble/1897/signer_retrieves_registrations_with_epoch_settings_route branch from b39dae0 to 9339988 Compare September 9, 2024 16:06
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 👍

* mithril-aggregator from `0.5.60` to `0.5.61`
* mithril-common from `0.4.49` to `0.4.50`
* mithril-signer from `0.2.179` to `0.2.180`
* mithril-aggregator-fake from `0.3.8` to `0.3.9`
* openapi.yaml from `0.1.28` to `0.1.29`
@sfauvel sfauvel force-pushed the ensemble/1897/signer_retrieves_registrations_with_epoch_settings_route branch from 9339988 to 59a8894 Compare September 10, 2024 06:25
@sfauvel sfauvel merged commit aff35a8 into main Sep 10, 2024
39 of 40 checks passed
@sfauvel sfauvel deleted the ensemble/1897/signer_retrieves_registrations_with_epoch_settings_route branch September 10, 2024 07:20
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.

Signer retrieves registrations with epoch settings route
4 participants