From 48580a840227d9b21e625c24b7754ce10afbf530 Mon Sep 17 00:00:00 2001 From: "dependabot[bot]" <49699333+dependabot[bot]@users.noreply.github.com> Date: Tue, 16 Jul 2024 23:44:41 +0000 Subject: [PATCH 01/15] build(deps): bump the prod group across 1 directory with 15 updates Bumps the prod group with 15 updates in the / directory: | Package | From | To | | --- | --- | --- | | [clap](https://github.com/clap-rs/clap) | `4.5.8` | `4.5.9` | | [tokio](https://github.com/tokio-rs/tokio) | `1.38.0` | `1.38.1` | | [tinyvec](https://github.com/Lokathor/tinyvec) | `1.7.0` | `1.8.0` | | [thiserror](https://github.com/dtolnay/thiserror) | `1.0.61` | `1.0.62` | | [inferno](https://github.com/jonhoo/inferno) | `0.11.19` | `0.11.20` | | [hyper](https://github.com/hyperium/hyper) | `0.14.29` | `1.3.1` | | [metrics-exporter-prometheus](https://github.com/metrics-rs/metrics) | `0.15.1` | `0.15.3` | | [prost](https://github.com/tokio-rs/prost) | `0.12.6` | `0.13.1` | | [tonic](https://github.com/hyperium/tonic) | `0.11.0` | `0.12.0` | | [vergen](https://github.com/rustyhorde/vergen) | `8.3.1` | `8.3.2` | | [tonic-build](https://github.com/hyperium/tonic) | `0.11.0` | `0.12.0` | | [serde_with](https://github.com/jonasbb/serde_with) | `3.8.3` | `3.9.0` | | [bytes](https://github.com/tokio-rs/bytes) | `1.6.0` | `1.6.1` | | [tonic-reflection](https://github.com/hyperium/tonic) | `0.11.0` | `0.12.0` | | [syn](https://github.com/dtolnay/syn) | `2.0.69` | `2.0.71` | Updates `clap` from 4.5.8 to 4.5.9 - [Release notes](https://github.com/clap-rs/clap/releases) - [Changelog](https://github.com/clap-rs/clap/blob/master/CHANGELOG.md) - [Commits](https://github.com/clap-rs/clap/compare/clap_complete-v4.5.8...v4.5.9) Updates `tokio` from 1.38.0 to 1.38.1 - [Release notes](https://github.com/tokio-rs/tokio/releases) - [Commits](https://github.com/tokio-rs/tokio/compare/tokio-1.38.0...tokio-1.38.1) Updates `tinyvec` from 1.7.0 to 1.8.0 - [Changelog](https://github.com/Lokathor/tinyvec/blob/main/CHANGELOG.md) - [Commits](https://github.com/Lokathor/tinyvec/compare/v1.7.0...v1.8.0) Updates `thiserror` from 1.0.61 to 1.0.62 - [Release notes](https://github.com/dtolnay/thiserror/releases) - [Commits](https://github.com/dtolnay/thiserror/compare/1.0.61...1.0.62) Updates `inferno` from 0.11.19 to 0.11.20 - [Changelog](https://github.com/jonhoo/inferno/blob/main/CHANGELOG.md) - [Commits](https://github.com/jonhoo/inferno/compare/v0.11.19...v0.11.20) Updates `hyper` from 0.14.29 to 1.3.1 - [Release notes](https://github.com/hyperium/hyper/releases) - [Changelog](https://github.com/hyperium/hyper/blob/master/CHANGELOG.md) - [Commits](https://github.com/hyperium/hyper/compare/v0.14.29...v1.3.1) Updates `metrics-exporter-prometheus` from 0.15.1 to 0.15.3 - [Changelog](https://github.com/metrics-rs/metrics/blob/main/release.toml) - [Commits](https://github.com/metrics-rs/metrics/compare/metrics-exporter-prometheus-v0.15.1...metrics-exporter-prometheus-v0.15.3) Updates `prost` from 0.12.6 to 0.13.1 - [Release notes](https://github.com/tokio-rs/prost/releases) - [Changelog](https://github.com/tokio-rs/prost/blob/master/CHANGELOG.md) - [Commits](https://github.com/tokio-rs/prost/compare/v0.12.6...v0.13.1) Updates `tonic` from 0.11.0 to 0.12.0 - [Release notes](https://github.com/hyperium/tonic/releases) - [Changelog](https://github.com/hyperium/tonic/blob/master/CHANGELOG.md) - [Commits](https://github.com/hyperium/tonic/compare/v0.11.0...v0.12.0) Updates `vergen` from 8.3.1 to 8.3.2 - [Release notes](https://github.com/rustyhorde/vergen/releases) - [Commits](https://github.com/rustyhorde/vergen/commits) Updates `tonic-build` from 0.11.0 to 0.12.0 - [Release notes](https://github.com/hyperium/tonic/releases) - [Changelog](https://github.com/hyperium/tonic/blob/master/CHANGELOG.md) - [Commits](https://github.com/hyperium/tonic/compare/v0.11.0...v0.12.0) Updates `serde_with` from 3.8.3 to 3.9.0 - [Release notes](https://github.com/jonasbb/serde_with/releases) - [Commits](https://github.com/jonasbb/serde_with/compare/v3.8.3...v3.9.0) Updates `bytes` from 1.6.0 to 1.6.1 - [Release notes](https://github.com/tokio-rs/bytes/releases) - [Changelog](https://github.com/tokio-rs/bytes/blob/master/CHANGELOG.md) - [Commits](https://github.com/tokio-rs/bytes/compare/v1.6.0...v1.6.1) Updates `tonic-reflection` from 0.11.0 to 0.12.0 - [Release notes](https://github.com/hyperium/tonic/releases) - [Changelog](https://github.com/hyperium/tonic/blob/master/CHANGELOG.md) - [Commits](https://github.com/hyperium/tonic/compare/v0.11.0...v0.12.0) Updates `syn` from 2.0.69 to 2.0.71 - [Release notes](https://github.com/dtolnay/syn/releases) - [Commits](https://github.com/dtolnay/syn/compare/2.0.69...2.0.71) --- updated-dependencies: - dependency-name: clap dependency-type: direct:production update-type: version-update:semver-patch dependency-group: prod - dependency-name: tokio dependency-type: direct:production update-type: version-update:semver-patch dependency-group: prod - dependency-name: tinyvec dependency-type: direct:production update-type: version-update:semver-minor dependency-group: prod - dependency-name: thiserror dependency-type: direct:production update-type: version-update:semver-patch dependency-group: prod - dependency-name: inferno dependency-type: direct:production update-type: version-update:semver-patch dependency-group: prod - dependency-name: hyper dependency-type: direct:production update-type: version-update:semver-major dependency-group: prod - dependency-name: metrics-exporter-prometheus dependency-type: direct:production update-type: version-update:semver-patch dependency-group: prod - dependency-name: prost dependency-type: direct:production update-type: version-update:semver-minor dependency-group: prod - dependency-name: tonic dependency-type: direct:production update-type: version-update:semver-minor dependency-group: prod - dependency-name: vergen dependency-type: direct:production update-type: version-update:semver-patch dependency-group: prod - dependency-name: tonic-build dependency-type: direct:production update-type: version-update:semver-minor dependency-group: prod - dependency-name: serde_with dependency-type: direct:production update-type: version-update:semver-minor dependency-group: prod - dependency-name: bytes dependency-type: direct:production update-type: version-update:semver-patch dependency-group: prod - dependency-name: tonic-reflection dependency-type: direct:production update-type: version-update:semver-minor dependency-group: prod - dependency-name: syn dependency-type: direct:production update-type: version-update:semver-patch dependency-group: prod ... Signed-off-by: dependabot[bot] --- Cargo.lock | 365 +++++++++++++++++++++++---------- tower-batch-control/Cargo.toml | 6 +- tower-fallback/Cargo.toml | 2 +- zebra-chain/Cargo.toml | 10 +- zebra-consensus/Cargo.toml | 8 +- zebra-grpc/Cargo.toml | 10 +- zebra-network/Cargo.toml | 8 +- zebra-node-services/Cargo.toml | 2 +- zebra-rpc/Cargo.toml | 16 +- zebra-scan/Cargo.toml | 6 +- zebra-script/Cargo.toml | 2 +- zebra-state/Cargo.toml | 8 +- zebra-test/Cargo.toml | 6 +- zebra-utils/Cargo.toml | 8 +- zebrad/Cargo.toml | 26 +-- 15 files changed, 316 insertions(+), 167 deletions(-) diff --git a/Cargo.lock b/Cargo.lock index 2299b84a229..e81fd608931 100644 --- a/Cargo.lock +++ b/Cargo.lock @@ -12,7 +12,7 @@ dependencies = [ "arc-swap", "backtrace", "canonical-path", - "clap 4.5.8", + "clap 4.5.9", "color-eyre", "fs-err", "once_cell", @@ -240,7 +240,7 @@ checksum = "16e62a023e7c117e27523144c5d2459f4397fcc3cab0085af8e2224f643a0193" dependencies = [ "proc-macro2", "quote", - "syn 2.0.69", + "syn 2.0.71", ] [[package]] @@ -251,7 +251,7 @@ checksum = "c6fa2087f2753a7da8cc1c0dbfcf89579dd57458e36769de5ac750b4671737ca" dependencies = [ "proc-macro2", "quote", - "syn 2.0.69", + "syn 2.0.71", ] [[package]] @@ -284,13 +284,13 @@ source = "registry+https://github.com/rust-lang/crates.io-index" checksum = "3b829e4e32b91e643de6eafe82b1d90675f5874230191a4ffbc1b336dec4d6bf" dependencies = [ "async-trait", - "axum-core", + "axum-core 0.3.4", "bitflags 1.3.2", "bytes", "futures-util", "http 0.2.12", "http-body 0.4.6", - "hyper 0.14.29", + "hyper 0.14.30", "itoa", "matchit", "memchr", @@ -299,7 +299,34 @@ dependencies = [ "pin-project-lite", "rustversion", "serde", - "sync_wrapper", + "sync_wrapper 0.1.2", + "tower", + "tower-layer", + "tower-service", +] + +[[package]] +name = "axum" +version = "0.7.5" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "3a6c9af12842a67734c9a2e355436e5d03b22383ed60cf13cd0c18fbfe3dcbcf" +dependencies = [ + "async-trait", + "axum-core 0.4.3", + "bytes", + "futures-util", + "http 1.1.0", + "http-body 1.0.0", + "http-body-util", + "itoa", + "matchit", + "memchr", + "mime", + "percent-encoding", + "pin-project-lite", + "rustversion", + "serde", + "sync_wrapper 1.0.1", "tower", "tower-layer", "tower-service", @@ -322,6 +349,26 @@ dependencies = [ "tower-service", ] +[[package]] +name = "axum-core" +version = "0.4.3" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "a15c63fd72d41492dc4f497196f5da1fb04fb7529e631d73630d1b491e47a2e3" +dependencies = [ + "async-trait", + "bytes", + "futures-util", + "http 1.1.0", + "http-body 1.0.0", + "http-body-util", + "mime", + "pin-project-lite", + "rustversion", + "sync_wrapper 0.1.2", + "tower-layer", + "tower-service", +] + [[package]] name = "backtrace" version = "0.3.71" @@ -422,7 +469,7 @@ dependencies = [ "regex", "rustc-hash", "shlex", - "syn 2.0.69", + "syn 2.0.71", "which", ] @@ -588,9 +635,9 @@ checksum = "1fd0f2584146f6f2ef48085050886acf353beff7305ebd1ae69500e27c67f64b" [[package]] name = "bytes" -version = "1.6.0" +version = "1.6.1" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "514de17de45fdb8dc022b1a7975556c53c86f9f0aa5f534b98977b171857c2c9" +checksum = "a12916984aab3fa6e39d655a33e09c0071eb36d6ab3aea5c2d78551f1df6d952" [[package]] name = "bzip2-sys" @@ -791,9 +838,9 @@ dependencies = [ [[package]] name = "clap" -version = "4.5.8" +version = "4.5.9" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "84b3edb18336f4df585bc9aa31dd99c036dfa5dc5e9a2939a722a188f3a8970d" +checksum = "64acc1846d54c1fe936a78dc189c34e28d3f5afc348403f28ecf53660b9b8462" dependencies = [ "clap_builder", "clap_derive", @@ -801,9 +848,9 @@ dependencies = [ [[package]] name = "clap_builder" -version = "4.5.8" +version = "4.5.9" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "c1c09dd5ada6c6c78075d6fd0da3f90d8080651e2d6cc8eb2f1aaa4034ced708" +checksum = "6fb8393d67ba2e7bfaf28a23458e4e2b543cc73a99595511eb207fdb8aede942" dependencies = [ "anstream", "anstyle", @@ -820,7 +867,7 @@ dependencies = [ "heck 0.5.0", "proc-macro2", "quote", - "syn 2.0.69", + "syn 2.0.71", ] [[package]] @@ -883,9 +930,9 @@ source = "registry+https://github.com/rust-lang/crates.io-index" checksum = "a257c22cd7e487dd4a13d413beabc512c5052f0bc048db0da6a84c3d8a6142fd" dependencies = [ "futures-core", - "prost", - "prost-types", - "tonic", + "prost 0.12.6", + "prost-types 0.12.6", + "tonic 0.11.0", "tracing-core", ] @@ -901,14 +948,14 @@ dependencies = [ "futures-task", "hdrhistogram", "humantime", - "prost", - "prost-types", + "prost 0.12.6", + "prost-types 0.12.6", "serde", "serde_json", "thread_local", "tokio", "tokio-stream", - "tonic", + "tonic 0.11.0", "tracing", "tracing-core", "tracing-subscriber", @@ -969,7 +1016,7 @@ dependencies = [ "anes", "cast", "ciborium", - "clap 4.5.8", + "clap 4.5.9", "criterion-plot", "is-terminal", "itertools 0.10.5", @@ -1071,7 +1118,7 @@ checksum = "f46882e17999c6cc590af592290432be3bce0428cb0d5f8b6715e4dc7b383eb3" dependencies = [ "proc-macro2", "quote", - "syn 2.0.69", + "syn 2.0.71", ] [[package]] @@ -1119,7 +1166,7 @@ dependencies = [ "proc-macro2", "quote", "strsim 0.11.1", - "syn 2.0.69", + "syn 2.0.71", ] [[package]] @@ -1141,7 +1188,7 @@ checksum = "733cabb43482b1a1b53eee8583c2b9e8684d592215ea83efd305dd31bc2f0178" dependencies = [ "darling_core 0.20.9", "quote", - "syn 2.0.69", + "syn 2.0.71", ] [[package]] @@ -1508,7 +1555,7 @@ checksum = "87750cf4b7a4c0625b1529e4c543c2182106e4dedc60a2a6455e00d212c489ac" dependencies = [ "proc-macro2", "quote", - "syn 2.0.69", + "syn 2.0.71", ] [[package]] @@ -1583,9 +1630,9 @@ checksum = "4271d37baee1b8c7e4b708028c57d816cf9d2434acb33a549475f78c181f6253" [[package]] name = "git2" -version = "0.18.3" +version = "0.19.0" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "232e6a7bfe35766bf715e55a88b39a700596c0ccfd88cd3680b4cdb40d66ef70" +checksum = "b903b73e45dc0c6c596f2d37eccece7c1c8bb6e4407b001096387c63d0d93724" dependencies = [ "bitflags 2.6.0", "libc", @@ -1932,9 +1979,9 @@ dependencies = [ [[package]] name = "hyper" -version = "0.14.29" +version = "0.14.30" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "f361cde2f109281a220d4307746cdfd5ee3f410da58a70377762396775634b33" +checksum = "a152ddd61dfaec7273fe8419ab357f33aee0d914c5f4efbf0d96fa749eea5ec9" dependencies = [ "bytes", "futures-channel", @@ -1983,7 +2030,7 @@ checksum = "ec3efd23720e2049821a693cbc7e65ea87c72f1c58ff2f9522ff332b1491e590" dependencies = [ "futures-util", "http 0.2.12", - "hyper 0.14.29", + "hyper 0.14.30", "rustls", "tokio", "tokio-rustls", @@ -1995,12 +2042,25 @@ version = "0.4.1" source = "registry+https://github.com/rust-lang/crates.io-index" checksum = "bbb958482e8c7be4bc3cf272a766a2b0bf1a6755e7a6ae777f017a31d11b13b1" dependencies = [ - "hyper 0.14.29", + "hyper 0.14.30", "pin-project-lite", "tokio", "tokio-io-timeout", ] +[[package]] +name = "hyper-timeout" +version = "0.5.1" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "3203a961e5c83b6f5498933e78b6b263e208c197b63e9c6c53cc82ffd3f63793" +dependencies = [ + "hyper 1.3.1", + "hyper-util", + "pin-project-lite", + "tokio", + "tower-service", +] + [[package]] name = "hyper-util" version = "0.1.5" @@ -2132,9 +2192,9 @@ dependencies = [ [[package]] name = "inferno" -version = "0.11.19" +version = "0.11.20" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "321f0f839cd44a4686e9504b0a62b4d69a50b62072144c71c68f5873c167b8d9" +checksum = "7c77a3ae7d4761b9c64d2c030f70746ceb8cfba32dce0325a56792e0a4816c31" dependencies = [ "ahash", "is-terminal", @@ -2300,7 +2360,7 @@ source = "registry+https://github.com/rust-lang/crates.io-index" checksum = "e1dea6e07251d9ce6a552abfb5d7ad6bc290a4596c8dcc3d795fae2bbdc1f3ff" dependencies = [ "futures", - "hyper 0.14.29", + "hyper 0.14.30", "jsonrpc-core", "jsonrpc-server-utils", "log", @@ -2373,9 +2433,9 @@ checksum = "97b3888a4aecf77e811145cadf6eef5901f4782c53886191b2f693f24761847c" [[package]] name = "libgit2-sys" -version = "0.16.2+1.7.2" +version = "0.17.0+1.8.1" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "ee4126d8b4ee5c9d9ea891dd875cfdc1e9d0950437179104b183d7d8a74d24e8" +checksum = "10472326a8a6477c3c20a64547b0059e4b0d086869eee31e6d7da728a8eb7224" dependencies = [ "cc", "libc", @@ -2532,9 +2592,9 @@ dependencies = [ [[package]] name = "metrics-exporter-prometheus" -version = "0.15.1" +version = "0.15.3" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "bf0af7a0d7ced10c0151f870e5e3f3f8bc9ffc5992d32873566ca1f9169ae776" +checksum = "b4f0c8427b39666bf970460908b213ec09b3b350f20c0c2eabcbba51704a08e6" dependencies = [ "base64 0.22.1", "http-body-util", @@ -2983,7 +3043,7 @@ dependencies = [ "pest_meta", "proc-macro2", "quote", - "syn 2.0.69", + "syn 2.0.71", ] [[package]] @@ -3024,7 +3084,7 @@ checksum = "2f38a4412a78282e09a2cf38d195ea5420d15ba0602cb375210efbc877243965" dependencies = [ "proc-macro2", "quote", - "syn 2.0.69", + "syn 2.0.71", ] [[package]] @@ -3119,7 +3179,7 @@ source = "registry+https://github.com/rust-lang/crates.io-index" checksum = "5f12335488a2f3b0a83b14edad48dca9879ce89b2edd10e80237e4e852dd645e" dependencies = [ "proc-macro2", - "syn 2.0.69", + "syn 2.0.71", ] [[package]] @@ -3212,7 +3272,7 @@ checksum = "6ff7ff745a347b87471d859a377a9a404361e7efc2a971d73424a6d183c0fc77" dependencies = [ "proc-macro2", "quote", - "syn 2.0.69", + "syn 2.0.71", ] [[package]] @@ -3222,7 +3282,17 @@ source = "registry+https://github.com/rust-lang/crates.io-index" checksum = "deb1435c188b76130da55f17a466d252ff7b1418b2ad3e037d127b94e3411f29" dependencies = [ "bytes", - "prost-derive", + "prost-derive 0.12.6", +] + +[[package]] +name = "prost" +version = "0.13.1" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "e13db3d3fde688c61e2446b4d843bc27a7e8af269a69440c0308021dc92333cc" +dependencies = [ + "bytes", + "prost-derive 0.13.1", ] [[package]] @@ -3239,10 +3309,31 @@ dependencies = [ "once_cell", "petgraph", "prettyplease", - "prost", - "prost-types", + "prost 0.12.6", + "prost-types 0.12.6", "regex", - "syn 2.0.69", + "syn 2.0.71", + "tempfile", +] + +[[package]] +name = "prost-build" +version = "0.13.1" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "5bb182580f71dd070f88d01ce3de9f4da5021db7115d2e1c3605a754153b77c1" +dependencies = [ + "bytes", + "heck 0.5.0", + "itertools 0.13.0", + "log", + "multimap", + "once_cell", + "petgraph", + "prettyplease", + "prost 0.13.1", + "prost-types 0.13.1", + "regex", + "syn 2.0.71", "tempfile", ] @@ -3256,7 +3347,20 @@ dependencies = [ "itertools 0.12.1", "proc-macro2", "quote", - "syn 2.0.69", + "syn 2.0.71", +] + +[[package]] +name = "prost-derive" +version = "0.13.1" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "18bec9b0adc4eba778b33684b7ba3e7137789434769ee3ce3930463ef904cfca" +dependencies = [ + "anyhow", + "itertools 0.13.0", + "proc-macro2", + "quote", + "syn 2.0.71", ] [[package]] @@ -3265,7 +3369,16 @@ version = "0.12.6" source = "registry+https://github.com/rust-lang/crates.io-index" checksum = "9091c90b0a32608e984ff2fa4091273cbdd755d54935c51d520887f4a1dbd5b0" dependencies = [ - "prost", + "prost 0.12.6", +] + +[[package]] +name = "prost-types" +version = "0.13.1" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "cee5168b05f49d4b0ca581206eb14a7b22fafd963efe729ac48eb03266e25cc2" +dependencies = [ + "prost 0.13.1", ] [[package]] @@ -3564,7 +3677,7 @@ dependencies = [ "h2 0.3.26", "http 0.2.12", "http-body 0.4.6", - "hyper 0.14.29", + "hyper 0.14.30", "hyper-rustls", "ipnet", "js-sys", @@ -3578,7 +3691,7 @@ dependencies = [ "serde", "serde_json", "serde_urlencoded", - "sync_wrapper", + "sync_wrapper 0.1.2", "system-configuration", "tokio", "tokio-rustls", @@ -3996,7 +4109,7 @@ checksum = "e0cd7e117be63d3c3678776753929474f3b04a43a080c744d6b0ae2a8c28e222" dependencies = [ "proc-macro2", "quote", - "syn 2.0.69", + "syn 2.0.71", ] [[package]] @@ -4044,9 +4157,9 @@ dependencies = [ [[package]] name = "serde_with" -version = "3.8.3" +version = "3.9.0" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "e73139bc5ec2d45e6c5fd85be5a46949c1c39a4c18e56915f5eb4c12f975e377" +checksum = "69cecfa94848272156ea67b2b1a53f20fc7bc638c4a46d2f8abde08f05f4b857" dependencies = [ "base64 0.22.1", "chrono", @@ -4056,7 +4169,7 @@ dependencies = [ "serde", "serde_derive", "serde_json", - "serde_with_macros 3.8.3", + "serde_with_macros 3.9.0", "time", ] @@ -4074,14 +4187,14 @@ dependencies = [ [[package]] name = "serde_with_macros" -version = "3.8.3" +version = "3.9.0" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "b80d3d6b56b64335c0180e5ffde23b3c5e08c14c585b51a15bd0e95393f46703" +checksum = "a8fee4991ef4f274617a51ad4af30519438dacb2f56ac773b08a1922ff743350" dependencies = [ "darling 0.20.9", "proc-macro2", "quote", - "syn 2.0.69", + "syn 2.0.71", ] [[package]] @@ -4310,9 +4423,9 @@ dependencies = [ [[package]] name = "syn" -version = "2.0.69" +version = "2.0.71" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "201fcda3845c23e8212cd466bfebf0bd20694490fc0356ae8e428e0824a915a6" +checksum = "b146dcf730474b4bcd16c311627b31ede9ab149045db4d6088b3becaea046462" dependencies = [ "proc-macro2", "quote", @@ -4325,6 +4438,12 @@ version = "0.1.2" source = "registry+https://github.com/rust-lang/crates.io-index" checksum = "2047c6ded9c721764247e62cd3b03c09ffc529b2ba5b10ec482ae507a4a70160" +[[package]] +name = "sync_wrapper" +version = "1.0.1" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "a7065abeca94b6a8a577f9bd45aa0867a2238b74e8eb67cf10d492bc39351394" + [[package]] name = "synstructure" version = "0.12.6" @@ -4396,22 +4515,22 @@ dependencies = [ [[package]] name = "thiserror" -version = "1.0.61" +version = "1.0.62" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "c546c80d6be4bc6a00c0f01730c08df82eaa7a7a61f11d656526506112cc1709" +checksum = "f2675633b1499176c2dff06b0856a27976a8f9d436737b4cf4f312d4d91d8bbb" dependencies = [ "thiserror-impl", ] [[package]] name = "thiserror-impl" -version = "1.0.61" +version = "1.0.62" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "46c3384250002a6d5af4d114f2845d37b57521033f30d5c3f46c4d70e1197533" +checksum = "d20468752b09f49e909e55a5d338caa8bedf615594e9d80bc4c565d30faf798c" dependencies = [ "proc-macro2", "quote", - "syn 2.0.69", + "syn 2.0.71", ] [[package]] @@ -4483,9 +4602,9 @@ dependencies = [ [[package]] name = "tinyvec" -version = "1.7.0" +version = "1.8.0" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "ce6b6a2fb3a985e99cebfaefa9faa3024743da73304ca1c683a36429613d3d22" +checksum = "445e881f4f6d382d5f27c034e25eb92edd7c784ceab92a0937db7f2e9471b938" dependencies = [ "tinyvec_macros", ] @@ -4498,9 +4617,9 @@ checksum = "1f3ccbac311fea05f86f61904b462b55fb3df8837a366dfc601a0161d0532f20" [[package]] name = "tokio" -version = "1.38.0" +version = "1.38.1" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "ba4f4a02a7a80d6f274636f0aa95c7e383b912d41fe721a31f29e29698585a4a" +checksum = "eb2caba9f80616f438e09748d5acda951967e1ea58508ef53d9c6402485a46df" dependencies = [ "backtrace", "bytes", @@ -4534,7 +4653,7 @@ checksum = "5f5ae998a069d4b5aba8ee9dad856af7d520c3699e6159b185c2acd48155d39a" dependencies = [ "proc-macro2", "quote", - "syn 2.0.69", + "syn 2.0.71", ] [[package]] @@ -4661,17 +4780,47 @@ checksum = "76c4eb7a4e9ef9d4763600161f12f5070b92a578e1b634db88a6887844c91a13" dependencies = [ "async-stream", "async-trait", - "axum", + "axum 0.6.20", "base64 0.21.7", "bytes", "h2 0.3.26", "http 0.2.12", "http-body 0.4.6", - "hyper 0.14.29", - "hyper-timeout", + "hyper 0.14.30", + "hyper-timeout 0.4.1", "percent-encoding", "pin-project", - "prost", + "prost 0.12.6", + "tokio", + "tokio-stream", + "tower", + "tower-layer", + "tower-service", + "tracing", +] + +[[package]] +name = "tonic" +version = "0.12.0" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "f738b6a169a29bca4e39656db89c44a08e09c5b700b896ee9e7459f0652e81dd" +dependencies = [ + "async-stream", + "async-trait", + "axum 0.7.5", + "base64 0.22.1", + "bytes", + "h2 0.4.5", + "http 1.1.0", + "http-body 1.0.0", + "http-body-util", + "hyper 1.3.1", + "hyper-timeout 0.5.1", + "hyper-util", + "percent-encoding", + "pin-project", + "prost 0.13.1", + "socket2", "tokio", "tokio-stream", "tower", @@ -4688,35 +4837,35 @@ checksum = "9d021fc044c18582b9a2408cd0dd05b1596e3ecdb5c4df822bb0183545683889" dependencies = [ "prettyplease", "proc-macro2", - "prost-build", + "prost-build 0.12.6", "quote", - "syn 2.0.69", + "syn 2.0.71", ] [[package]] name = "tonic-build" -version = "0.11.0" +version = "0.12.0" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "be4ef6dd70a610078cb4e338a0f79d06bc759ff1b22d2120c2ff02ae264ba9c2" +checksum = "690943cc223adcdd67bb597a2e573ead1b88e999ba37528fe8e6356bf44b29b6" dependencies = [ "prettyplease", "proc-macro2", - "prost-build", + "prost-build 0.13.1", "quote", - "syn 2.0.69", + "syn 2.0.71", ] [[package]] name = "tonic-reflection" -version = "0.11.0" +version = "0.12.0" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "548c227bd5c0fae5925812c4ec6c66ffcfced23ea370cb823f4d18f0fc1cb6a7" +checksum = "87e0d3c6688e3b0be22d877b9c6ba86a7c5409e6b505ec8f7c99f026ae09530a" dependencies = [ - "prost", - "prost-types", + "prost 0.13.1", + "prost-types 0.13.1", "tokio", "tokio-stream", - "tonic", + "tonic 0.12.0", ] [[package]] @@ -4833,7 +4982,7 @@ checksum = "34704c8d6ebcbc939824180af020566b01a7c01f80641264eba0999f6c2b6be7" dependencies = [ "proc-macro2", "quote", - "syn 2.0.69", + "syn 2.0.71", ] [[package]] @@ -4946,7 +5095,7 @@ source = "registry+https://github.com/rust-lang/crates.io-index" checksum = "04659ddb06c87d233c566112c1c9c5b9e98256d9af50ec3bc9c8327f873a7568" dependencies = [ "quote", - "syn 2.0.69", + "syn 2.0.71", ] [[package]] @@ -5132,9 +5281,9 @@ checksum = "f1bddf1187be692e79c5ffeab891132dfb0f236ed36a43c7ed39f1165ee20191" [[package]] name = "vergen" -version = "8.3.1" +version = "8.3.2" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "e27d6bdd219887a9eadd19e1c34f32e47fa332301184935c6d9bca26f3cca525" +checksum = "2990d9ea5967266ea0ccf413a4aa5c42a93dbcfda9cb49a97de6931726b12566" dependencies = [ "anyhow", "cargo_metadata", @@ -5269,7 +5418,7 @@ dependencies = [ "once_cell", "proc-macro2", "quote", - "syn 2.0.69", + "syn 2.0.71", "wasm-bindgen-shared", ] @@ -5303,7 +5452,7 @@ checksum = "e94f17b526d0a461a191c78ea52bbce64071ed5c04c9ffe424dcb38f74171bb7" dependencies = [ "proc-macro2", "quote", - "syn 2.0.69", + "syn 2.0.71", "wasm-bindgen-backend", "wasm-bindgen-shared", ] @@ -5618,7 +5767,7 @@ dependencies = [ "nom", "nonempty", "percent-encoding", - "prost", + "prost 0.12.6", "rand_core 0.6.4", "rayon", "sapling-crypto", @@ -5832,7 +5981,7 @@ dependencies = [ "serde", "serde-big-array", "serde_json", - "serde_with 3.8.3", + "serde_with 3.9.0", "sha2", "spandoc", "static_assertions", @@ -5905,12 +6054,12 @@ dependencies = [ "color-eyre", "futures-util", "insta", - "prost", + "prost 0.13.1", "serde", "tokio", "tokio-stream", - "tonic", - "tonic-build 0.11.0", + "tonic 0.12.0", + "tonic-build 0.12.0", "tonic-reflection", "tower", "zcash_primitives", @@ -5981,22 +6130,22 @@ dependencies = [ "chrono", "futures", "hex", - "hyper 0.14.29", + "hyper 1.3.1", "indexmap 2.2.6", "insta", "jsonrpc-core", "jsonrpc-derive", "jsonrpc-http-server", "proptest", - "prost", + "prost 0.13.1", "rand 0.8.5", "serde", "serde_json", "thiserror", "tokio", "tokio-stream", - "tonic", - "tonic-build 0.11.0", + "tonic 0.12.0", + "tonic-build 0.12.0", "tonic-reflection", "tower", "tracing", @@ -6039,7 +6188,7 @@ dependencies = [ "tempfile", "tokio", "toml 0.8.14", - "tonic", + "tonic 0.12.0", "tower", "tracing", "tracing-subscriber", @@ -6158,7 +6307,7 @@ dependencies = [ "serde_json", "serde_yaml", "structopt", - "syn 2.0.69", + "syn 2.0.71", "thiserror", "tinyvec", "tokio", @@ -6179,7 +6328,7 @@ dependencies = [ "abscissa_core", "atty", "chrono", - "clap 4.5.8", + "clap 4.5.9", "color-eyre", "console-subscriber", "dirs", @@ -6188,7 +6337,7 @@ dependencies = [ "hex-literal", "howudoin", "humantime-serde", - "hyper 0.14.29", + "hyper 1.3.1", "indexmap 2.2.6", "indicatif", "inferno", @@ -6203,7 +6352,7 @@ dependencies = [ "pin-project", "proptest", "proptest-derive", - "prost", + "prost 0.13.1", "rand 0.8.5", "rayon", "regex", @@ -6218,8 +6367,8 @@ dependencies = [ "tokio", "tokio-stream", "toml 0.8.14", - "tonic", - "tonic-build 0.11.0", + "tonic 0.12.0", + "tonic-build 0.12.0", "tower", "tracing", "tracing-appender", @@ -6258,7 +6407,7 @@ checksum = "15e934569e47891f7d9411f1a451d947a60e000ab3bd24fbb970f000387d1b3b" dependencies = [ "proc-macro2", "quote", - "syn 2.0.69", + "syn 2.0.71", ] [[package]] @@ -6278,7 +6427,7 @@ checksum = "ce36e65b0d2999d2aafac989fb249189a141aee1f53c612c1f37d72631959f69" dependencies = [ "proc-macro2", "quote", - "syn 2.0.69", + "syn 2.0.71", ] [[package]] diff --git a/tower-batch-control/Cargo.toml b/tower-batch-control/Cargo.toml index 8ca541de65b..cfa46b7ddaf 100644 --- a/tower-batch-control/Cargo.toml +++ b/tower-batch-control/Cargo.toml @@ -26,7 +26,7 @@ futures = "0.3.30" futures-core = "0.3.28" pin-project = "1.1.5" rayon = "1.10.0" -tokio = { version = "1.37.0", features = ["time", "sync", "tracing", "macros"] } +tokio = { version = "1.38.1", features = ["time", "sync", "tracing", "macros"] } tokio-util = "0.7.11" tower = { version = "0.4.13", features = ["util", "buffer"] } tracing = "0.1.39" @@ -36,12 +36,12 @@ tracing-futures = "0.2.5" color-eyre = "0.6.3" # This is a transitive dependency via color-eyre. # Enable a feature that makes tinyvec compile much faster. -tinyvec = { version = "1.7.0", features = ["rustc_1_55"] } +tinyvec = { version = "1.8.0", features = ["rustc_1_55"] } ed25519-zebra = "4.0.3" rand = "0.8.5" -tokio = { version = "1.37.0", features = ["full", "tracing", "test-util"] } +tokio = { version = "1.38.1", features = ["full", "tracing", "test-util"] } tokio-test = "0.4.4" tower-fallback = { path = "../tower-fallback/", version = "0.2.41-beta.14" } tower-test = "0.4.0" diff --git a/tower-fallback/Cargo.toml b/tower-fallback/Cargo.toml index 15ee968bbbe..80bb1713c37 100644 --- a/tower-fallback/Cargo.toml +++ b/tower-fallback/Cargo.toml @@ -22,6 +22,6 @@ futures-core = "0.3.28" tracing = "0.1.39" [dev-dependencies] -tokio = { version = "1.37.0", features = ["full", "tracing", "test-util"] } +tokio = { version = "1.38.1", features = ["full", "tracing", "test-util"] } zebra-test = { path = "../zebra-test/", version = "1.0.0-beta.38" } diff --git a/zebra-chain/Cargo.toml b/zebra-chain/Cargo.toml index a99cb9928a6..b8f752b32ad 100644 --- a/zebra-chain/Cargo.toml +++ b/zebra-chain/Cargo.toml @@ -108,13 +108,13 @@ humantime = "2.1.0" # Error Handling & Formatting static_assertions = "1.1.0" -thiserror = "1.0.61" +thiserror = "1.0.62" tracing = "0.1.39" # Serialization hex = { version = "0.4.3", features = ["serde"] } serde = { version = "1.0.204", features = ["serde_derive", "rc"] } -serde_with = "3.8.3" +serde_with = "3.9.0" serde-big-array = "0.5.1" # Processing @@ -131,7 +131,7 @@ reddsa = "0.5.1" serde_json = { version = "1.0.120", optional = true } # Production feature async-error and testing feature proptest-impl -tokio = { version = "1.37.0", optional = true } +tokio = { version = "1.38.1", optional = true } # Experimental feature shielded-scan zcash_client_backend = { version = "0.12.1", optional = true } @@ -153,7 +153,7 @@ criterion = { version = "0.5.1", features = ["html_reports"] } color-eyre = "0.6.3" # This is a transitive dependency via color-eyre. # Enable a feature that makes tinyvec compile much faster. -tinyvec = { version = "1.7.0", features = ["rustc_1_55"] } +tinyvec = { version = "1.8.0", features = ["rustc_1_55"] } spandoc = "0.2.2" tracing = "0.1.39" @@ -164,7 +164,7 @@ proptest-derive = "0.5.0" rand = "0.8.5" rand_chacha = "0.3.1" -tokio = { version = "1.37.0", features = ["full", "tracing", "test-util"] } +tokio = { version = "1.38.1", features = ["full", "tracing", "test-util"] } zebra-test = { path = "../zebra-test/", version = "1.0.0-beta.38" } diff --git a/zebra-consensus/Cargo.toml b/zebra-consensus/Cargo.toml index e5a627184c0..772407fd198 100644 --- a/zebra-consensus/Cargo.toml +++ b/zebra-consensus/Cargo.toml @@ -51,8 +51,8 @@ serde = { version = "1.0.204", features = ["serde_derive"] } futures = "0.3.30" futures-util = "0.3.28" metrics = "0.23.0" -thiserror = "1.0.61" -tokio = { version = "1.37.0", features = ["time", "sync", "tracing", "rt-multi-thread"] } +thiserror = "1.0.62" +tokio = { version = "1.38.1", features = ["time", "sync", "tracing", "rt-multi-thread"] } tower = { version = "0.4.13", features = ["timeout", "util", "buffer"] } tracing = "0.1.39" tracing-futures = "0.2.5" @@ -82,7 +82,7 @@ proptest-derive = { version = "0.5.0", optional = true } color-eyre = "0.6.3" # This is a transitive dependency via color-eyre. # Enable a feature that makes tinyvec compile much faster. -tinyvec = { version = "1.7.0", features = ["rustc_1_55"] } +tinyvec = { version = "1.8.0", features = ["rustc_1_55"] } hex = "0.4.3" num-integer = "0.1.46" @@ -90,7 +90,7 @@ proptest = "1.4.0" proptest-derive = "0.5.0" spandoc = "0.2.2" -tokio = { version = "1.37.0", features = ["full", "tracing", "test-util"] } +tokio = { version = "1.38.1", features = ["full", "tracing", "test-util"] } tracing-error = "0.2.0" tracing-subscriber = "0.3.18" diff --git a/zebra-grpc/Cargo.toml b/zebra-grpc/Cargo.toml index 6301122809e..2f4c8ef2a2c 100644 --- a/zebra-grpc/Cargo.toml +++ b/zebra-grpc/Cargo.toml @@ -17,11 +17,11 @@ categories = ["cryptography::cryptocurrencies"] [dependencies] futures-util = "0.3.28" -tonic = "0.11.0" -tonic-reflection = "0.11.0" -prost = "0.12.6" +tonic = "0.12.0" +tonic-reflection = "0.12.0" +prost = "0.13.1" serde = { version = "1.0.204", features = ["serde_derive"] } -tokio = { version = "1.37.0", features = ["macros", "rt-multi-thread"] } +tokio = { version = "1.38.1", features = ["macros", "rt-multi-thread"] } tokio-stream = "0.1.15" tower = { version = "0.4.13", features = ["util", "buffer"] } color-eyre = "0.6.3" @@ -32,7 +32,7 @@ zebra-node-services = { path = "../zebra-node-services", version = "1.0.0-beta.3 zebra-chain = { path = "../zebra-chain" , version = "1.0.0-beta.38" } [build-dependencies] -tonic-build = "0.11.0" +tonic-build = "0.12.0" [dev-dependencies] insta = { version = "1.39.0", features = ["redactions", "json", "ron"] } diff --git a/zebra-network/Cargo.toml b/zebra-network/Cargo.toml index 1d7b4ddde98..32e957dda02 100644 --- a/zebra-network/Cargo.toml +++ b/zebra-network/Cargo.toml @@ -42,7 +42,7 @@ proptest-impl = ["proptest", "proptest-derive", "zebra-chain/proptest-impl"] [dependencies] bitflags = "2.5.0" byteorder = "1.5.0" -bytes = "1.6.0" +bytes = "1.6.1" chrono = { version = "0.4.38", default-features = false, features = ["clock", "std"] } dirs = "5.0.1" hex = "0.4.3" @@ -58,10 +58,10 @@ rayon = "1.10.0" regex = "1.10.4" serde = { version = "1.0.204", features = ["serde_derive"] } tempfile = "3.10.1" -thiserror = "1.0.61" +thiserror = "1.0.62" futures = "0.3.30" -tokio = { version = "1.37.0", features = ["fs", "io-util", "net", "time", "tracing", "macros", "rt-multi-thread"] } +tokio = { version = "1.38.1", features = ["fs", "io-util", "net", "time", "tracing", "macros", "rt-multi-thread"] } tokio-stream = { version = "0.1.15", features = ["sync", "time"] } tokio-util = { version = "0.7.11", features = ["codec"] } tower = { version = "0.4.13", features = ["retry", "discover", "load", "load-shed", "timeout", "util", "buffer"] } @@ -90,7 +90,7 @@ proptest = "1.4.0" proptest-derive = "0.5.0" static_assertions = "1.1.0" -tokio = { version = "1.37.0", features = ["full", "tracing", "test-util"] } +tokio = { version = "1.38.1", features = ["full", "tracing", "test-util"] } toml = "0.8.13" zebra-chain = { path = "../zebra-chain", features = ["proptest-impl"] } diff --git a/zebra-node-services/Cargo.toml b/zebra-node-services/Cargo.toml index bc59c8b136c..46b3bbc9e1e 100644 --- a/zebra-node-services/Cargo.toml +++ b/zebra-node-services/Cargo.toml @@ -48,7 +48,7 @@ jsonrpc-core = { version = "18.0.0", optional = true } reqwest = { version = "0.11.26", default-features = false, features = ["rustls-tls"], optional = true } serde = { version = "1.0.204", optional = true } serde_json = { version = "1.0.120", optional = true } -tokio = { version = "1.37.0", features = ["time"], optional = true } +tokio = { version = "1.38.1", features = ["time"], optional = true } [dev-dependencies] diff --git a/zebra-rpc/Cargo.toml b/zebra-rpc/Cargo.toml index 70ed43760b9..2ff01c2804f 100644 --- a/zebra-rpc/Cargo.toml +++ b/zebra-rpc/Cargo.toml @@ -61,7 +61,7 @@ chrono = { version = "0.4.38", default-features = false, features = [ futures = "0.3.30" # lightwalletd sends JSON-RPC requests over HTTP 1.1 -hyper = { version = "0.14.28", features = ["http1", "server"] } +hyper = { version = "1.3.1", features = ["http1", "server"] } jsonrpc-core = "18.0.0" jsonrpc-derive = "18.0.0" @@ -71,7 +71,7 @@ jsonrpc-http-server = "18.0.0" serde_json = { version = "1.0.120", features = ["preserve_order"] } indexmap = { version = "2.2.6", features = ["serde"] } -tokio = { version = "1.37.0", features = [ +tokio = { version = "1.38.1", features = [ "time", "rt-multi-thread", "macros", @@ -80,9 +80,9 @@ tokio = { version = "1.37.0", features = [ tower = "0.4.13" # indexer-rpcs dependencies -tonic = { version = "0.11.0", optional = true } -tonic-reflection = { version = "0.11.0", optional = true } -prost = { version = "0.12.6", optional = true } +tonic = { version = "0.12.0", optional = true } +tonic-reflection = { version = "0.12.0", optional = true } +prost = { version = "0.13.1", optional = true } tokio-stream = { version = "0.1.15", optional = true } tracing = "0.1.39" @@ -113,15 +113,15 @@ zebra-script = { path = "../zebra-script", version = "1.0.0-beta.38" } zebra-state = { path = "../zebra-state", version = "1.0.0-beta.38" } [build-dependencies] -tonic-build = { version = "0.11.0", optional = true } +tonic-build = { version = "0.12.0", optional = true } [dev-dependencies] insta = { version = "1.39.0", features = ["redactions", "json", "ron"] } proptest = "1.4.0" -thiserror = "1.0.61" -tokio = { version = "1.37.0", features = ["full", "tracing", "test-util"] } +thiserror = "1.0.62" +tokio = { version = "1.38.1", features = ["full", "tracing", "test-util"] } zebra-chain = { path = "../zebra-chain", version = "1.0.0-beta.38", features = [ "proptest-impl", diff --git a/zebra-scan/Cargo.toml b/zebra-scan/Cargo.toml index d8d44ba8604..eff90bb6606 100644 --- a/zebra-scan/Cargo.toml +++ b/zebra-scan/Cargo.toml @@ -65,7 +65,7 @@ indexmap = { version = "2.2.6", features = ["serde"] } itertools = "0.13.0" semver = "1.0.23" serde = { version = "1.0.204", features = ["serde_derive"] } -tokio = { version = "1.37.0", features = ["time"] } +tokio = { version = "1.38.1", features = ["time"] } tower = "0.4.13" tracing = "0.1.39" futures = "0.3.30" @@ -110,7 +110,7 @@ zebrad = { path = "../zebrad", version = "1.8.0" } [dev-dependencies] insta = { version = "1.39.0", features = ["ron", "redactions"] } -tokio = { version = "1.37.0", features = ["test-util"] } +tokio = { version = "1.38.1", features = ["test-util"] } proptest = "1.4.0" proptest-derive = "0.5.0" @@ -122,7 +122,7 @@ rand = "0.8.5" tempfile = "3.10.1" zcash_note_encryption = "0.4.0" toml = "0.8.13" -tonic = "0.11.0" +tonic = "0.12.0" zebra-state = { path = "../zebra-state", version = "1.0.0-beta.38", features = ["proptest-impl"] } zebra-test = { path = "../zebra-test", version = "1.0.0-beta.38" } diff --git a/zebra-script/Cargo.toml b/zebra-script/Cargo.toml index 08fb31a1f17..15f563df5e8 100644 --- a/zebra-script/Cargo.toml +++ b/zebra-script/Cargo.toml @@ -18,7 +18,7 @@ categories = ["api-bindings", "cryptography::cryptocurrencies"] zcash_script = "0.2.0" zebra-chain = { path = "../zebra-chain", version = "1.0.0-beta.38" } -thiserror = "1.0.61" +thiserror = "1.0.62" [dev-dependencies] hex = "0.4.3" diff --git a/zebra-state/Cargo.toml b/zebra-state/Cargo.toml index 6c32b2e246e..7e7360e4b03 100644 --- a/zebra-state/Cargo.toml +++ b/zebra-state/Cargo.toml @@ -65,10 +65,10 @@ rocksdb = { version = "0.22.0", default-features = false, features = ["lz4"] } semver = "1.0.23" serde = { version = "1.0.204", features = ["serde_derive"] } tempfile = "3.10.1" -thiserror = "1.0.61" +thiserror = "1.0.62" rayon = "1.10.0" -tokio = { version = "1.37.0", features = ["rt-multi-thread", "sync", "tracing"] } +tokio = { version = "1.38.1", features = ["rt-multi-thread", "sync", "tracing"] } tower = { version = "0.4.13", features = ["buffer", "util"] } tracing = "0.1.39" @@ -91,7 +91,7 @@ proptest-derive = { version = "0.5.0", optional = true } color-eyre = "0.6.3" # This is a transitive dependency via color-eyre. # Enable a feature that makes tinyvec compile much faster. -tinyvec = { version = "1.7.0", features = ["rustc_1_55"] } +tinyvec = { version = "1.8.0", features = ["rustc_1_55"] } once_cell = "1.18.0" spandoc = "0.2.2" @@ -106,7 +106,7 @@ rand = "0.8.5" halo2 = { package = "halo2_proofs", version = "0.3.0" } jubjub = "0.10.0" -tokio = { version = "1.37.0", features = ["full", "tracing", "test-util"] } +tokio = { version = "1.38.1", features = ["full", "tracing", "test-util"] } zebra-chain = { path = "../zebra-chain", version = "1.0.0-beta.38", features = ["proptest-impl"] } zebra-test = { path = "../zebra-test/", version = "1.0.0-beta.38" } diff --git a/zebra-test/Cargo.toml b/zebra-test/Cargo.toml index 3cf419332bf..b7f595f83b8 100644 --- a/zebra-test/Cargo.toml +++ b/zebra-test/Cargo.toml @@ -25,19 +25,19 @@ once_cell = "1.18.0" rand = "0.8.5" regex = "1.10.4" -tokio = { version = "1.37.0", features = ["full", "tracing", "test-util"] } +tokio = { version = "1.38.1", features = ["full", "tracing", "test-util"] } tower = { version = "0.4.13", features = ["util"] } futures = "0.3.30" color-eyre = "0.6.3" # This is a transitive dependency via color-eyre. # Enable a feature that makes tinyvec compile much faster. -tinyvec = { version = "1.7.0", features = ["rustc_1_55"] } +tinyvec = { version = "1.8.0", features = ["rustc_1_55"] } humantime = "2.1.0" owo-colors = "4.0.0" spandoc = "0.2.2" -thiserror = "1.0.61" +thiserror = "1.0.62" tracing-subscriber = { version = "0.3.18", features = ["env-filter"] } tracing-error = "0.2.0" diff --git a/zebra-utils/Cargo.toml b/zebra-utils/Cargo.toml index 3c3ddab00d0..a031c3192c5 100644 --- a/zebra-utils/Cargo.toml +++ b/zebra-utils/Cargo.toml @@ -85,14 +85,14 @@ openapi-generator = [ color-eyre = "0.6.3" # This is a transitive dependency via color-eyre. # Enable a feature that makes tinyvec compile much faster. -tinyvec = { version = "1.7.0", features = ["rustc_1_55"] } +tinyvec = { version = "1.8.0", features = ["rustc_1_55"] } structopt = "0.3.26" hex = "0.4.3" serde_json = "1.0.120" tracing-error = "0.2.0" tracing-subscriber = "0.3.18" -thiserror = "1.0.61" +thiserror = "1.0.62" zebra-node-services = { path = "../zebra-node-services", version = "1.0.0-beta.38" } zebra-chain = { path = "../zebra-chain", version = "1.0.0-beta.38" } @@ -109,7 +109,7 @@ regex = { version = "1.10.4", optional = true } reqwest = { version = "0.11.26", default-features = false, features = ["rustls-tls"], optional = true } # These crates are needed for the zebra-checkpoints and search-issue-refs binaries -tokio = { version = "1.37.0", features = ["full"], optional = true } +tokio = { version = "1.38.1", features = ["full"], optional = true } jsonrpc = { version = "0.18.0", optional = true } @@ -119,7 +119,7 @@ zcash_protocol = { version = "0.1.1" } # For the openapi generator rand = "0.8.5" -syn = { version = "2.0.69", features = ["full"], optional = true } +syn = { version = "2.0.71", features = ["full"], optional = true } quote = { version = "1.0.36", optional = true } serde_yaml = { version = "0.9.34+deprecated", optional = true } serde = { version = "1.0.204", features = ["serde_derive"], optional = true } diff --git a/zebrad/Cargo.toml b/zebrad/Cargo.toml index 548b12fd59a..d66cfde0717 100644 --- a/zebrad/Cargo.toml +++ b/zebrad/Cargo.toml @@ -168,7 +168,7 @@ zebra-state = { path = "../zebra-state", version = "1.0.0-beta.38" } zebra-utils = { path = "../zebra-utils", version = "1.0.0-beta.38", optional = true } abscissa_core = "0.7.0" -clap = { version = "4.5.8", features = ["cargo"] } +clap = { version = "4.5.9", features = ["cargo"] } chrono = { version = "0.4.38", default-features = false, features = ["clock", "std"] } humantime-serde = "1.1.1" indexmap = "2.2.6" @@ -179,7 +179,7 @@ toml = "0.8.13" futures = "0.3.30" rayon = "1.10.0" -tokio = { version = "1.37.0", features = ["time", "rt-multi-thread", "macros", "tracing", "signal"] } +tokio = { version = "1.38.1", features = ["time", "rt-multi-thread", "macros", "tracing", "signal"] } tokio-stream = { version = "0.1.15", features = ["time"] } tower = { version = "0.4.13", features = ["hedge", "limit"] } pin-project = "1.1.5" @@ -187,9 +187,9 @@ pin-project = "1.1.5" color-eyre = { version = "0.6.3", default-features = false, features = ["issue-url"] } # This is a transitive dependency via color-eyre. # Enable a feature that makes tinyvec compile much faster. -tinyvec = { version = "1.7.0", features = ["rustc_1_55"] } +tinyvec = { version = "1.8.0", features = ["rustc_1_55"] } -thiserror = "1.0.61" +thiserror = "1.0.62" tracing-subscriber = { version = "0.3.18", features = ["env-filter"] } tracing-appender = "0.2.3" @@ -213,16 +213,16 @@ sentry = { version = "0.32.2", default-features = false, features = ["backtrace" # prod feature flamegraph tracing-flame = { version = "0.2.0", optional = true } -inferno = { version = "0.11.19", default-features = false, optional = true } +inferno = { version = "0.11.20", default-features = false, optional = true } # prod feature journald tracing-journald = { version = "0.3.0", optional = true } # prod feature filter-reload -hyper = { version = "0.14.28", features = ["http1", "http2", "server"], optional = true } +hyper = { version = "1.3.1", features = ["http1", "http2", "server"], optional = true } # prod feature prometheus -metrics-exporter-prometheus = { version = "0.15.1", default-features = false, features = ["http-listener"], optional = true } +metrics-exporter-prometheus = { version = "0.15.3", default-features = false, features = ["http-listener"], optional = true } # prod feature release_max_level_info # @@ -242,10 +242,10 @@ proptest-derive = { version = "0.5.0", optional = true } console-subscriber = { version = "0.3.0", optional = true } [build-dependencies] -vergen = { version = "8.3.1", default-features = false, features = ["cargo", "git", "git2", "rustc"] } +vergen = { version = "8.3.2", default-features = false, features = ["cargo", "git", "git2", "rustc"] } # test feature lightwalletd-grpc-tests -tonic-build = { version = "0.11.0", optional = true } +tonic-build = { version = "0.12.0", optional = true } [dev-dependencies] abscissa_core = { version = "0.7.0", features = ["testing"] } @@ -260,15 +260,15 @@ insta = { version = "1.39.0", features = ["json"] } serde_json = { version = "1.0.120", features = ["preserve_order"] } tempfile = "3.10.1" -hyper = { version = "0.14.28", features = ["http1", "http2", "server"]} +hyper = { version = "1.3.1", features = ["http1", "http2", "server"]} tracing-test = { version = "0.2.4", features = ["no-env-filter"] } -tokio = { version = "1.37.0", features = ["full", "tracing", "test-util"] } +tokio = { version = "1.38.1", features = ["full", "tracing", "test-util"] } tokio-stream = "0.1.15" # test feature lightwalletd-grpc-tests -prost = "0.12.6" -tonic = "0.11.0" +prost = "0.13.1" +tonic = "0.12.0" proptest = "1.4.0" proptest-derive = "0.5.0" From 162e5dab6b345cedb65188e0abd8a6d4fd152f7a Mon Sep 17 00:00:00 2001 From: Alfredo Garcia Date: Fri, 19 Jul 2024 15:55:56 -0300 Subject: [PATCH 02/15] make changes for hyper 1.0 --- Cargo.lock | 23 ++-- .../src/server/http_request_compatibility.rs | 12 +-- zebrad/Cargo.toml | 5 +- zebrad/src/components/tracing/endpoint.rs | 100 +++++++++++------- zebrad/tests/acceptance.rs | 61 ++++++++--- 5 files changed, 131 insertions(+), 70 deletions(-) diff --git a/Cargo.lock b/Cargo.lock index e81fd608931..d20ae989a2f 100644 --- a/Cargo.lock +++ b/Cargo.lock @@ -2003,9 +2003,9 @@ dependencies = [ [[package]] name = "hyper" -version = "1.3.1" +version = "1.4.1" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "fe575dd17d0862a9a33781c8c4696a55c320909004a67a00fb286ba8b1bc496d" +checksum = "50dfd22e0e76d0f662d429a5f80fcaf3855009297eab6a0a9f8543834744ba05" dependencies = [ "bytes", "futures-channel", @@ -2054,7 +2054,7 @@ version = "0.5.1" source = "registry+https://github.com/rust-lang/crates.io-index" checksum = "3203a961e5c83b6f5498933e78b6b263e208c197b63e9c6c53cc82ffd3f63793" dependencies = [ - "hyper 1.3.1", + "hyper 1.4.1", "hyper-util", "pin-project-lite", "tokio", @@ -2063,16 +2063,16 @@ dependencies = [ [[package]] name = "hyper-util" -version = "0.1.5" +version = "0.1.6" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "7b875924a60b96e5d7b9ae7b066540b1dd1cbd90d1828f54c92e02a283351c56" +checksum = "3ab92f4f49ee4fb4f997c784b7a2e0fa70050211e0b6a287f898c3c9785ca956" dependencies = [ "bytes", "futures-channel", "futures-util", "http 1.1.0", "http-body 1.0.0", - "hyper 1.3.1", + "hyper 1.4.1", "pin-project-lite", "socket2", "tokio", @@ -2598,7 +2598,7 @@ checksum = "b4f0c8427b39666bf970460908b213ec09b3b350f20c0c2eabcbba51704a08e6" dependencies = [ "base64 0.22.1", "http-body-util", - "hyper 1.3.1", + "hyper 1.4.1", "hyper-util", "indexmap 2.2.6", "ipnet", @@ -4814,7 +4814,7 @@ dependencies = [ "http 1.1.0", "http-body 1.0.0", "http-body-util", - "hyper 1.3.1", + "hyper 1.4.1", "hyper-timeout 0.5.1", "hyper-util", "percent-encoding", @@ -6130,7 +6130,7 @@ dependencies = [ "chrono", "futures", "hex", - "hyper 1.3.1", + "hyper 1.4.1", "indexmap 2.2.6", "insta", "jsonrpc-core", @@ -6327,6 +6327,7 @@ version = "1.8.0" dependencies = [ "abscissa_core", "atty", + "bytes", "chrono", "clap 4.5.9", "color-eyre", @@ -6336,8 +6337,10 @@ dependencies = [ "hex", "hex-literal", "howudoin", + "http-body-util", "humantime-serde", - "hyper 1.3.1", + "hyper 1.4.1", + "hyper-util", "indexmap 2.2.6", "indicatif", "inferno", diff --git a/zebra-rpc/src/server/http_request_compatibility.rs b/zebra-rpc/src/server/http_request_compatibility.rs index 99e604843fb..007d8479dc0 100644 --- a/zebra-rpc/src/server/http_request_compatibility.rs +++ b/zebra-rpc/src/server/http_request_compatibility.rs @@ -3,7 +3,8 @@ //! These fixes are applied at the HTTP level, before the RPC request is parsed. use futures::TryStreamExt; -use hyper::{body::Bytes, Body}; +use hyper::body::Bytes; +use jsonrpc_http_server::{hyper, RequestMiddlewareAction}; use jsonrpc_http_server::RequestMiddleware; @@ -37,10 +38,7 @@ use jsonrpc_http_server::RequestMiddleware; pub struct FixHttpRequestMiddleware; impl RequestMiddleware for FixHttpRequestMiddleware { - fn on_request( - &self, - mut request: hyper::Request, - ) -> jsonrpc_http_server::RequestMiddlewareAction { + fn on_request(&self, mut request: hyper::Request) -> RequestMiddlewareAction { tracing::trace!(?request, "original HTTP request"); // Fix the request headers if needed and we can do so. @@ -69,12 +67,12 @@ impl RequestMiddleware for FixHttpRequestMiddleware { Bytes::from(data) }); - Body::wrap_stream(body) + hyper::Body::wrap_stream(body) }); tracing::trace!(?request, "modified HTTP request"); - jsonrpc_http_server::RequestMiddlewareAction::Proceed { + RequestMiddlewareAction::Proceed { // TODO: disable this security check if we see errors from lightwalletd. should_continue_on_invalid_cors: false, request, diff --git a/zebrad/Cargo.toml b/zebrad/Cargo.toml index d66cfde0717..66469215ab7 100644 --- a/zebrad/Cargo.toml +++ b/zebrad/Cargo.toml @@ -88,7 +88,7 @@ elasticsearch = [ # Tracing and monitoring sentry = ["dep:sentry"] journald = ["tracing-journald"] -filter-reload = ["hyper"] +filter-reload = ["hyper", "http-body-util", "hyper-util", "bytes"] progress-bar = [ "howudoin", @@ -220,6 +220,9 @@ tracing-journald = { version = "0.3.0", optional = true } # prod feature filter-reload hyper = { version = "1.3.1", features = ["http1", "http2", "server"], optional = true } +http-body-util = { version = "0.1.2", optional = true } +hyper-util = { version = "0.1.6", optional = true } +bytes = { version = "1.6.1", optional = true } # prod feature prometheus metrics-exporter-prometheus = { version = "0.15.3", default-features = false, features = ["http-listener"], optional = true } diff --git a/zebrad/src/components/tracing/endpoint.rs b/zebrad/src/components/tracing/endpoint.rs index c4c6440def8..b0da19800ab 100644 --- a/zebrad/src/components/tracing/endpoint.rs +++ b/zebrad/src/components/tracing/endpoint.rs @@ -7,7 +7,13 @@ use abscissa_core::{Component, FrameworkError}; use crate::config::ZebradConfig; #[cfg(feature = "filter-reload")] -use hyper::{Body, Request, Response}; +use hyper::{ + body::{Body, Incoming}, + server::conn::http1, + Method, Request, Response, StatusCode, +}; +#[cfg(feature = "filter-reload")] +use hyper_util::{rt::TokioIo, service::TowerToHyperService}; #[cfg(feature = "filter-reload")] use crate::{components::tokio::TokioComponent, prelude::*}; @@ -24,11 +30,16 @@ pub struct TracingEndpoint { } #[cfg(feature = "filter-reload")] -async fn read_filter(req: Request) -> Result { +async fn read_filter(req: Request) -> Result { + use http_body_util::BodyExt; + std::str::from_utf8( - &hyper::body::to_bytes(req.into_body()) + req.into_body() + .collect() .await - .map_err(|_| "Error reading body".to_owned())?, + .map_err(|_| "Error reading body".to_owned())? + .to_bytes() + .as_ref(), ) .map(|s| s.to_owned()) .map_err(|_| "Filter must be UTF-8".to_owned()) @@ -52,42 +63,54 @@ impl TracingEndpoint { #[cfg(feature = "filter-reload")] #[allow(clippy::unwrap_in_result)] pub fn init_tokio(&mut self, tokio_component: &TokioComponent) -> Result<(), FrameworkError> { - use hyper::{ - service::{make_service_fn, service_fn}, - Server, - }; - let addr = if let Some(addr) = self.addr { addr } else { return Ok(()); }; - let service = - make_service_fn(|_| async { Ok::<_, hyper::Error>(service_fn(request_handler)) }); - info!("Trying to open tracing endpoint at {}...", addr); + + let svc = + tower::service_fn(|req: Request| async move { request_handler(req).await }); + tokio_component .rt .as_ref() .expect("runtime should not be taken") .spawn(async move { - // try_bind uses the tokio runtime, so we - // need to construct it inside the task. - let server = match Server::try_bind(&addr) { - Ok(s) => s, - Err(e) => panic!( - "Opening tracing endpoint listener {addr:?} failed: {e:?}. \ - Hint: Check if another zebrad or zcashd process is running. \ - Try changing the tracing endpoint_addr in the Zebra config.", - ), - } - .serve(service); - - info!("Opened tracing endpoint at {}", server.local_addr()); - - if let Err(e) = server.await { - error!("Server error: {}", e); + let listener = match tokio::net::TcpListener::bind(addr).await { + Ok(listener) => listener, + Err(err) => { + error!( + "Opening tracing endpoint listener {addr:?} failed: {err:?}. \ + Hint: Check if another zebrad or zcashd process is running. \ + Try changing the tracing endpoint_addr in the Zebra config.", + addr = addr, + err = err, + ); + return; + } + }; + info!( + "Opened tracing endpoint at {}", + listener + .local_addr() + .expect("Local address must be available as the bind was succesful") + ); + + while let Ok((stream, _)) = listener.accept().await { + let io = TokioIo::new(stream); + tokio::spawn(async move { + let svc = TowerToHyperService::new(svc); + if let Err(err) = http1::Builder::new().serve_connection(io, svc).await { + panic!( + "Serve connection in {addr:?} failed: {err:?}.", + addr = addr, + err = err + ); + } + }); } }); @@ -97,13 +120,11 @@ impl TracingEndpoint { #[cfg(feature = "filter-reload")] #[instrument] -async fn request_handler(req: Request) -> Result, hyper::Error> { - use hyper::{Method, StatusCode}; - +async fn request_handler(req: Request) -> Result, hyper::Error> { use super::Tracing; let rsp = match (req.method(), req.uri().path()) { - (&Method::GET, "/") => Response::new(Body::from( + (&Method::GET, "/") => Response::new( r#" This HTTP endpoint allows dynamic control of the filter applied to tracing events. @@ -115,18 +136,19 @@ To get the current filter, GET /filter: To set the filter, POST the new filter string to /filter: curl -X POST localhost:3000/filter -d "zebrad=trace" -"#, - )), +"# + .to_string(), + ), (&Method::GET, "/filter") => Response::builder() .status(StatusCode::OK) - .body(Body::from( + .body( APPLICATION .state() .components() .get_downcast_ref::() .expect("Tracing component should be available") .filter(), - )) + ) .expect("response with known status code cannot fail"), (&Method::POST, "/filter") => match read_filter(req).await { Ok(filter) => { @@ -137,16 +159,16 @@ To set the filter, POST the new filter string to /filter: .expect("Tracing component should be available") .reload_filter(filter); - Response::new(Body::from("")) + Response::new("".to_string()) } Err(e) => Response::builder() .status(StatusCode::BAD_REQUEST) - .body(Body::from(e)) + .body(e) .expect("response with known status code cannot fail"), }, _ => Response::builder() .status(StatusCode::NOT_FOUND) - .body(Body::from("")) + .body("".to_string()) .expect("response with known status cannot fail"), }; Ok(rsp) diff --git a/zebrad/tests/acceptance.rs b/zebrad/tests/acceptance.rs index 6a287ae31bd..6568fb54838 100644 --- a/zebrad/tests/acceptance.rs +++ b/zebrad/tests/acceptance.rs @@ -1391,7 +1391,11 @@ fn full_sync_testnet() -> Result<()> { #[cfg(all(feature = "prometheus", not(target_os = "windows")))] #[tokio::test] async fn metrics_endpoint() -> Result<()> { - use hyper::Client; + use bytes::Bytes; + use http_body_util::BodyExt; + use http_body_util::Full; + use hyper_util::{client::legacy::Client, rt::TokioExecutor}; + use std::io::Write; let _init_guard = zebra_test::init(); @@ -1412,14 +1416,22 @@ async fn metrics_endpoint() -> Result<()> { tokio::time::sleep(LAUNCH_DELAY).await; // Create an http client - let client = Client::new(); + let client: Client<_, Full> = Client::builder(TokioExecutor::new()).build_http(); // Test metrics endpoint let res = client.get(url.try_into().expect("url is valid")).await; + let (res, child) = child.kill_on_error(res)?; assert!(res.status().is_success()); - let body = hyper::body::to_bytes(res).await; - let (body, mut child) = child.kill_on_error(body)?; + + // Get he body of the response + let mut body = Vec::new(); + let mut body_stream = res.into_body(); + while let Some(next) = body_stream.frame().await { + body.write_all(next?.data_ref().unwrap())?; + } + + let (body, mut child) = child.kill_on_error::, hyper::Error>(Ok(body))?; child.kill(false)?; let output = child.wait_with_output()?; @@ -1447,7 +1459,11 @@ async fn metrics_endpoint() -> Result<()> { #[cfg(all(feature = "filter-reload", not(target_os = "windows")))] #[tokio::test] async fn tracing_endpoint() -> Result<()> { - use hyper::{Body, Client, Request}; + use bytes::Bytes; + use http_body_util::BodyExt; + use http_body_util::Full; + use hyper_util::{client::legacy::Client, rt::TokioExecutor}; + use std::io::Write; let _init_guard = zebra_test::init(); @@ -1469,7 +1485,7 @@ async fn tracing_endpoint() -> Result<()> { tokio::time::sleep(LAUNCH_DELAY).await; // Create an http client - let client = Client::new(); + let client: Client<_, Full> = Client::builder(TokioExecutor::new()).build_http(); // Test tracing endpoint let res = client @@ -1477,23 +1493,40 @@ async fn tracing_endpoint() -> Result<()> { .await; let (res, child) = child.kill_on_error(res)?; assert!(res.status().is_success()); - let body = hyper::body::to_bytes(res).await; - let (body, child) = child.kill_on_error(body)?; + + // Get he body of the response + let mut body = Vec::new(); + let mut body_stream = res.into_body(); + while let Some(next) = body_stream.frame().await { + body.write_all(next?.data_ref().unwrap())?; + } + + let (body, child) = child.kill_on_error::, hyper::Error>(Ok(body))?; // Set a filter and make sure it was changed - let request = Request::post(url_filter.clone()) - .body(Body::from("zebrad=debug")) + let request = hyper::Request::post(url_filter.clone()) + .body("zebrad=debug".to_string().into()) .unwrap(); + let post = client.request(request).await; let (_post, child) = child.kill_on_error(post)?; let tracing_res = client .get(url_filter.try_into().expect("url_filter is valid")) .await; + let (tracing_res, child) = child.kill_on_error(tracing_res)?; assert!(tracing_res.status().is_success()); - let tracing_body = hyper::body::to_bytes(tracing_res).await; - let (tracing_body, mut child) = child.kill_on_error(tracing_body)?; + + // Get he body of the response + let mut tracing_body = Vec::new(); + let mut body_stream = tracing_res.into_body(); + while let Some(next) = body_stream.frame().await { + tracing_body.write_all(next?.data_ref().unwrap())?; + } + + let (tracing_body, mut child) = + child.kill_on_error::, hyper::Error>(Ok(tracing_body.clone()))?; child.kill(false)?; @@ -1507,6 +1540,7 @@ async fn tracing_endpoint() -> Result<()> { // Make sure the endpoint header is correct // The header is split over two lines. But we don't want to require line // breaks at a specific word, so we run two checks for different substrings. + output.any_output_line_contains( "HTTP endpoint allows dynamic control of the filter", &body, @@ -1519,7 +1553,8 @@ async fn tracing_endpoint() -> Result<()> { "tracing filter endpoint response", "the tracing response header", )?; - std::str::from_utf8(&body).expect("unexpected invalid UTF-8 in tracing filter response"); + std::str::from_utf8(&tracing_body) + .expect("unexpected invalid UTF-8 in tracing filter response"); // Make sure endpoint requests change the filter output.any_output_line_contains( From 4641d3a78dacca3cefcfa1b4a9d69a3ee2d0c793 Mon Sep 17 00:00:00 2001 From: Alfredo Garcia Date: Fri, 19 Jul 2024 19:37:58 -0300 Subject: [PATCH 03/15] unrelated clippy --- zebrad/tests/common/lightwalletd/wallet_grpc_test.rs | 1 - 1 file changed, 1 deletion(-) diff --git a/zebrad/tests/common/lightwalletd/wallet_grpc_test.rs b/zebrad/tests/common/lightwalletd/wallet_grpc_test.rs index 284677b8dd9..03274868d88 100644 --- a/zebrad/tests/common/lightwalletd/wallet_grpc_test.rs +++ b/zebrad/tests/common/lightwalletd/wallet_grpc_test.rs @@ -209,7 +209,6 @@ pub async fn run() -> Result<()> { assert_eq!( get_block_response .chain_metadata - .clone() .unwrap() .sapling_commitment_tree_size, 1170439 From db8907ee819ee233a6f21e167f5390d3c7fde2e3 Mon Sep 17 00:00:00 2001 From: Alfredo Garcia Date: Fri, 19 Jul 2024 19:52:16 -0300 Subject: [PATCH 04/15] fix panic --- zebrad/src/components/tracing/endpoint.rs | 5 ++--- 1 file changed, 2 insertions(+), 3 deletions(-) diff --git a/zebrad/src/components/tracing/endpoint.rs b/zebrad/src/components/tracing/endpoint.rs index b0da19800ab..d21f145f42e 100644 --- a/zebrad/src/components/tracing/endpoint.rs +++ b/zebrad/src/components/tracing/endpoint.rs @@ -82,14 +82,13 @@ impl TracingEndpoint { let listener = match tokio::net::TcpListener::bind(addr).await { Ok(listener) => listener, Err(err) => { - error!( + panic!( "Opening tracing endpoint listener {addr:?} failed: {err:?}. \ Hint: Check if another zebrad or zcashd process is running. \ Try changing the tracing endpoint_addr in the Zebra config.", addr = addr, err = err, ); - return; } }; info!( @@ -104,7 +103,7 @@ impl TracingEndpoint { tokio::spawn(async move { let svc = TowerToHyperService::new(svc); if let Err(err) = http1::Builder::new().serve_connection(io, svc).await { - panic!( + error!( "Serve connection in {addr:?} failed: {err:?}.", addr = addr, err = err From be275895b40f4355db655ff53ef9e674ca5e7565 Mon Sep 17 00:00:00 2001 From: Alfredo Garcia Date: Fri, 19 Jul 2024 20:11:38 -0300 Subject: [PATCH 05/15] update denies --- deny.toml | 9 +++++++++ 1 file changed, 9 insertions(+) diff --git a/deny.toml b/deny.toml index eea0f8b7ac6..9110072be4b 100644 --- a/deny.toml +++ b/deny.toml @@ -79,6 +79,15 @@ skip-tree = [ # wait for elasticsearch to update base64, darling, rustc_version, serde_with { name = "elasticsearch", version = "=8.5.0-alpha.1" }, + + # wait for reqwest to update base64 + { name = "base64", version = "=0.21.7" }, + + # wait for jsonrpc-http-server to update hyper + { name = "h2", version = "=0.3.26" }, + { name = "http", version = "=0.2.12" }, + { name = "http-body", version = "=0.4.6" }, + { name = "hyper", version = "=0.14.30" }, ] # This section is considered when running `cargo deny check sources`. From 1417ef82bf6d24d662023603a20683af16f94d11 Mon Sep 17 00:00:00 2001 From: Alfredo Garcia Date: Fri, 19 Jul 2024 20:13:05 -0300 Subject: [PATCH 06/15] add missing deny.toml --- deny.toml | 1 + 1 file changed, 1 insertion(+) diff --git a/deny.toml b/deny.toml index 9110072be4b..cc5137a031d 100644 --- a/deny.toml +++ b/deny.toml @@ -82,6 +82,7 @@ skip-tree = [ # wait for reqwest to update base64 { name = "base64", version = "=0.21.7" }, + { name = "sync_wrapper", version = "0.1.2" }, # wait for jsonrpc-http-server to update hyper { name = "h2", version = "=0.3.26" }, From c7910897ac68ab60a7672ec50a5cc654b1d1f299 Mon Sep 17 00:00:00 2001 From: Alfredo Garcia Date: Fri, 19 Jul 2024 20:32:17 -0300 Subject: [PATCH 07/15] add more denies for all features --- deny.toml | 5 ++++- 1 file changed, 4 insertions(+), 1 deletion(-) diff --git a/deny.toml b/deny.toml index cc5137a031d..839d0f89fbf 100644 --- a/deny.toml +++ b/deny.toml @@ -74,8 +74,11 @@ skip-tree = [ { name = "base64", version = "=0.13.1" }, # wait for console-subscriber to update tonic. - { name = "tonic", version = "=0.10.2" }, + { name = "tonic", version = "=0.11.0" }, { name = "tonic-build", version = "=0.10.2" }, + { name = "axum", version = "=0.6.20" }, + { name = "axum-core", version = "=0.3.4" }, + { name = "hyper-timeout", version = "=0.4.1" }, # wait for elasticsearch to update base64, darling, rustc_version, serde_with { name = "elasticsearch", version = "=8.5.0-alpha.1" }, From 137cf5d1f55604a05410a9861db88dcd1e7ee7c8 Mon Sep 17 00:00:00 2001 From: Alfredo Garcia Date: Sat, 20 Jul 2024 10:02:32 -0300 Subject: [PATCH 08/15] add timeout feature to tower in zebra-grpc --- zebra-grpc/Cargo.toml | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/zebra-grpc/Cargo.toml b/zebra-grpc/Cargo.toml index 2f4c8ef2a2c..fefb26cf7de 100644 --- a/zebra-grpc/Cargo.toml +++ b/zebra-grpc/Cargo.toml @@ -23,7 +23,7 @@ prost = "0.13.1" serde = { version = "1.0.204", features = ["serde_derive"] } tokio = { version = "1.38.1", features = ["macros", "rt-multi-thread"] } tokio-stream = "0.1.15" -tower = { version = "0.4.13", features = ["util", "buffer"] } +tower = { version = "0.4.13", features = ["util", "buffer", "timeout"] } color-eyre = "0.6.3" zcash_primitives = { version = "0.15.0" } From 195cdefbb97ad598ed9f8b44245eb3e3f9cfa280 Mon Sep 17 00:00:00 2001 From: Alfredo Garcia Date: Sun, 21 Jul 2024 10:05:20 -0300 Subject: [PATCH 09/15] cargo vet --- supply-chain/audits.toml | 105 ++++++++++++++++++++++++++++++++++++++ supply-chain/imports.lock | 58 +++++++++++++++++++++ 2 files changed, 163 insertions(+) diff --git a/supply-chain/audits.toml b/supply-chain/audits.toml index d6b83fcf416..8881d2d9e8f 100644 --- a/supply-chain/audits.toml +++ b/supply-chain/audits.toml @@ -1,6 +1,21 @@ # cargo-vet audits file +[[audits.axum]] +who = "Alfredo Garcia " +criteria = "safe-to-deploy" +delta = "0.6.20 -> 0.7.5" + +[[audits.axum-core]] +who = "Alfredo Garcia " +criteria = "safe-to-deploy" +delta = "0.3.4 -> 0.4.3" + +[[audits.bytes]] +who = "Alfredo Garcia " +criteria = "safe-to-deploy" +delta = "1.6.0 -> 1.6.1" + [[audits.clap_derive]] who = "Alfredo Garcia " criteria = "safe-to-deploy" @@ -36,6 +51,31 @@ who = "Alfredo Garcia " criteria = "safe-to-deploy" delta = "0.2.0 -> 0.3.0" +[[audits.git2]] +who = "Alfredo Garcia " +criteria = "safe-to-deploy" +delta = "0.18.3 -> 0.19.0" + +[[audits.hyper]] +who = "Alfredo Garcia " +criteria = "safe-to-deploy" +delta = "0.14.29 -> 0.14.30" + +[[audits.hyper]] +who = "Alfredo Garcia " +criteria = "safe-to-deploy" +delta = "1.3.1 -> 1.4.1" + +[[audits.inferno]] +who = "Alfredo Garcia " +criteria = "safe-to-deploy" +delta = "0.11.19 -> 0.11.20" + +[[audits.libgit2-sys]] +who = "Alfredo Garcia " +criteria = "safe-to-deploy" +delta = "0.16.2+1.7.2 -> 0.17.0+1.8.1" + [[audits.log]] who = "Alfredo Garcia " criteria = "safe-to-deploy" @@ -51,6 +91,11 @@ who = "Alfredo Garcia " criteria = "safe-to-deploy" delta = "0.14.0 -> 0.15.1" +[[audits.metrics-exporter-prometheus]] +who = "Alfredo Garcia " +criteria = "safe-to-deploy" +delta = "0.15.1 -> 0.15.3" + [[audits.metrics-util]] who = "Alfredo Garcia " criteria = "safe-to-deploy" @@ -61,16 +106,76 @@ who = "Alfredo Garcia " criteria = "safe-to-deploy" delta = "0.4.0 -> 0.5.0" +[[audits.prost]] +who = "Alfredo Garcia " +criteria = "safe-to-deploy" +delta = "0.12.6 -> 0.13.1" + +[[audits.prost-build]] +who = "Alfredo Garcia " +criteria = "safe-to-deploy" +delta = "0.12.6 -> 0.13.1" + +[[audits.prost-derive]] +who = "Alfredo Garcia " +criteria = "safe-to-deploy" +delta = "0.12.6 -> 0.13.1" + +[[audits.prost-types]] +who = "Alfredo Garcia " +criteria = "safe-to-deploy" +delta = "0.12.6 -> 0.13.1" + [[audits.serde_with]] who = "Alfredo Garcia " criteria = "safe-to-deploy" delta = "3.8.1 -> 3.8.3" +[[audits.serde_with]] +who = "Alfredo Garcia " +criteria = "safe-to-deploy" +delta = "3.8.3 -> 3.9.0" + [[audits.serde_with_macros]] who = "Alfredo Garcia " criteria = "safe-to-deploy" delta = "3.8.1 -> 3.8.3" +[[audits.serde_with_macros]] +who = "Alfredo Garcia " +criteria = "safe-to-deploy" +delta = "3.8.3 -> 3.9.0" + +[[audits.thiserror]] +who = "Alfredo Garcia " +criteria = "safe-to-deploy" +delta = "1.0.61 -> 1.0.62" + +[[audits.thiserror-impl]] +who = "Alfredo Garcia " +criteria = "safe-to-deploy" +delta = "1.0.63 -> 1.0.62" + +[[audits.tokio]] +who = "Alfredo Garcia " +criteria = "safe-to-deploy" +delta = "1.38.0 -> 1.38.1" + +[[audits.tonic]] +who = "Alfredo Garcia " +criteria = "safe-to-deploy" +delta = "0.11.0 -> 0.12.0" + +[[audits.tonic-reflection]] +who = "Alfredo Garcia " +criteria = "safe-to-deploy" +delta = "0.11.0 -> 0.12.0" + +[[audits.vergen]] +who = "Alfredo Garcia " +criteria = "safe-to-deploy" +delta = "8.3.1 -> 8.3.2" + [[trusted.clap]] criteria = "safe-to-deploy" user-id = 6743 # Ed Page (epage) diff --git a/supply-chain/imports.lock b/supply-chain/imports.lock index f6f1a99c47d..f4dee8e96d0 100644 --- a/supply-chain/imports.lock +++ b/supply-chain/imports.lock @@ -15,6 +15,13 @@ user-id = 6743 user-login = "epage" user-name = "Ed Page" +[[publisher.clap]] +version = "4.5.9" +when = "2024-07-09" +user-id = 6743 +user-login = "epage" +user-name = "Ed Page" + [[publisher.clap_builder]] version = "4.5.8" when = "2024-06-28" @@ -22,6 +29,13 @@ user-id = 6743 user-login = "epage" user-name = "Ed Page" +[[publisher.clap_builder]] +version = "4.5.9" +when = "2024-07-09" +user-id = 6743 +user-login = "epage" +user-name = "Ed Page" + [[publisher.clap_derive]] version = "4.5.8" when = "2024-06-28" @@ -64,6 +78,13 @@ user-id = 3618 user-login = "dtolnay" user-name = "David Tolnay" +[[publisher.syn]] +version = "2.0.71" +when = "2024-07-12" +user-id = 3618 +user-login = "dtolnay" +user-name = "David Tolnay" + [[publisher.unicode-normalization]] version = "0.1.23" when = "2024-02-20" @@ -623,6 +644,12 @@ criteria = "safe-to-deploy" delta = "1.6.1 -> 1.7.0" aggregated-from = "https://chromium.googlesource.com/chromium/src/+/main/third_party/rust/chromium_crates_io/supply-chain/audits.toml?format=TEXT" +[[audits.google.audits.tinyvec]] +who = "Dustin J. Mitchell " +criteria = "safe-to-deploy" +delta = "1.7.0 -> 1.8.0" +aggregated-from = "https://chromium.googlesource.com/chromium/src/+/main/third_party/rust/chromium_crates_io/supply-chain/audits.toml?format=TEXT" + [[audits.google.audits.tinyvec_macros]] who = "George Burgess IV " criteria = "safe-to-deploy" @@ -1047,6 +1074,19 @@ I have no way to check whether these constants are an improvement or not. """ aggregated-from = "https://raw.githubusercontent.com/zcash/librustzcash/main/supply-chain/audits.toml" +[[audits.zcash.audits.hyper-timeout]] +who = "Jack Grigg " +criteria = "safe-to-deploy" +delta = "0.4.1 -> 0.5.1" +notes = "New uses of pin_project! look fine." +aggregated-from = "https://raw.githubusercontent.com/zcash/librustzcash/main/supply-chain/audits.toml" + +[[audits.zcash.audits.hyper-util]] +who = "Jack Grigg " +criteria = "safe-to-deploy" +delta = "0.1.5 -> 0.1.6" +aggregated-from = "https://raw.githubusercontent.com/zcash/librustzcash/main/supply-chain/audits.toml" + [[audits.zcash.audits.inout]] who = "Daira Hopwood " criteria = "safe-to-deploy" @@ -1157,6 +1197,18 @@ criteria = "safe-to-deploy" delta = "2.1.0 -> 2.2.0" aggregated-from = "https://raw.githubusercontent.com/zcash/zcash/master/qa/supply-chain/audits.toml" +[[audits.zcash.audits.sync_wrapper]] +who = "Jack Grigg " +criteria = "safe-to-deploy" +delta = "0.1.2 -> 1.0.1" +aggregated-from = "https://raw.githubusercontent.com/zcash/librustzcash/main/supply-chain/audits.toml" + +[[audits.zcash.audits.thiserror-impl]] +who = "Jack Grigg " +criteria = "safe-to-deploy" +delta = "1.0.61 -> 1.0.63" +aggregated-from = "https://raw.githubusercontent.com/zcash/librustzcash/main/supply-chain/audits.toml" + [[audits.zcash.audits.tinyvec_macros]] who = "Jack Grigg " criteria = "safe-to-deploy" @@ -1182,6 +1234,12 @@ criteria = "safe-to-deploy" delta = "0.10.2 -> 0.11.0" aggregated-from = "https://raw.githubusercontent.com/zcash/librustzcash/main/supply-chain/audits.toml" +[[audits.zcash.audits.tonic-build]] +who = "Jack Grigg " +criteria = "safe-to-deploy" +delta = "0.11.0 -> 0.12.0" +aggregated-from = "https://raw.githubusercontent.com/zcash/librustzcash/main/supply-chain/audits.toml" + [[audits.zcash.audits.wagyu-zcash-parameters]] who = "Sean Bowe " criteria = "safe-to-deploy" From 76cb76168c51cf59eeb9cbc3a90f594831358d64 Mon Sep 17 00:00:00 2001 From: Alfredo Garcia Date: Sun, 21 Jul 2024 10:07:14 -0300 Subject: [PATCH 10/15] cargo vet prune --- supply-chain/config.toml | 8 ------- supply-chain/imports.lock | 44 ++++++++++++++++++++------------------- 2 files changed, 23 insertions(+), 29 deletions(-) diff --git a/supply-chain/config.toml b/supply-chain/config.toml index 4970c885169..a166434d2aa 100644 --- a/supply-chain/config.toml +++ b/supply-chain/config.toml @@ -534,10 +534,6 @@ criteria = "safe-to-deploy" version = "2.0.0" criteria = "safe-to-deploy" -[[exemptions.futures]] -version = "0.3.30" -criteria = "safe-to-deploy" - [[exemptions.futures-channel]] version = "0.3.30" criteria = "safe-to-deploy" @@ -602,10 +598,6 @@ criteria = "safe-to-deploy" version = "0.3.26" criteria = "safe-to-deploy" -[[exemptions.h2]] -version = "0.4.5" -criteria = "safe-to-deploy" - [[exemptions.half]] version = "2.4.1" criteria = "safe-to-run" diff --git a/supply-chain/imports.lock b/supply-chain/imports.lock index f4dee8e96d0..7f798e91a68 100644 --- a/supply-chain/imports.lock +++ b/supply-chain/imports.lock @@ -8,13 +8,6 @@ user-id = 3788 user-login = "emilio" user-name = "Emilio Cobos Álvarez" -[[publisher.clap]] -version = "4.5.8" -when = "2024-06-28" -user-id = 6743 -user-login = "epage" -user-name = "Ed Page" - [[publisher.clap]] version = "4.5.9" when = "2024-07-09" @@ -22,13 +15,6 @@ user-id = 6743 user-login = "epage" user-name = "Ed Page" -[[publisher.clap_builder]] -version = "4.5.8" -when = "2024-06-28" -user-id = 6743 -user-login = "epage" -user-name = "Ed Page" - [[publisher.clap_builder]] version = "4.5.9" when = "2024-07-09" @@ -71,13 +57,6 @@ user-id = 3618 user-login = "dtolnay" user-name = "David Tolnay" -[[publisher.syn]] -version = "2.0.69" -when = "2024-07-06" -user-id = 3618 -user-login = "dtolnay" -user-name = "David Tolnay" - [[publisher.syn]] version = "2.0.71" when = "2024-07-12" @@ -247,6 +226,16 @@ that the RNG here is not cryptographically secure. """ aggregated-from = "https://chromium.googlesource.com/chromiumos/third_party/rust_crates/+/refs/heads/main/cargo-vet/audits.toml?format=TEXT" +[[audits.google.audits.futures]] +who = "George Burgess IV " +criteria = "safe-to-deploy" +version = "0.3.28" +notes = """ +`futures` has no logic other than tests - it simply `pub use`s things from +other crates. +""" +aggregated-from = "https://chromium.googlesource.com/chromiumos/third_party/rust_crates/+/refs/heads/main/cargo-vet/audits.toml?format=TEXT" + [[audits.google.audits.glob]] who = "George Burgess IV " criteria = "safe-to-deploy" @@ -1074,6 +1063,19 @@ I have no way to check whether these constants are an improvement or not. """ aggregated-from = "https://raw.githubusercontent.com/zcash/librustzcash/main/supply-chain/audits.toml" +[[audits.zcash.audits.futures]] +who = "Jack Grigg " +criteria = "safe-to-deploy" +delta = "0.3.28 -> 0.3.30" +notes = "Only sub-crate updates and corresponding changes to tests." +aggregated-from = "https://raw.githubusercontent.com/zcash/librustzcash/main/supply-chain/audits.toml" + +[[audits.zcash.audits.h2]] +who = "Jack Grigg " +criteria = "safe-to-deploy" +delta = "0.3.26 -> 0.4.5" +aggregated-from = "https://raw.githubusercontent.com/zcash/librustzcash/main/supply-chain/audits.toml" + [[audits.zcash.audits.hyper-timeout]] who = "Jack Grigg " criteria = "safe-to-deploy" From 9b90670b28a24f343877b87051bfe8070d3d1613 Mon Sep 17 00:00:00 2001 From: Alfredo Garcia Date: Sun, 21 Jul 2024 10:10:30 -0300 Subject: [PATCH 11/15] codespell --- zebrad/src/components/tracing/endpoint.rs | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/zebrad/src/components/tracing/endpoint.rs b/zebrad/src/components/tracing/endpoint.rs index d21f145f42e..b99c8278c78 100644 --- a/zebrad/src/components/tracing/endpoint.rs +++ b/zebrad/src/components/tracing/endpoint.rs @@ -95,7 +95,7 @@ impl TracingEndpoint { "Opened tracing endpoint at {}", listener .local_addr() - .expect("Local address must be available as the bind was succesful") + .expect("Local address must be available as the bind was successful") ); while let Ok((stream, _)) = listener.accept().await { From 1a201b06e845344131a670f38f89eba3debcf23e Mon Sep 17 00:00:00 2001 From: Alfredo Garcia Date: Tue, 23 Jul 2024 08:09:13 -0300 Subject: [PATCH 12/15] change waiting message --- deny.toml | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/deny.toml b/deny.toml index 839d0f89fbf..2f5640a3f7c 100644 --- a/deny.toml +++ b/deny.toml @@ -87,7 +87,7 @@ skip-tree = [ { name = "base64", version = "=0.21.7" }, { name = "sync_wrapper", version = "0.1.2" }, - # wait for jsonrpc-http-server to update hyper + # wait for jsonrpc-http-server to update hyper or for Zebra to replace jsonrpc (#8682) { name = "h2", version = "=0.3.26" }, { name = "http", version = "=0.2.12" }, { name = "http-body", version = "=0.4.6" }, From 007b99ea411af74bd181f7d632e55f104475a989 Mon Sep 17 00:00:00 2001 From: Alfredo Garcia Date: Tue, 23 Jul 2024 08:33:22 -0300 Subject: [PATCH 13/15] remove hyper direct dependency from zebra-rpc --- Cargo.lock | 1 - zebra-rpc/Cargo.toml | 3 --- .../src/server/http_request_compatibility.rs | 22 +++++++++---------- 3 files changed, 11 insertions(+), 15 deletions(-) diff --git a/Cargo.lock b/Cargo.lock index d20ae989a2f..5d550040aac 100644 --- a/Cargo.lock +++ b/Cargo.lock @@ -6130,7 +6130,6 @@ dependencies = [ "chrono", "futures", "hex", - "hyper 1.4.1", "indexmap 2.2.6", "insta", "jsonrpc-core", diff --git a/zebra-rpc/Cargo.toml b/zebra-rpc/Cargo.toml index 2ff01c2804f..7d50a551c57 100644 --- a/zebra-rpc/Cargo.toml +++ b/zebra-rpc/Cargo.toml @@ -60,9 +60,6 @@ chrono = { version = "0.4.38", default-features = false, features = [ ] } futures = "0.3.30" -# lightwalletd sends JSON-RPC requests over HTTP 1.1 -hyper = { version = "1.3.1", features = ["http1", "server"] } - jsonrpc-core = "18.0.0" jsonrpc-derive = "18.0.0" jsonrpc-http-server = "18.0.0" diff --git a/zebra-rpc/src/server/http_request_compatibility.rs b/zebra-rpc/src/server/http_request_compatibility.rs index 007d8479dc0..73e206f4cdf 100644 --- a/zebra-rpc/src/server/http_request_compatibility.rs +++ b/zebra-rpc/src/server/http_request_compatibility.rs @@ -3,10 +3,10 @@ //! These fixes are applied at the HTTP level, before the RPC request is parsed. use futures::TryStreamExt; -use hyper::body::Bytes; -use jsonrpc_http_server::{hyper, RequestMiddlewareAction}; - -use jsonrpc_http_server::RequestMiddleware; +use jsonrpc_http_server::{ + hyper::{body::Bytes, header, Body, Request}, + RequestMiddleware, RequestMiddlewareAction, +}; /// HTTP [`RequestMiddleware`] with compatibility workarounds. /// @@ -38,7 +38,7 @@ use jsonrpc_http_server::RequestMiddleware; pub struct FixHttpRequestMiddleware; impl RequestMiddleware for FixHttpRequestMiddleware { - fn on_request(&self, mut request: hyper::Request) -> RequestMiddlewareAction { + fn on_request(&self, mut request: Request) -> RequestMiddlewareAction { tracing::trace!(?request, "original HTTP request"); // Fix the request headers if needed and we can do so. @@ -67,7 +67,7 @@ impl RequestMiddleware for FixHttpRequestMiddleware { Bytes::from(data) }); - hyper::Body::wrap_stream(body) + Body::wrap_stream(body) }); tracing::trace!(?request, "modified HTTP request"); @@ -122,10 +122,10 @@ impl FixHttpRequestMiddleware { /// /// - Checking all the headers is secure, but only because hyper has custom code that just reads the first content-type header. /// - pub fn insert_or_replace_content_type_header(headers: &mut hyper::header::HeaderMap) { - if !headers.contains_key(hyper::header::CONTENT_TYPE) + pub fn insert_or_replace_content_type_header(headers: &mut header::HeaderMap) { + if !headers.contains_key(header::CONTENT_TYPE) || headers - .get(hyper::header::CONTENT_TYPE) + .get(header::CONTENT_TYPE) .filter(|value| { value .to_str() @@ -136,8 +136,8 @@ impl FixHttpRequestMiddleware { .is_some() { headers.insert( - hyper::header::CONTENT_TYPE, - hyper::header::HeaderValue::from_static("application/json"), + header::CONTENT_TYPE, + header::HeaderValue::from_static("application/json"), ); } } From 058788f88e5520e6d63200207297c561d09df847 Mon Sep 17 00:00:00 2001 From: Alfredo Garcia Date: Tue, 23 Jul 2024 08:34:48 -0300 Subject: [PATCH 14/15] fix doc typos --- zebrad/tests/acceptance.rs | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) diff --git a/zebrad/tests/acceptance.rs b/zebrad/tests/acceptance.rs index 6568fb54838..8d4cc764bdd 100644 --- a/zebrad/tests/acceptance.rs +++ b/zebrad/tests/acceptance.rs @@ -1424,7 +1424,7 @@ async fn metrics_endpoint() -> Result<()> { let (res, child) = child.kill_on_error(res)?; assert!(res.status().is_success()); - // Get he body of the response + // Get the body of the response let mut body = Vec::new(); let mut body_stream = res.into_body(); while let Some(next) = body_stream.frame().await { @@ -1494,7 +1494,7 @@ async fn tracing_endpoint() -> Result<()> { let (res, child) = child.kill_on_error(res)?; assert!(res.status().is_success()); - // Get he body of the response + // Get the body of the response let mut body = Vec::new(); let mut body_stream = res.into_body(); while let Some(next) = body_stream.frame().await { @@ -1518,7 +1518,7 @@ async fn tracing_endpoint() -> Result<()> { let (tracing_res, child) = child.kill_on_error(tracing_res)?; assert!(tracing_res.status().is_success()); - // Get he body of the response + // Get the body of the response let mut tracing_body = Vec::new(); let mut body_stream = tracing_res.into_body(); while let Some(next) = body_stream.frame().await { From 62a8d7191462d6b8393e518e4d646a09542f3699 Mon Sep 17 00:00:00 2001 From: Alfredo Garcia Date: Tue, 23 Jul 2024 08:58:55 -0300 Subject: [PATCH 15/15] simplify tracing endpoint --- zebrad/src/components/tracing/endpoint.rs | 17 +++++++++++------ 1 file changed, 11 insertions(+), 6 deletions(-) diff --git a/zebrad/src/components/tracing/endpoint.rs b/zebrad/src/components/tracing/endpoint.rs index b99c8278c78..b5cb4a9da37 100644 --- a/zebrad/src/components/tracing/endpoint.rs +++ b/zebrad/src/components/tracing/endpoint.rs @@ -9,11 +9,13 @@ use crate::config::ZebradConfig; #[cfg(feature = "filter-reload")] use hyper::{ body::{Body, Incoming}, - server::conn::http1, Method, Request, Response, StatusCode, }; #[cfg(feature = "filter-reload")] -use hyper_util::{rt::TokioIo, service::TowerToHyperService}; +use hyper_util::{ + rt::{TokioExecutor, TokioIo}, + server::conn::auto::Builder, +}; #[cfg(feature = "filter-reload")] use crate::{components::tokio::TokioComponent, prelude::*}; @@ -71,8 +73,9 @@ impl TracingEndpoint { info!("Trying to open tracing endpoint at {}...", addr); - let svc = - tower::service_fn(|req: Request| async move { request_handler(req).await }); + let svc = hyper::service::service_fn(|req: Request| async move { + request_handler(req).await + }); tokio_component .rt @@ -101,8 +104,10 @@ impl TracingEndpoint { while let Ok((stream, _)) = listener.accept().await { let io = TokioIo::new(stream); tokio::spawn(async move { - let svc = TowerToHyperService::new(svc); - if let Err(err) = http1::Builder::new().serve_connection(io, svc).await { + if let Err(err) = Builder::new(TokioExecutor::new()) + .serve_connection(io, svc) + .await + { error!( "Serve connection in {addr:?} failed: {err:?}.", addr = addr,