Skip to content

Commit

Permalink
Temp commit
Browse files Browse the repository at this point in the history
  • Loading branch information
jpraynaud committed Jun 16, 2023
1 parent 404d63c commit 39d93d7
Show file tree
Hide file tree
Showing 6 changed files with 18 additions and 6 deletions.
2 changes: 1 addition & 1 deletion .github/workflows/ci.yml
Original file line number Diff line number Diff line change
Expand Up @@ -190,7 +190,7 @@ jobs:
fail-fast: false
matrix:
era: ${{ fromJSON(needs.build-ubuntu-X64.outputs.eras) }}
run_id: [1,2,3]
run_id: [1,2,3,4,5,6,7,8,9,10]
steps:
- name: Checkout sources
uses: actions/checkout@v3
Expand Down
5 changes: 3 additions & 2 deletions mithril-aggregator/src/certifier_service.rs
Original file line number Diff line number Diff line change
Expand Up @@ -170,8 +170,8 @@ impl MithrilCertifierService {
impl CertifierService for MithrilCertifierService {
async fn inform_epoch(&self, epoch: Epoch) -> StdResult<()> {
debug!("CertifierService::inform_epoch(epoch: {epoch:?})");
let nb = self.open_message_repository.clean_epoch(epoch).await?;
info!("MithrilCertifierService: Informed of a new Epoch: {epoch:?}. Cleaned {nb} open messages along with their single signatures.");
/* let nb = self.open_message_repository.clean_epoch(epoch).await?;
info!("MithrilCertifierService: Informed of a new Epoch: {epoch:?}. Cleaned {nb} open messages along with their single signatures."); */

Ok(())
}
Expand Down Expand Up @@ -230,6 +230,7 @@ impl CertifierService for MithrilCertifierService {
"CertifierService::create_open_message: created open message ID='{}'",
open_message.open_message_id
);
debug!("CertifierService::create_open_message: open_message={open_message:?}'");

Ok(open_message.into())
}
Expand Down
4 changes: 4 additions & 0 deletions mithril-aggregator/src/runtime/error.rs
Original file line number Diff line number Diff line change
Expand Up @@ -67,4 +67,8 @@ pub enum RunnerError {
/// Missing protocol parameters
#[error("Missing protocol parameters: '{0}'.")]
MissingProtocolParameters(String),

/// Missing next aggregate verification key
#[error("Missing next aggregate verification key: '{0}'.")]
MissingNextAggregateVerificationKey(String),
}
9 changes: 8 additions & 1 deletion mithril-aggregator/src/runtime/runner.rs
Original file line number Diff line number Diff line change
Expand Up @@ -211,6 +211,8 @@ impl AggregatorRunnerTrait for AggregatorRunner {
"RUNNER: get_current_non_certified_open_message_for_signed_entity_type: no open message found, a new one will be created";
"signed_entity_type" => ?signed_entity_type
);
let chain_beacon: Beacon = self.get_beacon_from_chain().await?;
self.update_beacon(&chain_beacon).await?;
let protocol_message = self.compute_protocol_message(signed_entity_type).await?;
Some(
self.create_open_message(signed_entity_type, &protocol_message)
Expand Down Expand Up @@ -385,6 +387,7 @@ impl AggregatorRunnerTrait for AggregatorRunner {
debug!("RUNNER: update protocol parameters"; "beacon" => #?new_beacon);
let protocol_parameters = self.dependencies.config.protocol_parameters.clone();

self.update_beacon(new_beacon).await?;
self.dependencies
.multi_signer
.write()
Expand All @@ -411,7 +414,11 @@ impl AggregatorRunnerTrait for AggregatorRunner {
multi_signer
.compute_next_stake_distribution_aggregate_verification_key()
.await?
.unwrap_or_default(),
.ok_or_else(|| {
RunnerError::MissingNextAggregateVerificationKey(format!(
"Next aggregate verification key could not be computed for signer endity type {signed_entity_type:?}"
))
})?,
);

Ok(protocol_message)
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -29,7 +29,7 @@ impl Aggregator {
format!(r#"{{"markers": [{{"name": "{mithril_era}", "epoch": 1}}]}}"#);
let env = HashMap::from([
("NETWORK", "devnet"),
("RUN_INTERVAL", "400"),
("RUN_INTERVAL", "200"),
("SERVER_IP", "0.0.0.0"),
("SERVER_PORT", &server_port_parameter),
("URL_SNAPSHOT_MANIFEST", ""),
Expand Down
2 changes: 1 addition & 1 deletion mithril-test-lab/mithril-end-to-end/src/mithril/signer.rs
Original file line number Diff line number Diff line change
Expand Up @@ -30,7 +30,7 @@ impl Signer {
format!(r#"{{"markers": [{{"name": "{mithril_era}", "epoch": 1}}]}}"#);
let mut env = HashMap::from([
("NETWORK", "devnet"),
("RUN_INTERVAL", "200"),
("RUN_INTERVAL", "100"),
("AGGREGATOR_ENDPOINT", &aggregator_endpoint),
("DB_DIRECTORY", pool_node.db_path.to_str().unwrap()),
("DATA_STORES_DIRECTORY", &data_stores_path),
Expand Down

0 comments on commit 39d93d7

Please sign in to comment.