Skip to content

Commit 71c803f

Browse files
committed
Investigate epochData offset, and EpochSettingsMessageoffsets, updating Miro Schema
1 parent 27753f4 commit 71c803f

File tree

3 files changed

+21
-12
lines changed

3 files changed

+21
-12
lines changed

epoch_grid.md

Lines changed: 8 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,8 @@
1+
|Configuration parameter| Node| Epoch + 0| Epoch + 1| Epoch + 2| Epoch + 3| Epoch + 4|
2+
| --- | --- | --- | --- | --- | --- | --- |
3+
|protocol parameters| aggregator (leader)| update local parameters. <br> Persist epoch setting for epoch+2 in database| advertise new protocol parameters on `/epoch-settings`| -| - | -|
4+
|protocol parameters| aggregator (follower)| -| fetch new protocol parameters on `/epoch-settings` and does signer registration with them| -| - | -|
5+
|protocol parameters| signer| -| fetch new protocol parameters on `/epoch-settings` <br> - signer_registration_protocol_parameters for epoch +1| -| - | -|
6+
|entity types config| aggregator (leader) | --- | --- | --- | --- | --- |
7+
|entity types config| aggregator (follower) | --- | --- | --- | --- | --- |
8+
|entity types config| signer | --- | fetch new protocol parameters on `/epoch-settings`<br> - entity types config for epoch - 1| --- | --- | --- |

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

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -5,6 +5,7 @@ use crate::dependency_injection::{DependenciesBuilder, EpochServiceWrapper, Resu
55
use crate::get_dependency;
66
use crate::services::{EpochServiceDependencies, MithrilEpochService};
77
impl DependenciesBuilder {
8+
// is this dead code ???
89
async fn build_epoch_service(&mut self) -> Result<EpochServiceWrapper> {
910
let verification_key_store = self.get_verification_key_store().await?;
1011
let epoch_settings_storer = self.get_epoch_settings_store().await?;

mithril-aggregator/src/services/epoch_service.rs

Lines changed: 12 additions & 12 deletions
Original file line numberDiff line numberDiff line change
@@ -273,7 +273,7 @@ impl MithrilEpochService {
273273

274274
self.epoch_settings_storer
275275
.save_epoch_settings(
276-
recording_epoch,
276+
recording_epoch, //epoch + 2
277277
self.future_epoch_settings.clone(),
278278
)
279279
.await
@@ -347,17 +347,17 @@ impl EpochService for MithrilEpochService {
347347
self.epoch_data = Some(EpochData {
348348
cardano_era,
349349
mithril_era,
350-
epoch,
351-
current_epoch_settings,
352-
next_epoch_settings,
353-
signer_registration_epoch_settings,
354-
current_signers_with_stake,
355-
next_signers_with_stake,
356-
current_signers,
357-
next_signers,
358-
total_stakes_signers,
359-
total_next_stakes_signers,
360-
signed_entity_config,
350+
epoch, //epoch = 42
351+
current_epoch_settings, //epoch - 1
352+
next_epoch_settings, //epoch + 0
353+
signer_registration_epoch_settings, //epoch + 1
354+
current_signers_with_stake, //epoch - 1
355+
next_signers_with_stake, //epoch + 0
356+
current_signers, //epoch - 1
357+
next_signers, //epoch + 0
358+
total_stakes_signers, //epoch - 1
359+
total_next_stakes_signers, //epoch + 0
360+
signed_entity_config, //epoch - 1
361361
total_spo,
362362
total_stake,
363363
});

0 commit comments

Comments
 (0)