-
Notifications
You must be signed in to change notification settings - Fork 41
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
Design mithril-common
split & re-organization in repository
#2175
Comments
Current state overviewTip The graphs have been generated using cargo module. Note For all generated graph, their code have been edited to remove a Top modules inter-dependenciesGraph codeCommandNote: Since the
Generated graphvizdigraph {
graph [
label="mithril_common",
labelloc=t,
pad=0.4,
// Consider rendering the graph using a different layout algorithm, such as:
// [dot, neato, twopi, circo, fdp, sfdp]
layout=neato,
overlap=false,
splines="line",
rankdir=LR,
fontname="Helvetica",
fontsize="36",
];
node [
fontname="monospace",
fontsize="10",
shape="record",
style="filled",
];
edge [
fontname="monospace",
fontsize="10",
];
"mithril_common::api_version" [label="pub mod|api_version", fillcolor="#81c169"]; // "mod" node
"mithril_common::cardano_block_scanner" [label="pub mod|cardano_block_scanner", fillcolor="#81c169"]; // "mod" node
"mithril_common::cardano_transactions_preloader" [label="pub mod|cardano_transactions_preloader", fillcolor="#81c169"]; // "mod" node
"mithril_common::certificate_chain" [label="pub mod|certificate_chain", fillcolor="#81c169"]; // "mod" node
"mithril_common::chain_observer" [label="pub mod|chain_observer", fillcolor="#81c169"]; // "mod" node
"mithril_common::chain_reader" [label="pub mod|chain_reader", fillcolor="#81c169"]; // "mod" node
"mithril_common::crypto_helper" [label="pub mod|crypto_helper", fillcolor="#81c169"]; // "mod" node
"mithril_common::digesters" [label="pub mod|digesters", fillcolor="#81c169"]; // "mod" node
"mithril_common::entities" [label="pub mod|entities", fillcolor="#81c169"]; // "mod" node
"mithril_common::era" [label="pub mod|era", fillcolor="#81c169"]; // "mod" node
"mithril_common::logging" [label="pub mod|logging", fillcolor="#81c169"]; // "mod" node
"mithril_common::messages" [label="pub mod|messages", fillcolor="#81c169"]; // "mod" node
"mithril_common::protocol" [label="pub mod|protocol", fillcolor="#81c169"]; // "mod" node
"mithril_common::resource_pool" [label="pub mod|resource_pool", fillcolor="#81c169"]; // "mod" node
"mithril_common::signable_builder" [label="pub mod|signable_builder", fillcolor="#81c169"]; // "mod" node
"mithril_common::signed_entity_type_lock" [label="pub mod|signed_entity_type_lock", fillcolor="#81c169"]; // "mod" node
"mithril_common::ticker_service" [label="pub(crate) mod|ticker_service", fillcolor="#f8c04c"]; // "mod" node
"mithril_common::api_version" -> "mithril_common::era" [label="uses", color="#7f7f7f", style="dashed"] [constraint=false]; // "uses" edge
"mithril_common::cardano_block_scanner" -> "mithril_common::chain_reader" [label="uses", color="#7f7f7f", style="dashed"] [constraint=false]; // "uses" edge
"mithril_common::cardano_block_scanner" -> "mithril_common::entities" [label="uses", color="#7f7f7f", style="dashed"] [constraint=false]; // "uses" edge
"mithril_common::cardano_block_scanner" -> "mithril_common::logging" [label="uses", color="#7f7f7f", style="dashed"] [constraint=false]; // "uses" edge
"mithril_common::cardano_transactions_preloader" -> "mithril_common::chain_observer" [label="uses", color="#7f7f7f", style="dashed"] [constraint=false]; // "uses" edge
"mithril_common::cardano_transactions_preloader" -> "mithril_common::entities" [label="uses", color="#7f7f7f", style="dashed"] [constraint=false]; // "uses" edge
"mithril_common::cardano_transactions_preloader" -> "mithril_common::logging" [label="uses", color="#7f7f7f", style="dashed"] [constraint=false]; // "uses" edge
"mithril_common::cardano_transactions_preloader" -> "mithril_common::signed_entity_type_lock" [label="uses", color="#7f7f7f", style="dashed"] [constraint=false]; // "uses" edge
"mithril_common::certificate_chain" -> "mithril_common::crypto_helper" [label="uses", color="#7f7f7f", style="dashed"] [constraint=false]; // "uses" edge
"mithril_common::certificate_chain" -> "mithril_common::entities" [label="uses", color="#7f7f7f", style="dashed"] [constraint=false]; // "uses" edge
"mithril_common::certificate_chain" -> "mithril_common::logging" [label="uses", color="#7f7f7f", style="dashed"] [constraint=false]; // "uses" edge
"mithril_common::certificate_chain" -> "mithril_common::protocol" [label="uses", color="#7f7f7f", style="dashed"] [constraint=false]; // "uses" edge
"mithril_common::chain_observer" -> "mithril_common::crypto_helper" [label="uses", color="#7f7f7f", style="dashed"] [constraint=false]; // "uses" edge
"mithril_common::chain_observer" -> "mithril_common::entities" [label="uses", color="#7f7f7f", style="dashed"] [constraint=false]; // "uses" edge
"mithril_common::chain_reader" -> "mithril_common::cardano_block_scanner" [label="uses", color="#7f7f7f", style="dashed"] [constraint=false]; // "uses" edge
"mithril_common::chain_reader" -> "mithril_common::entities" [label="uses", color="#7f7f7f", style="dashed"] [constraint=false]; // "uses" edge
"mithril_common::chain_reader" -> "mithril_common::logging" [label="uses", color="#7f7f7f", style="dashed"] [constraint=false]; // "uses" edge
"mithril_common::crypto_helper" -> "mithril_common::entities" [label="uses", color="#7f7f7f", style="dashed"] [constraint=false]; // "uses" edge
"mithril_common::crypto_helper" -> "mithril_common::resource_pool" [label="uses", color="#7f7f7f", style="dashed"] [constraint=false]; // "uses" edge
"mithril_common::digesters" -> "mithril_common::crypto_helper" [label="uses", color="#7f7f7f", style="dashed"] [constraint=false]; // "uses" edge
"mithril_common::digesters" -> "mithril_common::entities" [label="uses", color="#7f7f7f", style="dashed"] [constraint=false]; // "uses" edge
"mithril_common::digesters" -> "mithril_common::logging" [label="uses", color="#7f7f7f", style="dashed"] [constraint=false]; // "uses" edge
"mithril_common::entities" -> "mithril_common::crypto_helper" [label="uses", color="#7f7f7f", style="dashed"] [constraint=false]; // "uses" edge
"mithril_common::entities" -> "mithril_common::messages" [label="uses", color="#7f7f7f", style="dashed"] [constraint=false]; // "uses" edge
"mithril_common::entities" -> "mithril_common::protocol" [label="uses", color="#7f7f7f", style="dashed"] [constraint=false]; // "uses" edge
"mithril_common::entities" -> "mithril_common::signable_builder" [label="uses", color="#7f7f7f", style="dashed"] [constraint=false]; // "uses" edge
"mithril_common::era" -> "mithril_common::chain_observer" [label="uses", color="#7f7f7f", style="dashed"] [constraint=false]; // "uses" edge
"mithril_common::era" -> "mithril_common::crypto_helper" [label="uses", color="#7f7f7f", style="dashed"] [constraint=false]; // "uses" edge
"mithril_common::era" -> "mithril_common::entities" [label="uses", color="#7f7f7f", style="dashed"] [constraint=false]; // "uses" edge
"mithril_common::messages" -> "mithril_common::crypto_helper" [label="uses", color="#7f7f7f", style="dashed"] [constraint=false]; // "uses" edge
"mithril_common::messages" -> "mithril_common::entities" [label="uses", color="#7f7f7f", style="dashed"] [constraint=false]; // "uses" edge
"mithril_common::messages" -> "mithril_common::era" [label="uses", color="#7f7f7f", style="dashed"] [constraint=false]; // "uses" edge
"mithril_common::protocol" -> "mithril_common::crypto_helper" [label="uses", color="#7f7f7f", style="dashed"] [constraint=false]; // "uses" edge
"mithril_common::protocol" -> "mithril_common::entities" [label="uses", color="#7f7f7f", style="dashed"] [constraint=false]; // "uses" edge
"mithril_common::signable_builder" -> "mithril_common::crypto_helper" [label="uses", color="#7f7f7f", style="dashed"] [constraint=false]; // "uses" edge
"mithril_common::signable_builder" -> "mithril_common::entities" [label="uses", color="#7f7f7f", style="dashed"] [constraint=false]; // "uses" edge
"mithril_common::signable_builder" -> "mithril_common::era" [label="uses", color="#7f7f7f", style="dashed"] [constraint=false]; // "uses" edge
"mithril_common::signable_builder" -> "mithril_common::logging" [label="uses", color="#7f7f7f", style="dashed"] [constraint=false]; // "uses" edge
"mithril_common::ticker_service" -> "mithril_common::chain_observer" [label="uses", color="#7f7f7f", style="dashed"] [constraint=false]; // "uses" edge
"mithril_common::ticker_service" -> "mithril_common::digesters" [label="uses", color="#7f7f7f", style="dashed"] [constraint=false]; // "uses" edge
"mithril_common::ticker_service" -> "mithril_common::entities" [label="uses", color="#7f7f7f", style="dashed"] [constraint=false]; // "uses" edge
} Modules analysissigned_entity_type_lockDependency of:
Nothing depends on it and it don't depends on anything either, it could be easily extracted. certificate_chainDependency of: Nothing
Api versionDependency of: Nothing
LoggingDependency of:
Resource poolDependency of:
The crypto helper only need them to implement the EraDependency of:
This module consist of two parts: one part to check the current era and one to read them from different providers. The read part is the one that needs the dependency to Chain observerDependency of:
Signable builderDependency of:
Ticker serviceDependency of:
ProtocolDependency of:
Cardano block scannerDependency of:
Chain readerDependency of:
MessagesDependency of:
Crypto helperDependency of:
EntitiesDependency of:
|
Why
In order to reduce build times, binary sizes and number of features, and also to provide more structured libraries, we want to split the
mithril-common
crate in sub-crates.What
Propose a split for the
mithril-common
crate and a plan of deployment.How
mithril-common
into sub-crates (mention responsibility of the new sub-crate, propose names and locations in the repository -internal, root, ...-)The text was updated successfully, but these errors were encountered: