diff --git a/.config/hakari.toml b/.config/hakari.toml index b83d3a787d971..5ff1cf17ced5e 100644 --- a/.config/hakari.toml +++ b/.config/hakari.toml @@ -3,7 +3,7 @@ hakari-package = "workspace-hack" -# Format for `workspace-hack = ...` lines in other Cargo.tomls. Requires cargo-hakari 0.9.8 or above. +# Format for `workspace-hack = ...` lines in other Cargo.tomls. dep-format-version = "3" # Setting workspace.resolver = "2" in the root Cargo.toml is HIGHLY recommended. diff --git a/Cargo.lock b/Cargo.lock index fa8efac919223..50dd34fcae589 100644 --- a/Cargo.lock +++ b/Cargo.lock @@ -590,37 +590,6 @@ dependencies = [ "cc", ] -[[package]] -name = "axum" -version = "0.5.17" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "acee9fd5073ab6b045a275b3e709c163dd36c90685219cb21804a147b58dba43" -dependencies = [ - "async-trait", - "axum-core 0.2.9", - "bitflags", - "bytes", - "futures-util", - "http", - "http-body", - "hyper", - "itoa 1.0.5", - "matchit 0.5.0", - "memchr", - "mime", - "percent-encoding", - "pin-project-lite", - "serde 1.0.152", - "serde_json", - "serde_urlencoded", - "sync_wrapper", - "tokio", - "tower", - "tower-http", - "tower-layer", - "tower-service", -] - [[package]] name = "axum" version = "0.6.2" @@ -628,7 +597,7 @@ source = "registry+https://github.com/rust-lang/crates.io-index" checksum = "1304eab461cf02bd70b083ed8273388f9724c549b316ba3d1e213ce0e9e7fb7e" dependencies = [ "async-trait", - "axum-core 0.3.1", + "axum-core", "bitflags", "bytes", "futures-util", @@ -654,22 +623,6 @@ dependencies = [ "tower-service", ] -[[package]] -name = "axum-core" -version = "0.2.9" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "37e5939e02c56fecd5c017c37df4238c0a839fa76b7f97acdd7efb804fd181cc" -dependencies = [ - "async-trait", - "bytes", - "futures-util", - "http", - "http-body", - "mime", - "tower-layer", - "tower-service", -] - [[package]] name = "axum-core" version = "0.3.1" @@ -693,7 +646,7 @@ version = "0.4.2" source = "registry+https://github.com/rust-lang/crates.io-index" checksum = "f9a320103719de37b7b4da4c8eb629d4573f6bcfd3dfe80d3208806895ccf81d" dependencies = [ - "axum 0.6.2", + "axum", "bytes", "futures-util", "http", @@ -5347,7 +5300,7 @@ dependencies = [ "anemo-tower", "anyhow", "async-trait", - "axum 0.5.17", + "axum", "axum-server", "backoff", "bincode", @@ -5380,7 +5333,7 @@ dependencies = [ "anemo", "arc-swap", "async-trait", - "axum 0.5.17", + "axum", "bincode", "bytes", "cfg-if", @@ -8774,7 +8727,7 @@ version = "0.23.0" dependencies = [ "anyhow", "async-trait", - "axum 0.5.17", + "axum", "clap 3.2.23", "eyre", "futures", @@ -9040,7 +8993,7 @@ dependencies = [ "anemo-tower", "anyhow", "arc-swap", - "axum 0.5.17", + "axum", "chrono", "clap 3.2.23", "futures", @@ -9131,7 +9084,7 @@ version = "0.1.0" dependencies = [ "anyhow", "async-trait", - "axum 0.6.2", + "axum", "axum-extra", "bcs", "clap 3.2.23", @@ -9332,7 +9285,7 @@ name = "sui-test-validator" version = "0.0.0" dependencies = [ "anyhow", - "axum 0.5.17", + "axum", "clap 3.2.23", "http", "move-package", @@ -10086,7 +10039,7 @@ checksum = "8f219fad3b929bef19b1f86fbc0358d35daed8f2cac972037ac0dc10bbb8d5fb" dependencies = [ "async-stream", "async-trait", - "axum 0.6.2", + "axum", "base64", "bytes", "futures-core", @@ -11066,10 +11019,8 @@ dependencies = [ "auto_ops", "autocfg", "autotools", - "axum 0.5.17", - "axum 0.6.2", - "axum-core 0.2.9", - "axum-core 0.3.1", + "axum", + "axum-core", "axum-extra", "axum-server", "backoff", diff --git a/crates/sui-faucet/Cargo.toml b/crates/sui-faucet/Cargo.toml index 42887b169896b..9c7e76c2a4624 100644 --- a/crates/sui-faucet/Cargo.toml +++ b/crates/sui-faucet/Cargo.toml @@ -9,7 +9,7 @@ publish = false [dependencies] anyhow = { version = "1.0.64", features = ["backtrace"] } async-trait = "0.1.61" -axum = "0.5.16" +axum = { version = "0.6.2", features = ["json"] } clap = { version = "3.2.17", features = ["derive"] } thiserror = "1.0.34" tokio = { workspace = true, features = ["full"] } diff --git a/crates/sui-faucet/src/main.rs b/crates/sui-faucet/src/main.rs index a03c893797bb8..71d3d27f41bbf 100644 --- a/crates/sui-faucet/src/main.rs +++ b/crates/sui-faucet/src/main.rs @@ -146,8 +146,8 @@ async fn health() -> &'static str { /// handler for all the request_gas requests async fn request_gas( - Json(payload): Json, Extension(state): Extension>, + Json(payload): Json, ) -> impl IntoResponse { // ID for traceability let id = Uuid::new_v4(); diff --git a/crates/sui-faucet/src/metrics_layer.rs b/crates/sui-faucet/src/metrics_layer.rs index 60f6fbab0eeb5..b9e23f3fa1891 100644 --- a/crates/sui-faucet/src/metrics_layer.rs +++ b/crates/sui-faucet/src/metrics_layer.rs @@ -16,6 +16,7 @@ use crate::metrics::RequestMetrics; /// Tower Layer for tracking metrics in Prometheus related to number, success-rate and latency of /// requests running through service. +#[derive(Clone)] pub struct RequestMetricsLayer { metrics: Arc, } diff --git a/crates/sui-node/Cargo.toml b/crates/sui-node/Cargo.toml index 08e5aa0aa33f5..f891d3d4a2916 100644 --- a/crates/sui-node/Cargo.toml +++ b/crates/sui-node/Cargo.toml @@ -10,7 +10,7 @@ edition = "2021" anemo.workspace = true anemo-tower.workspace = true arc-swap = "1.5.1" -axum = "0.5.16" +axum = "0.6.2" anyhow = { version = "1.0.64", features = ["backtrace"] } clap = { version = "3.2.17", features = ["derive"] } multiaddr = "0.17.0" diff --git a/crates/sui-rosetta/Cargo.toml b/crates/sui-rosetta/Cargo.toml index 644d26c3ed1c6..e541bf2b1d75b 100644 --- a/crates/sui-rosetta/Cargo.toml +++ b/crates/sui-rosetta/Cargo.toml @@ -7,7 +7,7 @@ publish = false edition = "2021" [dependencies] -axum = "0.6.1" +axum = "0.6.2" axum-extra = "0.4.2" anyhow = { version = "1.0.64", features = ["backtrace"] } tracing = "0.1.36" diff --git a/crates/sui-test-validator/Cargo.toml b/crates/sui-test-validator/Cargo.toml index 79a827f993291..3ce84afa3d711 100644 --- a/crates/sui-test-validator/Cargo.toml +++ b/crates/sui-test-validator/Cargo.toml @@ -12,7 +12,7 @@ clap = { version = "3.2.17", features = ["derive"] } serde = "1.0.141" serde_json = "1.0.88" tokio = { workspace = true, features = ["full"] } -axum = "0.5.16" +axum = { version = "0.6.2", features = ["json"] } tower = { version = "0.4.12", features = ["util", "timeout", "load-shed", "limit"] } tower-http = { version = "0.3.4", features = ["cors"] } http = { version = "0.2.8" } diff --git a/crates/sui-test-validator/src/main.rs b/crates/sui-test-validator/src/main.rs index 9bc44d5e1826a..dc5850653a785 100644 --- a/crates/sui-test-validator/src/main.rs +++ b/crates/sui-test-validator/src/main.rs @@ -100,8 +100,8 @@ async fn health() -> &'static str { } async fn faucet_request( - Json(payload): Json, Extension(state): Extension>, + Json(payload): Json, ) -> impl IntoResponse { let result = match payload { FaucetRequest::FixedAmountRequest(FixedAmountRequest { recipient }) => { diff --git a/crates/workspace-hack/Cargo.toml b/crates/workspace-hack/Cargo.toml index d53f17ac4306d..7d83e4c06ad98 100644 --- a/crates/workspace-hack/Cargo.toml +++ b/crates/workspace-hack/Cargo.toml @@ -55,10 +55,8 @@ atoi = { version = "1", default-features = false } atomicwrites = { version = "0.3", default-features = false } atty = { version = "0.2", default-features = false } auto_ops = { version = "0.3", default-features = false } -axum-d8f496e17d97b5cb = { package = "axum", version = "0.5" } -axum-3b31131e45eafb45 = { package = "axum", version = "0.6" } -axum-core-6f8ce4dd05d13bba = { package = "axum-core", version = "0.2", default-features = false } -axum-core-468e82937335b1c9 = { package = "axum-core", version = "0.3", default-features = false } +axum = { version = "0.6" } +axum-core = { version = "0.3", default-features = false } axum-extra = { version = "0.4" } axum-server = { version = "0.4" } backoff = { version = "0.4", features = ["tokio"] } @@ -720,10 +718,8 @@ atomicwrites = { version = "0.3", default-features = false } atty = { version = "0.2", default-features = false } auto_ops = { version = "0.3", default-features = false } autocfg = { version = "1", default-features = false } -axum-d8f496e17d97b5cb = { package = "axum", version = "0.5" } -axum-3b31131e45eafb45 = { package = "axum", version = "0.6" } -axum-core-6f8ce4dd05d13bba = { package = "axum-core", version = "0.2", default-features = false } -axum-core-468e82937335b1c9 = { package = "axum-core", version = "0.3", default-features = false } +axum = { version = "0.6" } +axum-core = { version = "0.3", default-features = false } axum-extra = { version = "0.4" } axum-server = { version = "0.4" } backoff = { version = "0.4", features = ["tokio"] } diff --git a/narwhal/network/Cargo.toml b/narwhal/network/Cargo.toml index 4654a6a25b8ca..7ab2730324b5d 100644 --- a/narwhal/network/Cargo.toml +++ b/narwhal/network/Cargo.toml @@ -31,7 +31,7 @@ eyre = "0.6.8" anemo.workspace = true anemo-tower.workspace = true anyhow = "1.0.65" -axum = "0.5.16" +axum = "0.6.2" axum-server = "0.4.2" tower = "0.4.13" fail = "0.5.1" diff --git a/narwhal/node/Cargo.toml b/narwhal/node/Cargo.toml index 9f1e1539281e9..04c1a9fc94aff 100644 --- a/narwhal/node/Cargo.toml +++ b/narwhal/node/Cargo.toml @@ -24,7 +24,7 @@ tracing = "0.1.36" tracing-log = "0.1.3" tracing-subscriber = { version = "0.3.15", features = ["time", "env-filter"] } url = "2.3.1" -axum = "0.5.16" +axum = "0.6.2" itertools = "0.10.5" config = { path = "../config", package = "narwhal-config" }