Skip to content

Commit 7241ae1

Browse files
authored
fix(tee_prover): add zstd compression (#3144)
## What ❔ Add zstd compression for the HTTP connection between `proof_data_handler` and `zksync_tee_prover`. ## Why ❔ This enables faster intercloud communication. ## Checklist <!-- Check your PR fulfills the following items. --> <!-- For draft PRs check the boxes as you complete them. --> - [x] PR title corresponds to the body of PR (we generate changelog entries from PRs). - [ ] Tests for the changes have been added / updated. - [ ] Documentation comments have been added / updated. - [x] Code has been formatted via `zkstack dev fmt` and `zkstack dev lint`. --------- Signed-off-by: Harald Hoyer <harald@matterlabs.dev>
1 parent 7c28964 commit 7241ae1

File tree

4 files changed

+41
-1
lines changed

4 files changed

+41
-1
lines changed

Cargo.lock

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

core/bin/zksync_tee_prover/Cargo.toml

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -15,7 +15,7 @@ publish = false
1515
anyhow.workspace = true
1616
async-trait.workspace = true
1717
envy.workspace = true
18-
reqwest.workspace = true
18+
reqwest = { workspace = true, features = ["zstd"] }
1919
secp256k1 = { workspace = true, features = ["serde"] }
2020
serde = { workspace = true, features = ["derive"] }
2121
thiserror.workspace = true

core/node/proof_data_handler/Cargo.toml

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -22,6 +22,7 @@ zksync_utils.workspace = true
2222
anyhow.workspace = true
2323
axum.workspace = true
2424
tokio.workspace = true
25+
tower-http = { workspace = true, features = ["compression-zstd", "decompression-zstd"] }
2526
tracing.workspace = true
2627

2728
[dev-dependencies]

core/node/proof_data_handler/src/lib.rs

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -139,4 +139,6 @@ fn create_proof_processing_router(
139139
}
140140

141141
router
142+
.layer(tower_http::compression::CompressionLayer::new())
143+
.layer(tower_http::decompression::RequestDecompressionLayer::new().zstd(true))
142144
}

0 commit comments

Comments
 (0)