Skip to content

Commit 2fa8023

Browse files
committed
chore(aggregator-discovery): scaffold new crate
1 parent b9f2466 commit 2fa8023

File tree

9 files changed

+107
-12
lines changed

9 files changed

+107
-12
lines changed

.github/workflows/ci.yml

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -843,7 +843,7 @@ jobs:
843843
# the same name (we only want to document those anyway)
844844
cargo doc --no-deps --lib -p mithril-stm -p mithril-common \
845845
-p mithril-cardano-node-chain -p mithril-cardano-node-internal-database \
846-
-p mithril-aggregator-client -p mithril-build-script -p mithril-cli-helper \
846+
-p mithril-aggregator-client -p mithril-aggregator-discovery -p mithril-build-script -p mithril-cli-helper \
847847
-p mithril-dmq -p mithril-doc -p mithril-doc-derive \
848848
-p mithril-era -p mithril-metric -p mithril-persistence -p mithril-resource-pool \
849849
-p mithril-ticker -p mithril-signed-entity-lock -p mithril-signed-entity-preloader \

Cargo.lock

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

Cargo.toml

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -12,6 +12,7 @@ members = [
1212
"internal/cardano-node/mithril-cardano-node-chain",
1313
"internal/cardano-node/mithril-cardano-node-internal-database",
1414
"internal/mithril-aggregator-client",
15+
"internal/mithril-aggregator-discovery",
1516
"internal/mithril-build-script",
1617
"internal/mithril-cli-helper",
1718
"internal/mithril-dmq",

Makefile

Lines changed: 28 additions & 10 deletions
Original file line numberDiff line numberDiff line change
@@ -1,15 +1,33 @@
1-
COMPONENTS = mithril-aggregator mithril-client mithril-client-cli mithril-client-wasm \
2-
mithril-common mithril-relay mithril-signer mithril-stm \
3-
internal/mithril-build-script internal/mithril-cli-helper internal/mithril-doc \
1+
COMPONENTS = demo/protocol-demo \
2+
internal/cardano-node/mithril-cardano-node-chain \
3+
internal/cardano-node/mithril-cardano-node-internal-database \
4+
internal/mithril-aggregator-client \
5+
internal/mithril-aggregator-discovery \
6+
internal/mithril-build-script \
7+
internal/mithril-cli-helper \
48
internal/mithril-dmq \
5-
internal/mithril-doc-derive internal/mithril-era internal/mithril-metric internal/mithril-persistence \
9+
internal/mithril-doc \
10+
internal/mithril-doc-derive \
11+
internal/mithril-era \
12+
internal/mithril-metric \
13+
internal/mithril-persistence \
614
internal/mithril-protocol-config \
7-
internal/mithril-resource-pool internal/mithril-ticker \
8-
internal/cardano-node/mithril-cardano-node-chain internal/cardano-node/mithril-cardano-node-internal-database \
9-
internal/signed-entity/mithril-signed-entity-lock internal/signed-entity/mithril-signed-entity-preloader \
10-
internal/tests/mithril-api-spec internal/tests/mithril-test-http-server \
11-
demo/protocol-demo \
12-
mithril-test-lab/mithril-aggregator-fake mithril-test-lab/mithril-end-to-end
15+
internal/mithril-resource-pool \
16+
internal/mithril-ticker \
17+
internal/signed-entity/mithril-signed-entity-lock \
18+
internal/signed-entity/mithril-signed-entity-preloader \
19+
internal/tests/mithril-api-spec \
20+
internal/tests/mithril-test-http-server \
21+
mithril-aggregator \
22+
mithril-client \
23+
mithril-client-cli \
24+
mithril-client-wasm \
25+
mithril-common \
26+
mithril-relay \
27+
mithril-signer \
28+
mithril-stm \
29+
mithril-test-lab/mithril-aggregator-fake \
30+
mithril-test-lab/mithril-end-to-end
1331
GOALS := $(or $(MAKECMDGOALS),all)
1432
NON_COMPONENT_GOALS := check-format format
1533

README.md

Lines changed: 6 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -80,7 +80,10 @@ This repository consists of the following parts:
8080
- [**Mithril signer**](./mithril-signer): the node of the **Mithril network** responsible for producing individual signatures that are collected and aggregated by the **Mithril aggregator**.
8181

8282
- [**Internal**](./internal): the shared tools and API used by **Mithril** crates.
83-
- [**Mithril aggregator client**](./internal/mithril-aggregator-client): a client to request data from a Mithril Aggregator, used by **Mithril network** nodes and client library.
83+
84+
- [**Mithril aggregator client**](./internal/mithril-aggregator-client): a client to request data from a Mithril aggregator, used by **Mithril network** nodes and client library.
85+
86+
- [**Mithril aggregator discovery**](./internal/mithril-aggregator-discovery): mechanisms to discover available Mithril aggregator, used by **Mithril network** nodes and client library.
8487

8588
- [**Mithril build script**](./internal/mithril-build-script): a toolbox for Mithril crates that uses a build script phase.
8689

@@ -113,11 +116,13 @@ This repository consists of the following parts:
113116
- [**Mithril signed entity prealoader**](./internal/signed-entity/mithril-signed-entity-preloader): a **preload** mechanism for the Cardano transaction signed entity, used by **Mithril network** nodes.
114117

115118
- [**tests**](./internal/tests): shared testing tools used by **Mithril** crates.
119+
116120
- [**Mithril api spec**](./internal/tests/mithril-api-spec): toolset to verify conformity of http routes against an Open Api specification, used by **Mithril network** nodes.
117121

118122
- [**Mithril test http server**](internal/tests/mithril-test-http-server): provides a test http server, used by **Mithril network** nodes.
119123

120124
- [**Mithril test lab**](./mithril-test-lab): the suite of tools that allow us to test and stress the **Mithril** protocol implementations.
125+
121126
- [**Mithril devnet**](./mithril-test-lab/mithril-devnet): the private **Mithril/Cardano network** used to scaffold a **Mithril network** on top of a **Cardano network**.
122127

123128
- [**Mithril end to end**](./mithril-test-lab/mithril-end-to-end): the tool used to run test scenarios against a **Mithril devnet**.
Lines changed: 30 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,30 @@
1+
[package]
2+
name = "mithril-aggregator-discovery"
3+
description = "Mechanisms to discover aggregator available in a Mithril network."
4+
version = "0.1.0"
5+
authors.workspace = true
6+
documentation.workspace = true
7+
edition.workspace = true
8+
homepage.workspace = true
9+
license.workspace = true
10+
repository.workspace = true
11+
include = ["**/*.rs", "Cargo.toml", "README.md", ".gitignore"]
12+
13+
[lib]
14+
crate-type = ["lib", "cdylib", "staticlib"]
15+
16+
[dependencies]
17+
anyhow = { workspace = true }
18+
async-trait = { workspace = true }
19+
mithril-common = { path = "../../mithril-common" }
20+
serde = { workspace = true }
21+
slog = { workspace = true }
22+
slog-scope = "4.4.0"
23+
thiserror = { workspace = true }
24+
tokio = { workspace = true, features = ["sync"] }
25+
26+
[dev-dependencies]
27+
mockall = { workspace = true }
28+
slog-async = { workspace = true }
29+
slog-term = { workspace = true }
30+
tokio = { workspace = true, features = ["macros"] }
Lines changed: 19 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,19 @@
1+
.PHONY: all build test check doc
2+
3+
CARGO = cargo
4+
5+
all: test build
6+
7+
build:
8+
${CARGO} build --release
9+
10+
test:
11+
${CARGO} test
12+
13+
check:
14+
${CARGO} check --release --all-features --all-targets
15+
${CARGO} clippy --release --all-features --all-targets
16+
${CARGO} fmt --check
17+
18+
doc:
19+
${CARGO} doc --no-deps --open
Lines changed: 3 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,3 @@
1+
# Mithril-aggregator-discovery
2+
3+
This crate provides mechanisms to discover aggregators in a Mithril network.
Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,2 @@
1+
#![warn(missing_docs)]
2+
//! This crate provides mechanisms to discover aggregators in a Mithril network.

0 commit comments

Comments
 (0)