Skip to content

Commit 4e21205

Browse files
committed
feature(aggregator): inform_epoch is now reading data from network_configuration_provider, and persist signer resigration epoch configuration
1 parent 5017a48 commit 4e21205

File tree

2 files changed

+145
-118
lines changed

2 files changed

+145
-118
lines changed

mithril-aggregator/src/dependency_injection/builder/enablers/epoch.rs

Lines changed: 6 additions & 17 deletions
Original file line numberDiff line numberDiff line change
@@ -1,8 +1,9 @@
1-
use mithril_protocol_config::http_client::http_impl::HttpMithrilNetworkConfigurationProvider;
21
use std::sync::Arc;
32
use tokio::sync::RwLock;
43

5-
use mithril_protocol_config::interface::MithrilNetworkConfigurationProvider;
4+
use mithril_protocol_config::{
5+
http::HttpMithrilNetworkConfigurationProvider, interface::MithrilNetworkConfigurationProvider,
6+
};
67

78
use crate::dependency_injection::{DependenciesBuilder, EpochServiceWrapper, Result};
89
use crate::get_dependency;
@@ -22,8 +23,8 @@ impl DependenciesBuilder {
2223
.compute_allowed_signed_entity_types_discriminants()?;
2324

2425
let epoch_service = Arc::new(RwLock::new(MithrilEpochService::new(
25-
self.get_mithril_network_configuration_provider().await?,
2626
EpochServiceDependencies::new(
27+
self.get_mithril_network_configuration_provider().await?,
2728
epoch_settings_storer,
2829
verification_key_store,
2930
chain_observer,
@@ -59,6 +60,8 @@ impl DependenciesBuilder {
5960
))
6061
};
6162

63+
//TODO handle discrepency here
64+
6265
Ok(network_configuration_provider)
6366
}
6467

@@ -69,17 +72,3 @@ impl DependenciesBuilder {
6972
get_dependency!(self.mithril_network_configuration_provider)
7073
}
7174
}
72-
73-
// Todo remove after rebase with shared aggregator client:
74-
#[async_trait::async_trait]
75-
impl mithril_protocol_config::http_client::http_impl::ProtocolConfigurationRetrieverFromAggregator
76-
for crate::services::AggregatorHTTPClient
77-
{
78-
/// Retrieves protocol configuration for a given epoch from the aggregator
79-
async fn retrieve_protocol_configuration(
80-
&self,
81-
_epoch: mithril_common::entities::Epoch,
82-
) -> mithril_common::StdResult<mithril_common::messages::ProtocolConfigurationMessage> {
83-
unimplemented!()
84-
}
85-
}

0 commit comments

Comments
 (0)