Skip to content

Commit 65a5b51

Browse files
committed
refactor: transfert http compression features to the aggregator client crate
Not enabled by default on the crate, but enabled in the signer and the aggregator (to keep existing behavior)
1 parent c939b71 commit 65a5b51

File tree

3 files changed

+11
-18
lines changed

3 files changed

+11
-18
lines changed

internal/mithril-aggregator-client/Cargo.toml

Lines changed: 6 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -13,6 +13,12 @@ include = ["**/*.rs", "Cargo.toml", "README.md"]
1313
[lib]
1414
crate-type = ["lib", "cdylib", "staticlib"]
1515

16+
[features]
17+
default = []
18+
19+
# Support compressed traffic with `reqwest`
20+
enable-http-compression = ["reqwest/gzip", "reqwest/zstd", "reqwest/deflate", "reqwest/brotli"]
21+
1622
[dependencies]
1723
anyhow = { workspace = true }
1824
async-trait = { workspace = true }

mithril-aggregator/Cargo.toml

Lines changed: 2 additions & 8 deletions
Original file line numberDiff line numberDiff line change
@@ -26,7 +26,7 @@ flate2 = "1.1.4"
2626
gcloud-kms = { version = "1.3.1", features = ["auth"] }
2727
gcloud-storage = { version = "1.1.1", features = ["auth"] }
2828
hex = { workspace = true }
29-
mithril-aggregator-client = { path = "../internal/mithril-aggregator-client" }
29+
mithril-aggregator-client = { path = "../internal/mithril-aggregator-client", features = ["enable-http-compression"] }
3030
mithril-cardano-node-chain = { path = "../internal/cardano-node/mithril-cardano-node-chain" }
3131
mithril-cardano-node-internal-database = { path = "../internal/cardano-node/mithril-cardano-node-internal-database" }
3232
mithril-cli-helper = { path = "../internal/mithril-cli-helper" }
@@ -44,13 +44,7 @@ paste = "1.0.15"
4444
percent-encoding = "2.3.2"
4545
rayon = { workspace = true }
4646
regex = "1.12.2"
47-
reqwest = { workspace = true, features = [
48-
"default",
49-
"gzip",
50-
"zstd",
51-
"deflate",
52-
"brotli"
53-
] }
47+
reqwest = { workspace = true, features = ["default"] }
5448
semver = { workspace = true }
5549
serde = { workspace = true }
5650
serde_json = { workspace = true }

mithril-signer/Cargo.toml

Lines changed: 3 additions & 10 deletions
Original file line numberDiff line numberDiff line change
@@ -10,7 +10,7 @@ license = { workspace = true }
1010
repository = { workspace = true }
1111

1212
[package.metadata.cargo-machete]
13-
# reqwest is needed to enable compression features since parent crates don't enables them
13+
# reqwest is needed to enable its default features that we disable in the workspace (for http2 and tsl support)
1414
ignored = ["reqwest"]
1515

1616
[features]
@@ -27,7 +27,7 @@ chrono = { workspace = true }
2727
clap = { workspace = true }
2828
config = { workspace = true }
2929
hex = { workspace = true }
30-
mithril-aggregator-client = { path = "../internal/mithril-aggregator-client" }
30+
mithril-aggregator-client = { path = "../internal/mithril-aggregator-client", features = ["enable-http-compression"] }
3131
mithril-cardano-node-chain = { path = "../internal/cardano-node/mithril-cardano-node-chain" }
3232
mithril-cardano-node-internal-database = { path = "../internal/cardano-node/mithril-cardano-node-internal-database" }
3333
mithril-cli-helper = { path = "../internal/mithril-cli-helper" }
@@ -42,14 +42,7 @@ mithril-signed-entity-lock = { path = "../internal/signed-entity/mithril-signed-
4242
mithril-signed-entity-preloader = { path = "../internal/signed-entity/mithril-signed-entity-preloader" }
4343
mithril-ticker = { path = "../internal/mithril-ticker" }
4444
rand_core = { workspace = true }
45-
reqwest = { workspace = true, features = [
46-
"default",
47-
"stream",
48-
"gzip",
49-
"zstd",
50-
"deflate",
51-
"brotli"
52-
] }
45+
reqwest = { workspace = true, features = ["default"] }
5346
serde = { workspace = true }
5447
serde_json = { workspace = true }
5548
slog = { workspace = true, features = [

0 commit comments

Comments
 (0)