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: record informations in epoch service for status route #2100

Merged
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
4 changes: 2 additions & 2 deletions Cargo.lock

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

2 changes: 1 addition & 1 deletion mithril-aggregator/Cargo.toml
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
[package]
name = "mithril-aggregator"
version = "0.5.106"
version = "0.5.107"
description = "A Mithril Aggregator server"
authors = { workspace = true }
edition = { workspace = true }
Expand Down
21 changes: 13 additions & 8 deletions mithril-aggregator/src/dependency_injection/builder.rs
Original file line number Diff line number Diff line change
Expand Up @@ -63,14 +63,11 @@ use crate::{
},
entities::AggregatorEpochSettings,
event_store::{EventMessage, EventStore, TransmitterService},
http_server::routes::{
router,
router::{RouterConfig, RouterState},
},
http_server::routes::router::{self, RouterConfig, RouterState},
services::{
AggregatorSignableSeedBuilder, AggregatorUpkeepService, BufferedCertifierService,
CardanoTransactionsImporter, CertifierService, MessageService, MithrilCertifierService,
MithrilEpochService, MithrilMessageService, MithrilProverService,
CardanoTransactionsImporter, CertifierService, EpochServiceDependencies, MessageService,
MithrilCertifierService, MithrilEpochService, MithrilMessageService, MithrilProverService,
MithrilSignedEntityService, MithrilStakeDistributionService, ProverService,
SignedEntityService, StakeDistributionService, UpkeepService, UsageReporter,
},
Expand Down Expand Up @@ -1259,14 +1256,22 @@ impl DependenciesBuilder {
async fn build_epoch_service(&mut self) -> Result<EpochServiceWrapper> {
let verification_key_store = self.get_verification_key_store().await?;
let epoch_settings_storer = self.get_epoch_settings_storer().await?;
let chain_observer = self.get_chain_observer().await?;
let era_checker = self.get_era_checker().await?;
let stake_distribution_service = self.get_stake_distribution_service().await?;
let epoch_settings = self.get_epoch_settings_configuration()?;
let network = self.configuration.get_network()?;
let allowed_discriminants = self.get_allowed_signed_entity_types_discriminants()?;

let epoch_service = Arc::new(RwLock::new(MithrilEpochService::new(
epoch_settings,
epoch_settings_storer,
verification_key_store,
EpochServiceDependencies::new(
epoch_settings_storer,
verification_key_store,
chain_observer,
era_checker,
stake_distribution_service,
),
network,
allowed_discriminants,
self.root_logger(),
Expand Down
2 changes: 1 addition & 1 deletion mithril-aggregator/src/runtime/state_machine.rs
Original file line number Diff line number Diff line change
Expand Up @@ -252,10 +252,10 @@ impl AggregatorRuntime {
.update_era_checker(new_time_point.epoch)
.await
.map_err(|e| RuntimeError::critical("transiting IDLE → READY", Some(e)))?;
self.runner.inform_new_epoch(new_time_point.epoch).await?;
self.runner
.update_stake_distribution(&new_time_point)
.await?;
self.runner.inform_new_epoch(new_time_point.epoch).await?;
self.runner.upkeep().await?;
self.runner
.open_signer_registration_round(&new_time_point)
Expand Down
Loading