diff --git a/Cargo.lock b/Cargo.lock index ac73a5c..fce20ff 100644 --- a/Cargo.lock +++ b/Cargo.lock @@ -819,7 +819,7 @@ dependencies = [ "bytes", "futures-core", "futures-util", - "http", + "http 0.2.11", "mime", "mime_guess", "rand", @@ -832,12 +832,24 @@ version = "0.5.1" source = "registry+https://github.com/rust-lang/crates.io-index" checksum = "e37668cb35145dcfaa1931a5f37fde375eeae8068b4c0d2f289da28a270b2d2c" dependencies = [ - "directories", + "directories 4.0.1", "serde", "thiserror", "toml 0.5.11", ] +[[package]] +name = "confy" +version = "0.6.0" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "15d296c475c6ed4093824c28e222420831d27577aaaf0a1163a3b7fc35b248a5" +dependencies = [ + "directories 5.0.1", + "serde", + "thiserror", + "toml 0.8.8", +] + [[package]] name = "const-hex" version = "1.10.0" @@ -1134,6 +1146,15 @@ dependencies = [ "dirs-sys 0.3.7", ] +[[package]] +name = "directories" +version = "5.0.1" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "9a49173b84e034382284f27f1af4dcbbd231ffa358c0fe316541a7337f376a35" +dependencies = [ + "dirs-sys 0.4.1", +] + [[package]] name = "dirs" version = "4.0.0" @@ -1552,7 +1573,7 @@ dependencies = [ "futures-timer", "futures-util", "hashers", - "http", + "http 0.2.11", "instant", "jsonwebtoken", "once_cell", @@ -1675,7 +1696,7 @@ dependencies = [ "cargo-husky", "chrono", "clap", - "confy", + "confy 0.6.0", "criterion", "derive-getters", "dotenv", @@ -1684,16 +1705,16 @@ dependencies = [ "futures 0.3.29", "hdwallet", "hex", - "http", - "hyper", + "http 1.0.0", + "hyper 1.1.0", "ipfs-api-backend-hyper", "ipfs-api-prelude", "merkle-cbt", "object_store", "rand", "reqwest", - "rustls", - "rustls-pemfile", + "rustls 0.22.2", + "rustls-pemfile 2.0.0", "secp256k1 0.28.0", "serde", "serde_json", @@ -1703,7 +1724,7 @@ dependencies = [ "tempfile", "tokio", "tokio-retry", - "toml 0.7.8", + "toml 0.8.8", "tracing", "tracing-subscriber", ] @@ -1722,7 +1743,7 @@ dependencies = [ "cargo-husky", "chrono", "clap", - "confy", + "confy 0.5.1", "criterion", "derive-getters", "dotenv", @@ -1731,15 +1752,15 @@ dependencies = [ "file-exchange", "futures 0.3.29", "hex", - "http", - "hyper", + "http 0.2.11", + "hyper 0.14.27", "ipfs-api-backend-hyper", "ipfs-api-prelude", "merkle-cbt", "rand", "reqwest", - "rustls", - "rustls-pemfile", + "rustls 0.21.10", + "rustls-pemfile 1.0.4", "secp256k1 0.28.0", "serde", "serde_json", @@ -2034,7 +2055,7 @@ dependencies = [ "futures-core", "futures-sink", "futures-util", - "http", + "http 0.2.11", "indexmap", "slab", "tokio", @@ -2132,6 +2153,17 @@ dependencies = [ "itoa", ] +[[package]] +name = "http" +version = "1.0.0" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "b32afd38673a8016f7c9ae69e5af41a58f81b1d31689040f2f1959594ce194ea" +dependencies = [ + "bytes", + "fnv", + "itoa", +] + [[package]] name = "http-body" version = "0.4.6" @@ -2139,10 +2171,20 @@ source = "registry+https://github.com/rust-lang/crates.io-index" checksum = "7ceab25649e9960c0311ea418d17bee82c0dcec1bd053b5f9a66e265a693bed2" dependencies = [ "bytes", - "http", + "http 0.2.11", "pin-project-lite", ] +[[package]] +name = "http-body" +version = "1.0.0" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "1cac85db508abc24a2e48553ba12a996e87244a0395ce011e62b37158745d643" +dependencies = [ + "bytes", + "http 1.0.0", +] + [[package]] name = "httparse" version = "1.8.0" @@ -2172,8 +2214,8 @@ dependencies = [ "futures-core", "futures-util", "h2", - "http", - "http-body", + "http 0.2.11", + "http-body 0.4.6", "httparse", "httpdate", "itoa", @@ -2185,6 +2227,20 @@ dependencies = [ "want", ] +[[package]] +name = "hyper" +version = "1.1.0" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "fb5aa53871fc917b1a9ed87b683a5d86db645e23acb32c2e0785a353e522fb75" +dependencies = [ + "bytes", + "http 1.0.0", + "http-body 1.0.0", + "httpdate", + "pin-project-lite", + "tokio", +] + [[package]] name = "hyper-multipart-rfc7578" version = "0.8.0" @@ -2194,8 +2250,8 @@ dependencies = [ "bytes", "common-multipart-rfc7578", "futures-core", - "http", - "hyper", + "http 0.2.11", + "hyper 0.14.27", ] [[package]] @@ -2205,9 +2261,9 @@ source = "registry+https://github.com/rust-lang/crates.io-index" checksum = "ec3efd23720e2049821a693cbc7e65ea87c72f1c58ff2f9522ff332b1491e590" dependencies = [ "futures-util", - "http", - "hyper", - "rustls", + "http 0.2.11", + "hyper 0.14.27", + "rustls 0.21.10", "tokio", "tokio-rustls", ] @@ -2219,7 +2275,7 @@ source = "registry+https://github.com/rust-lang/crates.io-index" checksum = "d6183ddfa99b85da61a140bea0efc93fdf56ceaa041b37d553518030827f9905" dependencies = [ "bytes", - "hyper", + "hyper 0.14.27", "native-tls", "tokio", "tokio-native-tls", @@ -2340,8 +2396,8 @@ dependencies = [ "base64 0.13.1", "bytes", "futures 0.3.29", - "http", - "hyper", + "http 0.2.11", + "hyper 0.14.27", "hyper-multipart-rfc7578", "ipfs-api-prelude", "thiserror", @@ -2359,7 +2415,7 @@ dependencies = [ "common-multipart-rfc7578", "dirs 4.0.0", "futures 0.3.29", - "http", + "http 0.2.11", "multiaddr", "multibase", "serde", @@ -2407,6 +2463,15 @@ dependencies = [ "either", ] +[[package]] +name = "itertools" +version = "0.12.0" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "25db6b064527c5d482d0423354fcd07a89a2dfe07b67892e62411946db7f07b0" +dependencies = [ + "either", +] + [[package]] name = "itoa" version = "1.0.10" @@ -2812,9 +2877,9 @@ dependencies = [ [[package]] name = "object_store" -version = "0.8.0" +version = "0.9.0" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "2524735495ea1268be33d200e1ee97455096a0846295a21548cd2f3541de7050" +checksum = "d139f545f64630e2e3688fd9f81c470888ab01edeb72d13b4e86c566f1130000" dependencies = [ "async-trait", "base64 0.21.5", @@ -2822,15 +2887,15 @@ dependencies = [ "chrono", "futures 0.3.29", "humantime", - "hyper", - "itertools 0.11.0", + "hyper 0.14.27", + "itertools 0.12.0", "parking_lot", "percent-encoding", "quick-xml", "rand", "reqwest", "ring 0.17.7", - "rustls-pemfile", + "rustls-pemfile 2.0.0", "serde", "serde_json", "snafu", @@ -3496,9 +3561,9 @@ dependencies = [ "futures-core", "futures-util", "h2", - "http", - "http-body", - "hyper", + "http 0.2.11", + "http-body 0.4.6", + "hyper 0.14.27", "hyper-rustls", "hyper-tls", "ipnet", @@ -3510,8 +3575,9 @@ dependencies = [ "once_cell", "percent-encoding", "pin-project-lite", - "rustls", - "rustls-pemfile", + "rustls 0.21.10", + "rustls-native-certs", + "rustls-pemfile 1.0.4", "serde", "serde_json", "serde_urlencoded", @@ -3707,10 +3773,36 @@ checksum = "f9d5a6813c0759e4609cd494e8e725babae6a2ca7b62a5536a13daaec6fcb7ba" dependencies = [ "log", "ring 0.17.7", - "rustls-webpki", + "rustls-webpki 0.101.7", "sct", ] +[[package]] +name = "rustls" +version = "0.22.2" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "e87c9956bd9807afa1f77e0f7594af32566e830e088a5576d27c5b6f30f49d41" +dependencies = [ + "log", + "ring 0.17.7", + "rustls-pki-types", + "rustls-webpki 0.102.1", + "subtle", + "zeroize", +] + +[[package]] +name = "rustls-native-certs" +version = "0.6.3" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "a9aace74cb666635c918e9c12bc0d348266037aa8eb599b5cba565709a8dff00" +dependencies = [ + "openssl-probe", + "rustls-pemfile 1.0.4", + "schannel", + "security-framework", +] + [[package]] name = "rustls-pemfile" version = "1.0.4" @@ -3720,6 +3812,22 @@ dependencies = [ "base64 0.21.5", ] +[[package]] +name = "rustls-pemfile" +version = "2.0.0" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "35e4980fa29e4c4b212ffb3db068a564cbf560e51d3944b7c88bd8bf5bec64f4" +dependencies = [ + "base64 0.21.5", + "rustls-pki-types", +] + +[[package]] +name = "rustls-pki-types" +version = "1.1.0" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "9e9d979b3ce68192e42760c7810125eb6cf2ea10efae545a156063e61f314e2a" + [[package]] name = "rustls-webpki" version = "0.101.7" @@ -3730,6 +3838,17 @@ dependencies = [ "untrusted 0.9.0", ] +[[package]] +name = "rustls-webpki" +version = "0.102.1" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "ef4ca26037c909dedb327b48c3327d0ba91d3dd3c4e05dad328f210ffb68e95b" +dependencies = [ + "ring 0.17.7", + "rustls-pki-types", + "untrusted 0.9.0", +] + [[package]] name = "rustversion" version = "1.0.14" @@ -4552,7 +4671,7 @@ version = "0.24.1" source = "registry+https://github.com/rust-lang/crates.io-index" checksum = "c28327cf380ac148141087fbfb9de9d7bd4e84ab5d2c28fbc911d753de8a7081" dependencies = [ - "rustls", + "rustls 0.21.10", "tokio", ] @@ -4564,7 +4683,7 @@ checksum = "212d5dcb2a1ce06d81107c3d0ffa3121fe974b73f068c8282cb1c32328113b6c" dependencies = [ "futures-util", "log", - "rustls", + "rustls 0.21.10", "tokio", "tokio-rustls", "tungstenite", @@ -4769,11 +4888,11 @@ dependencies = [ "byteorder", "bytes", "data-encoding", - "http", + "http 0.2.11", "httparse", "log", "rand", - "rustls", + "rustls 0.21.10", "sha1", "thiserror", "url", diff --git a/file-exchange/Cargo.toml b/file-exchange/Cargo.toml index 3812db9..e131c00 100644 --- a/file-exchange/Cargo.toml +++ b/file-exchange/Cargo.toml @@ -24,7 +24,7 @@ build-info = "0.0.34" bytes = "1.0" chrono = "0.4.31" clap = { version = "4.4", features = ["cargo", "unstable-doc"] } -confy = "0.5" +confy = "0.6" derive-getters = "0.3.0" dotenv = "0.15" ethers = "2.0.11" @@ -33,16 +33,16 @@ ethers-core = "2.0.11" futures = { version = "0.3", features = ["compat"] } hdwallet = "0.4.1" hex = "0.4.3" -http = "0.2" -hyper = { version = "0.14.27", features = [ "server" ]} +http = "1.0" +hyper = { version = "1.1", features = [ "server" ]} ipfs-api-backend-hyper = "0.6" ipfs-api-prelude = "0.6" merkle-cbt = "0.3.2" -object_store = {version = "0.8.0", features = [ "http", "aws", "gcp", "azure" ]} +object_store = {version = "0.9", features = [ "http", "aws", "gcp", "azure" ]} rand = "0.8.4" reqwest = { version = "0.11", features = ["json", "stream", "multipart"] } -rustls = "0.21.8" -rustls-pemfile = "1.0.3" +rustls = "0.22" +rustls-pemfile = "2.0" secp256k1 = "0.28.0" serde = { version = "1.0", features = ["derive"] } serde_json = "1.0" @@ -52,7 +52,7 @@ tap_core = { version = "0.7.0", git = "https://github.com/semiotic-ai/timeline-a tempfile = "3.2.0" tokio = { version = "1.28", features = ["time", "sync", "macros", "test-util", "rt-multi-thread"] } tokio-retry = "0.3" -toml = "0.7.4" +toml = "0.8" tracing = "0.1" tracing-subscriber = { version = "0.3", features = [ "env-filter", diff --git a/file-exchange/src/download_client/mod.rs b/file-exchange/src/download_client/mod.rs index 398cacc..b85f829 100644 --- a/file-exchange/src/download_client/mod.rs +++ b/file-exchange/src/download_client/mod.rs @@ -2,9 +2,11 @@ use alloy_primitives::{Address, U256}; use bytes::Bytes; use ethers::providers::{Http, Middleware, Provider}; -use http::header::{AUTHORIZATION, CONTENT_RANGE}; use rand::seq::SliceRandom; -use reqwest::Client; +use reqwest::{ + header::{AUTHORIZATION, CONTENT_RANGE}, + Client, +}; use secp256k1::SecretKey; use std::collections::{HashMap, HashSet}; use std::fs::File; diff --git a/file-exchange/src/manifest/ipfs.rs b/file-exchange/src/manifest/ipfs.rs index bd1096a..f28b0ec 100644 --- a/file-exchange/src/manifest/ipfs.rs +++ b/file-exchange/src/manifest/ipfs.rs @@ -1,8 +1,7 @@ use bytes::Bytes; use futures::Stream; -use http::header::CONTENT_LENGTH; use http::Uri; -use reqwest::multipart; +use reqwest::{header::CONTENT_LENGTH, multipart}; use serde::Deserialize; use std::time::Duration; diff --git a/file-exchange/src/test_util.rs b/file-exchange/src/test_util.rs index b827398..ec11582 100644 --- a/file-exchange/src/test_util.rs +++ b/file-exchange/src/test_util.rs @@ -1,6 +1,5 @@ -use http::StatusCode; -use rand::seq::IteratorRandom; -use rand::{distributions::Alphanumeric, Rng}; +use rand::{distributions::Alphanumeric, seq::IteratorRandom, Rng}; +use reqwest::StatusCode; use std::env; use std::io::Write; use std::time::Duration;