Repository navigation
Closed
Labels
dependenciesDependabot: a dependency updatekind:choreCleanup, dependencies, tooling or release work; no user-visible changerustDependabot: a Cargo update; use area: labels for Rust code otherwise
Description
Problem
Every client build (decdn-cli, the decdn-client SDK, and the Android/iOS demos on top of it) compiles and links two complete crypto libraries, plus server code it never runs.
- aws-lc (
aws-lc-sys→aws-lc-rs). rustls uses it only for the HTTPS JSON-RPC calls to the chain. It arrives two ways:- alloy's default features turn on
reqwest-rustls-tls, which in reqwest 0.13 means rustls on aws-lc-rs (decdn-client→alloydefault →reqwest-rustls-tls→hyper-rustls/aws-lc-rs). - the workspace's own
reqwest = { features = ["rustls", …] }(Cargo.toml) does the same.
- alloy's default features turn on
- ring. iroh's QUIC stack (
noq-proto) already usesring, so the client always ships it too. - The JSON-RPC server.
decdn-commonenablesjsonrpsee'sserverfeature (the node's admin RPC), sojsonrpsee-serverlands in the client SDK as well.
Check on main:
cargo tree -p decdn-client -e normal -i aws-lc-sys
cargo tree -p decdn-client -e features -i jsonrpsee-serverCost: a larger binary (several MB per target), a C build of aws-lc in every client build (slow, and a cross-compile risk on Android and iOS), and two TLS backends to audit. Found while building the mobile demos (decdn/android-demo, decdn/ios-demo).
Fix
- One TLS backend in clients: ring.
- Workspace
alloy:default-features = false, keeping the features in use (providers,signers,signer-keystore,contract, andreqwestwithout its TLS provider). - Workspace
reqwest:rustls-no-providerin place ofrustls. - With only rustls's
ringfeature compiled in, rustls picks ring on its own. Where a crate builds its ownClientConfig, userustls::crypto::ring::default_provider()explicitly. - Scope: the client graph. The node may keep aws-lc if
aws-sdk-s3needs it.
- Workspace
- JSON-RPC server out of the client. Move
jsonrpsee'sserverfeature off the workspace dependency and onto the crate that serves the admin RPC (decdn-node).decdn-commonkeeps only the parts the client needs (types,http-client, macros), or puts the server half behind a feature onlydecdn-nodeenables. - Keep it fixed. Add both to the closure checks in
.github/scripts/check_crate_edges.py, which already forbidsiroh-blobsand the AWS SDK in thedecdn-cli/decdn-clientclosures: forbidaws-lc-sysandjsonrpsee-serverthere too.
Done when
cargo tree -p decdn-client -i aws-lc-sysandcargo tree -p decdn-cli -i aws-lc-sysfind nothing.cargo tree -p decdn-client -e features -i jsonrpsee-serverfinds nothing.- The crate-edges check fails if either comes back.
- Chain reads over HTTPS still work (the anvil e2e tests use plain http, so check against the Arbitrum Sepolia RPC by hand or with a smoke test).
🤖 Generated with Claude Code
Metadata
Metadata
Assignees
Labels
dependenciesDependabot: a dependency updatekind:choreCleanup, dependencies, tooling or release work; no user-visible changerustDependabot: a Cargo update; use area: labels for Rust code otherwise
Type
Fields
Priority
None yet
Projects
- StatusShow more project fieldsDone
Activity
test(e2e): install the rustls provider in the broadcast-lane straggle…