Skip to content

Commit 0163127

Browse files
authored
Merge pull request #2269 from input-output-hk/sfa/2253/remove_mithril_common_circular_dependencies
Remove mithril common circular dependencies and `random` feature
2 parents 92ecbe8 + 4c644ae commit 0163127

File tree

37 files changed

+203
-254
lines changed

37 files changed

+203
-254
lines changed

Cargo.lock

Lines changed: 4 additions & 4 deletions
Some generated files are not rendered by default. Learn more about customizing how changed files appear on GitHub.

mithril-aggregator/Cargo.toml

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,6 @@
11
[package]
22
name = "mithril-aggregator"
3-
version = "0.6.25"
3+
version = "0.6.26"
44
description = "A Mithril Aggregator server"
55
authors = { workspace = true }
66
edition = { workspace = true }

mithril-aggregator/src/database/record/signed_entity.rs

Lines changed: 2 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -3,8 +3,7 @@ use serde::{Deserialize, Serialize};
33

44
use mithril_common::crypto_helper::ProtocolParameters;
55
use mithril_common::entities::{
6-
BlockNumber, CardanoDatabaseSnapshot, Epoch, SignedEntity, SignedEntityType, Snapshot,
7-
StakeDistribution,
6+
BlockNumber, CardanoDatabaseSnapshot, Epoch, SignedEntityType, Snapshot, StakeDistribution,
87
};
98
#[cfg(test)]
109
use mithril_common::entities::{CardanoStakeDistribution, MithrilStakeDistribution};
@@ -15,7 +14,7 @@ use mithril_common::messages::{
1514
MithrilStakeDistributionListItemMessage, MithrilStakeDistributionMessage,
1615
SignerWithStakeMessagePart, SnapshotListItemMessage, SnapshotMessage,
1716
};
18-
use mithril_common::signable_builder::Artifact;
17+
use mithril_common::signable_builder::{Artifact, SignedEntity};
1918
use mithril_common::StdError;
2019
use mithril_persistence::database::Hydrator;
2120
use mithril_persistence::sqlite::{HydrationError, Projection, SqLiteEntity};

mithril-aggregator/src/database/repository/signed_entity_store.rs

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -165,7 +165,8 @@ impl SignedEntityStorer for SignedEntityStore {
165165
#[cfg(test)]
166166
mod tests {
167167
use mithril_common::{
168-
entities::{Epoch, MithrilStakeDistribution, SignedEntity, Snapshot},
168+
entities::{Epoch, MithrilStakeDistribution, Snapshot},
169+
signable_builder::SignedEntity,
169170
test_utils::fake_data,
170171
};
171172

mithril-aggregator/src/http_server/routes/artifact_routes/mod.rs

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -7,8 +7,8 @@ pub mod snapshot;
77
#[cfg(test)]
88
pub mod test_utils {
99
use chrono::{DateTime, Utc};
10-
use mithril_common::entities::{SignedEntity, SignedEntityType};
11-
use mithril_common::signable_builder::Artifact;
10+
use mithril_common::entities::SignedEntityType;
11+
use mithril_common::signable_builder::{Artifact, SignedEntity};
1212

1313
pub fn create_signed_entity<T>(
1414
signed_entity_type: SignedEntityType,

mithril-aggregator/src/http_server/routes/proof_routes.rs

Lines changed: 4 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -48,9 +48,8 @@ fn proof_cardano_transaction(
4848

4949
mod handlers {
5050
use mithril_common::{
51-
entities::{CardanoTransactionsSnapshot, SignedEntity},
52-
messages::CardanoTransactionsProofsMessage,
53-
StdResult,
51+
entities::CardanoTransactionsSnapshot, messages::CardanoTransactionsProofsMessage,
52+
signable_builder::SignedEntity, StdResult,
5453
};
5554
use slog::{debug, warn, Logger};
5655
use std::{convert::Infallible, sync::Arc};
@@ -148,9 +147,8 @@ mod tests {
148147
};
149148

150149
use mithril_common::{
151-
entities::{
152-
BlockNumber, CardanoTransactionsSetProof, CardanoTransactionsSnapshot, SignedEntity,
153-
},
150+
entities::{BlockNumber, CardanoTransactionsSetProof, CardanoTransactionsSnapshot},
151+
signable_builder::SignedEntity,
154152
test_utils::{apispec::APISpec, assert_equivalent, fake_data},
155153
};
156154

mithril-aggregator/src/message_adapters/to_cardano_transactions_proof_message.rs

Lines changed: 3 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -1,8 +1,7 @@
1-
use mithril_common::entities::{CardanoTransactionsSnapshot, SignedEntity};
2-
use mithril_common::messages::CardanoTransactionsSetProofMessagePart;
31
use mithril_common::{
4-
entities::{CardanoTransactionsSetProof, TransactionHash},
5-
messages::CardanoTransactionsProofsMessage,
2+
entities::{CardanoTransactionsSetProof, CardanoTransactionsSnapshot, TransactionHash},
3+
messages::{CardanoTransactionsProofsMessage, CardanoTransactionsSetProofMessagePart},
4+
signable_builder::SignedEntity,
65
StdResult,
76
};
87

mithril-aggregator/src/services/signed_entity.rs

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -12,11 +12,11 @@ use tokio::task::JoinHandle;
1212
use mithril_common::{
1313
entities::{
1414
BlockNumber, CardanoDatabaseSnapshot, CardanoDbBeacon, CardanoStakeDistribution,
15-
CardanoTransactionsSnapshot, Certificate, Epoch, MithrilStakeDistribution, SignedEntity,
15+
CardanoTransactionsSnapshot, Certificate, Epoch, MithrilStakeDistribution,
1616
SignedEntityType, SignedEntityTypeDiscriminants, Snapshot,
1717
},
1818
logging::LoggerExtensions,
19-
signable_builder::Artifact,
19+
signable_builder::{Artifact, SignedEntity},
2020
signed_entity_type_lock::SignedEntityTypeLock,
2121
StdResult,
2222
};

mithril-aggregator/tests/test_extensions/aggregator_observer.rs

Lines changed: 5 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -4,9 +4,12 @@ use mithril_aggregator::{
44
entities::OpenMessage,
55
services::{CertifierService, SignedEntityService},
66
};
7-
use mithril_common::entities::{CardanoTransactionsSnapshot, Certificate, SignedEntity};
87
use mithril_common::{
9-
entities::{Epoch, SignedEntityType, SignedEntityTypeDiscriminants, TimePoint},
8+
entities::{
9+
CardanoTransactionsSnapshot, Certificate, Epoch, SignedEntityType,
10+
SignedEntityTypeDiscriminants, TimePoint,
11+
},
12+
signable_builder::SignedEntity,
1013
StdResult, TickerService,
1114
};
1215
use std::sync::Arc;

mithril-client/Cargo.toml

Lines changed: 1 addition & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,6 @@
11
[package]
22
name = "mithril-client"
3-
version = "0.10.9"
3+
version = "0.10.10"
44
description = "Mithril client library"
55
authors = { workspace = true }
66
edition = { workspace = true }
@@ -69,7 +69,6 @@ reqwest = { version = "0.12.12", default-features = false, features = [
6969
httpmock = "0.7.0"
7070
indicatif = { version = "0.17.9", features = ["tokio"] }
7171
mithril-common = { path = "../mithril-common", version = "=0.4", default-features = false, features = [
72-
"random",
7372
"test_tools",
7473
] }
7574
mockall = "0.13.1"

0 commit comments

Comments
 (0)