-
Notifications
You must be signed in to change notification settings - Fork 51
Reorganize signer dependencies #1908
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
Changes from 11 commits
Commits
Show all changes
14 commits
Select commit
Hold shift + click to select a range
40a8a86
Scaffold a `dependency_injection` module in Signer
Alenar c28cd91
Align Signer dependency injection components with aggregator naming
Alenar 44bd0bf
Move Signer Dependencies builder & container to `dependency_injection…
Alenar 9c7c349
Scaffold a `services` module in Signer
Alenar 23791da
Move several Signer services to `services` mod
Alenar 556acef
Scope signer services import to the `services` module
Alenar 141d68c
Promote Signer `services::cardano_transactions_importer` mod to a dir…
Alenar 8c07973
Move tx importer decorators to the new module
Alenar 01e9188
Scaffold a `store` module in Signer
Alenar 8b6511d
Move Signer stores to their new dedicated mod
Alenar 6fe0220
Scope signer store import to the `store` module
Alenar a96b950
Futher reorganize cardano transactions services inside a single mod
Alenar afd8865
Rename `ProductionDependenciesBuilder` to `DependenciesBuilder`
Alenar 8362c9b
Upgrade `mithril-signer` version: from `0.2.174` to `0.2.175`
Alenar File filter
Filter by extension
Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
There are no files selected for viewing
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| Original file line number | Diff line number | Diff line change |
|---|---|---|
| @@ -0,0 +1,71 @@ | ||
| use std::sync::Arc; | ||
|
|
||
| use mithril_common::api_version::APIVersionProvider; | ||
| use mithril_common::cardano_transactions_preloader::CardanoTransactionsPreloader; | ||
| use mithril_common::chain_observer::ChainObserver; | ||
| use mithril_common::digesters::ImmutableDigester; | ||
| use mithril_common::era::{EraChecker, EraReader}; | ||
| use mithril_common::signable_builder::SignableBuilderService; | ||
| use mithril_common::signed_entity_type_lock::SignedEntityTypeLock; | ||
| use mithril_common::TickerService; | ||
| use mithril_persistence::store::StakeStore; | ||
|
|
||
| use crate::services::{AggregatorClient, SingleSigner, UpkeepService}; | ||
| use crate::store::ProtocolInitializerStorer; | ||
| use crate::MetricsService; | ||
|
|
||
| type StakeStoreService = Arc<StakeStore>; | ||
| type CertificateHandlerService = Arc<dyn AggregatorClient>; | ||
| type ChainObserverService = Arc<dyn ChainObserver>; | ||
| type DigesterService = Arc<dyn ImmutableDigester>; | ||
| type SingleSignerService = Arc<dyn SingleSigner>; | ||
| type TimePointProviderService = Arc<dyn TickerService>; | ||
| type ProtocolInitializerStoreService = Arc<dyn ProtocolInitializerStorer>; | ||
|
|
||
| /// This structure groups all the dependencies required by the state machine. | ||
| pub struct SignerDependencyContainer { | ||
| /// Time point provider service | ||
| pub ticker_service: TimePointProviderService, | ||
|
|
||
| /// Stake store service | ||
| pub stake_store: StakeStoreService, | ||
|
|
||
| /// Certificate handler service | ||
| pub certificate_handler: CertificateHandlerService, | ||
|
|
||
| /// Chain Observer service | ||
| pub chain_observer: ChainObserverService, | ||
|
|
||
| /// Digester service | ||
| pub digester: DigesterService, | ||
|
|
||
| /// SingleSigner service | ||
| pub single_signer: SingleSignerService, | ||
|
|
||
| /// ProtocolInitializer store | ||
| pub protocol_initializer_store: ProtocolInitializerStoreService, | ||
|
|
||
| /// Era checker service | ||
| pub era_checker: Arc<EraChecker>, | ||
|
|
||
| /// Era reader service | ||
| pub era_reader: Arc<EraReader>, | ||
|
|
||
| /// API version provider | ||
| pub api_version_provider: Arc<APIVersionProvider>, | ||
|
|
||
| /// Signable Builder Service | ||
| pub signable_builder_service: Arc<dyn SignableBuilderService>, | ||
|
|
||
| /// Metrics service | ||
| pub metrics_service: Arc<MetricsService>, | ||
|
|
||
| /// Signed entity type lock | ||
| pub signed_entity_type_lock: Arc<SignedEntityTypeLock>, | ||
|
|
||
| /// Cardano transactions preloader | ||
| pub cardano_transactions_preloader: Arc<CardanoTransactionsPreloader>, | ||
|
|
||
| /// Upkeep service | ||
| pub upkeep_service: Arc<dyn UpkeepService>, | ||
| } |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| Original file line number | Diff line number | Diff line change |
|---|---|---|
| @@ -0,0 +1,20 @@ | ||
| //! Dependency injection module. | ||
| //! | ||
| //! This module provides tools to initialize and share resources and services | ||
| //! amongst different threads. | ||
| //! | ||
| //! It takes all its inputs from the configuration which should combine inputs from: | ||
| //! | ||
| //! * environment | ||
| //! * command line | ||
| //! * configuration files | ||
| //! * default values | ||
| //! | ||
| //! The Builder ensure every service has required dependencies to build and | ||
| //! provide services containers for each sub process. | ||
|
|
||
| mod builder; | ||
| mod containers; | ||
|
|
||
| pub use builder::*; | ||
| pub use containers::*; |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Oops, something went wrong.
Add this suggestion to a batch that can be applied as a single commit.
This suggestion is invalid because no changes were made to the code.
Suggestions cannot be applied while the pull request is closed.
Suggestions cannot be applied while viewing a subset of changes.
Only one suggestion per line can be applied in a batch.
Add this suggestion to a batch that can be applied as a single commit.
Applying suggestions on deleted lines is not supported.
You must change the existing code in this line in order to create a valid suggestion.
Outdated suggestions cannot be applied.
This suggestion has been applied or marked resolved.
Suggestions cannot be applied from pending reviews.
Suggestions cannot be applied on multi-line comments.
Suggestions cannot be applied while the pull request is queued to merge.
Suggestion cannot be applied right now. Please check back later.
Uh oh!
There was an error while loading. Please reload this page.