From 8616abdff5c04f9d7211730d02088308e31d1c2a Mon Sep 17 00:00:00 2001 From: Jean-Philippe Raynaud Date: Mon, 1 Dec 2025 16:52:59 +0100 Subject: [PATCH 1/3] chore(common): update signed entity types timeouts --- .../src/entities/signed_entity_type.rs | 36 ++++++++++++++++--- 1 file changed, 32 insertions(+), 4 deletions(-) diff --git a/mithril-common/src/entities/signed_entity_type.rs b/mithril-common/src/entities/signed_entity_type.rs index 397c8c0057e..5ec27a6e4ec 100644 --- a/mithril-common/src/entities/signed_entity_type.rs +++ b/mithril-common/src/entities/signed_entity_type.rs @@ -127,10 +127,11 @@ impl SignedEntityType { /// Return the associated open message timeout pub fn get_open_message_timeout(&self) -> Option { match self { - Self::MithrilStakeDistribution(_) | Self::CardanoImmutableFilesFull(_) => None, - Self::CardanoStakeDistribution(_) => Some(Duration::from_secs(600)), - Self::CardanoTransactions(_, _) => Some(Duration::from_secs(1800)), - Self::CardanoDatabase(_) => Some(Duration::from_secs(1800)), + Self::MithrilStakeDistribution(_) => Some(Duration::from_secs(3600)), + Self::CardanoImmutableFilesFull(_) => Some(Duration::from_secs(600)), + Self::CardanoStakeDistribution(_) => Some(Duration::from_secs(1800)), + Self::CardanoTransactions(_, _) => Some(Duration::from_secs(600)), + Self::CardanoDatabase(_) => Some(Duration::from_secs(600)), } } @@ -377,6 +378,33 @@ mod tests { ); } + #[test] + fn get_open_message_timeout() { + assert_eq!( + SignedEntityType::MithrilStakeDistribution(Epoch(1)).get_open_message_timeout(), + Some(Duration::from_secs(3600)) + ); + assert_eq!( + SignedEntityType::CardanoImmutableFilesFull(CardanoDbBeacon::new(1, 1)) + .get_open_message_timeout(), + Some(Duration::from_secs(600)) + ); + assert_eq!( + SignedEntityType::CardanoStakeDistribution(Epoch(1)).get_open_message_timeout(), + Some(Duration::from_secs(1800)) + ); + assert_eq!( + SignedEntityType::CardanoTransactions(Epoch(1), BlockNumber(1)) + .get_open_message_timeout(), + Some(Duration::from_secs(600)) + ); + assert_eq!( + SignedEntityType::CardanoDatabase(CardanoDbBeacon::new(1, 1)) + .get_open_message_timeout(), + Some(Duration::from_secs(600)) + ); + } + #[test] fn serialize_beacon_to_json() { let cardano_stake_distribution_json = SignedEntityType::CardanoStakeDistribution(Epoch(25)) From 6be9aa515f46aa10ff589ea423ba35cab0337c21 Mon Sep 17 00:00:00 2001 From: Jean-Philippe Raynaud Date: Mon, 1 Dec 2025 16:53:21 +0100 Subject: [PATCH 2/3] fix(common): make commands failing --- mithril-common/Makefile | 8 ++++---- 1 file changed, 4 insertions(+), 4 deletions(-) diff --git a/mithril-common/Makefile b/mithril-common/Makefile index c3e68deb9a6..39a2e49a7b6 100644 --- a/mithril-common/Makefile +++ b/mithril-common/Makefile @@ -5,10 +5,10 @@ CARGO = cargo all: test build build: - ${CARGO} build --release --features full + ${CARGO} build --release test: - ${CARGO} test --features full + ${CARGO} test check: ${CARGO} check --release --all-features --all-targets @@ -16,7 +16,7 @@ check: ${CARGO} fmt --check doc: - ${CARGO} doc --no-deps --open --features full + ${CARGO} doc --no-deps --open bench: - ${CARGO} bench --features full --verbose + ${CARGO} bench --verbose From a5c22a0fc32bfdae8387d54330ab545eab626d36 Mon Sep 17 00:00:00 2001 From: Jean-Philippe Raynaud Date: Tue, 2 Dec 2025 09:57:30 +0100 Subject: [PATCH 3/3] chore: upgrade crate versions * mithril-common from `0.6.29` to `0.6.30` --- Cargo.lock | 2 +- mithril-common/Cargo.toml | 2 +- 2 files changed, 2 insertions(+), 2 deletions(-) diff --git a/Cargo.lock b/Cargo.lock index e41d565b5fa..b2081f83513 100644 --- a/Cargo.lock +++ b/Cargo.lock @@ -3996,7 +3996,7 @@ dependencies = [ [[package]] name = "mithril-common" -version = "0.6.29" +version = "0.6.30" dependencies = [ "anyhow", "async-trait", diff --git a/mithril-common/Cargo.toml b/mithril-common/Cargo.toml index 8bb419fbd87..0691f3113ef 100644 --- a/mithril-common/Cargo.toml +++ b/mithril-common/Cargo.toml @@ -1,6 +1,6 @@ [package] name = "mithril-common" -version = "0.6.29" +version = "0.6.30" description = "Common types, interfaces, and utilities for Mithril nodes." authors = { workspace = true } edition = { workspace = true }