From b7b4eae094ac2a15e7bcbecf7efbbd55752d1eaa Mon Sep 17 00:00:00 2001 From: SantiagoPittella Date: Fri, 17 Jan 2025 10:32:35 -0300 Subject: [PATCH 01/10] review: remove unused deps --- Cargo.lock | 444 +++++++++++++-------------------- bin/proving-service/Cargo.toml | 5 +- 2 files changed, 173 insertions(+), 276 deletions(-) diff --git a/Cargo.lock b/Cargo.lock index 18a0dbd88..813feaed2 100644 --- a/Cargo.lock +++ b/Cargo.lock @@ -242,10 +242,10 @@ dependencies = [ "axum-core", "bytes", "futures-util", - "http 1.2.0", - "http-body 1.0.1", + "http", + "http-body", "http-body-util", - "hyper 1.5.2", + "hyper", "hyper-util", "itoa", "matchit", @@ -258,7 +258,7 @@ dependencies = [ "serde_json", "serde_path_to_error", "serde_urlencoded", - "sync_wrapper 1.0.2", + "sync_wrapper", "tokio", "tower 0.5.2", "tower-layer", @@ -275,13 +275,13 @@ dependencies = [ "async-trait", "bytes", "futures-util", - "http 1.2.0", - "http-body 1.0.1", + "http", + "http-body", "http-body-util", "mime", "pin-project-lite", "rustversion", - "sync_wrapper 1.0.2", + "sync_wrapper", "tower-layer", "tower-service", "tracing", @@ -311,12 +311,6 @@ dependencies = [ "backtrace", ] -[[package]] -name = "base64" -version = "0.21.7" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "9d297deb1925b89f2ccc13d7635fa0714f12c87adce1c75356b39ca9b7178567" - [[package]] name = "base64" version = "0.22.1" @@ -1092,25 +1086,6 @@ version = "0.3.2" source = "registry+https://github.com/rust-lang/crates.io-index" checksum = "a8d1add55171497b4705a648c6b583acafb01d58050a51727785f0b2c8e0a2b2" -[[package]] -name = "h2" -version = "0.3.26" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "81fe527a889e1532da5c525686d96d4c2e74cdd345badf8dfef9f6b39dd5f5e8" -dependencies = [ - "bytes", - "fnv", - "futures-core", - "futures-sink", - "futures-util", - "http 0.2.12", - "indexmap 2.7.0", - "slab", - "tokio", - "tokio-util", - "tracing", -] - [[package]] name = "h2" version = "0.4.7" @@ -1122,7 +1097,7 @@ dependencies = [ "fnv", "futures-core", "futures-sink", - "http 1.2.0", + "http", "indexmap 2.7.0", "slab", "tokio", @@ -1178,12 +1153,6 @@ dependencies = [ "libc", ] -[[package]] -name = "hermit-abi" -version = "0.3.9" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "d231dfb89cfffdbc30e7fc41579ed6066ad03abda9e567ccafae602b97ec5024" - [[package]] name = "hermit-abi" version = "0.4.0" @@ -1207,17 +1176,6 @@ dependencies = [ "winapi", ] -[[package]] -name = "http" -version = "0.2.12" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "601cbb57e577e2f5ef5be8e7b83f0f63994f25aa94d673e54a92d5c516d101f1" -dependencies = [ - "bytes", - "fnv", - "itoa", -] - [[package]] name = "http" version = "1.2.0" @@ -1229,17 +1187,6 @@ dependencies = [ "itoa", ] -[[package]] -name = "http-body" -version = "0.4.6" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "7ceab25649e9960c0311ea418d17bee82c0dcec1bd053b5f9a66e265a693bed2" -dependencies = [ - "bytes", - "http 0.2.12", - "pin-project-lite", -] - [[package]] name = "http-body" version = "1.0.1" @@ -1247,7 +1194,7 @@ source = "registry+https://github.com/rust-lang/crates.io-index" checksum = "1efedce1fb8e6913f23e0c92de8e62cd5b772a67e7b3946df930a62566c93184" dependencies = [ "bytes", - "http 1.2.0", + "http", ] [[package]] @@ -1258,8 +1205,8 @@ checksum = "793429d76616a256bcb62c2a2ec2bed781c8307e797e2598c50010f2bee2544f" dependencies = [ "bytes", "futures-util", - "http 1.2.0", - "http-body 1.0.1", + "http", + "http-body", "pin-project-lite", ] @@ -1277,47 +1224,40 @@ checksum = "df3b46402a9d5adb4c86a0cf463f42e19994e3ee891101b1841f30a545cb49a9" [[package]] name = "hyper" -version = "0.14.32" +version = "1.5.2" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "41dfc780fdec9373c01bae43289ea34c972e40ee3c9f6b3c8801a35f35586ce7" +checksum = "256fb8d4bd6413123cc9d91832d78325c48ff41677595be797d90f42969beae0" dependencies = [ "bytes", "futures-channel", - "futures-core", "futures-util", - "h2 0.3.26", - "http 0.2.12", - "http-body 0.4.6", + "h2", + "http", + "http-body", "httparse", "httpdate", "itoa", "pin-project-lite", - "socket2", + "smallvec", "tokio", - "tower-service", - "tracing", "want", ] [[package]] -name = "hyper" -version = "1.5.2" +name = "hyper-rustls" +version = "0.27.5" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "256fb8d4bd6413123cc9d91832d78325c48ff41677595be797d90f42969beae0" +checksum = "2d191583f3da1305256f22463b9bb0471acad48a4e534a5218b9963e9c1f59b2" dependencies = [ - "bytes", - "futures-channel", "futures-util", - "h2 0.4.7", - "http 1.2.0", - "http-body 1.0.1", - "httparse", - "httpdate", - "itoa", - "pin-project-lite", - "smallvec", + "http", + "hyper", + "hyper-util", + "rustls", + "rustls-pki-types", "tokio", - "want", + "tokio-rustls", + "tower-service", ] [[package]] @@ -1326,7 +1266,7 @@ version = "0.5.2" source = "registry+https://github.com/rust-lang/crates.io-index" checksum = "2b90d566bffbce6a75bd8b09a05aa8c2cb1fabb6cb348f8840c9e4c90a0d83b0" dependencies = [ - "hyper 1.5.2", + "hyper", "hyper-util", "pin-project-lite", "tokio", @@ -1335,15 +1275,18 @@ dependencies = [ [[package]] name = "hyper-tls" -version = "0.5.0" +version = "0.6.0" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "d6183ddfa99b85da61a140bea0efc93fdf56ceaa041b37d553518030827f9905" +checksum = "70206fc6890eaca9fde8a0bf71caa2ddfc9fe045ac9e5c70df101a7dbde866e0" dependencies = [ "bytes", - "hyper 0.14.32", + "http-body-util", + "hyper", + "hyper-util", "native-tls", "tokio", "tokio-native-tls", + "tower-service", ] [[package]] @@ -1355,9 +1298,9 @@ dependencies = [ "bytes", "futures-channel", "futures-util", - "http 1.2.0", - "http-body 1.0.1", - "hyper 1.5.2", + "http", + "http-body", + "hyper", "pin-project-lite", "socket2", "tokio", @@ -1554,12 +1497,6 @@ version = "0.1.15" source = "registry+https://github.com/rust-lang/crates.io-index" checksum = "c8fae54786f62fb2918dcfae3d568594e50eb9b5c25bf04371af6fe7516452fb" -[[package]] -name = "integer-encoding" -version = "3.0.4" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "8bb03732005da905c88227371639bf1ad885cc712789c011c31c5fb3ab3ccf02" - [[package]] name = "ipnet" version = "2.10.1" @@ -2062,11 +1999,10 @@ dependencies = [ "miden-tx", "miette", "once_cell", - "opentelemetry 0.27.1", - "opentelemetry-jaeger", + "opentelemetry", "opentelemetry-otlp", - "opentelemetry-semantic-conventions 0.27.0", - "opentelemetry_sdk 0.27.1", + "opentelemetry-semantic-conventions", + "opentelemetry_sdk", "pingora", "pingora-core", "pingora-limits", @@ -2090,7 +2026,6 @@ dependencies = [ "tracing-opentelemetry", "tracing-subscriber", "uuid", - "winter-maybe-async", ] [[package]] @@ -2389,16 +2324,6 @@ dependencies = [ "libm", ] -[[package]] -name = "num_cpus" -version = "1.16.0" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "4161fcb6d602d4d2081af7c3a45852d875a03dd337a6bfdd6e06407b61342a43" -dependencies = [ - "hermit-abi 0.3.9", - "libc", -] - [[package]] name = "object" version = "0.36.7" @@ -2464,20 +2389,6 @@ dependencies = [ "vcpkg", ] -[[package]] -name = "opentelemetry" -version = "0.23.0" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "1b69a91d4893e713e06f724597ad630f1fa76057a5e1026c0ca67054a9032a76" -dependencies = [ - "futures-core", - "futures-sink", - "js-sys", - "once_cell", - "pin-project-lite", - "thiserror 1.0.69", -] - [[package]] name = "opentelemetry" version = "0.27.1" @@ -2492,21 +2403,6 @@ dependencies = [ "tracing", ] -[[package]] -name = "opentelemetry-jaeger" -version = "0.22.0" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "501b471b67b746d9a07d4c29f8be00f952d1a2eca356922ede0098cbaddff19f" -dependencies = [ - "async-trait", - "futures-core", - "futures-util", - "opentelemetry 0.23.0", - "opentelemetry-semantic-conventions 0.15.0", - "opentelemetry_sdk 0.23.0", - "thrift", -] - [[package]] name = "opentelemetry-otlp" version = "0.27.0" @@ -2515,10 +2411,10 @@ checksum = "91cf61a1868dacc576bf2b2a1c3e9ab150af7272909e80085c3173384fe11f76" dependencies = [ "async-trait", "futures-core", - "http 1.2.0", - "opentelemetry 0.27.1", + "http", + "opentelemetry", "opentelemetry-proto", - "opentelemetry_sdk 0.27.1", + "opentelemetry_sdk", "prost", "thiserror 1.0.69", "tokio", @@ -2532,43 +2428,18 @@ version = "0.27.0" source = "registry+https://github.com/rust-lang/crates.io-index" checksum = "a6e05acbfada5ec79023c85368af14abd0b307c015e9064d249b2a950ef459a6" dependencies = [ - "opentelemetry 0.27.1", - "opentelemetry_sdk 0.27.1", + "opentelemetry", + "opentelemetry_sdk", "prost", "tonic", ] -[[package]] -name = "opentelemetry-semantic-conventions" -version = "0.15.0" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "1869fb4bb9b35c5ba8a1e40c9b128a7b4c010d07091e864a29da19e4fe2ca4d7" - [[package]] name = "opentelemetry-semantic-conventions" version = "0.27.0" source = "registry+https://github.com/rust-lang/crates.io-index" checksum = "bc1b6902ff63b32ef6c489e8048c5e253e2e4a803ea3ea7e783914536eb15c52" -[[package]] -name = "opentelemetry_sdk" -version = "0.23.0" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "ae312d58eaa90a82d2e627fd86e075cf5230b3f11794e2ed74199ebbe572d4fd" -dependencies = [ - "async-trait", - "futures-channel", - "futures-executor", - "futures-util", - "lazy_static", - "once_cell", - "opentelemetry 0.23.0", - "ordered-float 4.6.0", - "percent-encoding", - "rand", - "thiserror 1.0.69", -] - [[package]] name = "opentelemetry_sdk" version = "0.27.1" @@ -2580,7 +2451,7 @@ dependencies = [ "futures-executor", "futures-util", "glob", - "opentelemetry 0.27.1", + "opentelemetry", "percent-encoding", "rand", "serde_json", @@ -2590,24 +2461,6 @@ dependencies = [ "tracing", ] -[[package]] -name = "ordered-float" -version = "2.10.1" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "68f19d67e5a2795c94e73e0bb1cc1a7edeb2e28efd39e2e1c9b7a40c1108b11c" -dependencies = [ - "num-traits", -] - -[[package]] -name = "ordered-float" -version = "4.6.0" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "7bb71e1b3fa6ca1c61f383464aaf2bb0e2f8e772a1f01d486832464de363b951" -dependencies = [ - "num-traits", -] - [[package]] name = "os_str_bytes" version = "6.6.1" @@ -2759,7 +2612,7 @@ dependencies = [ "blake2", "bytes", "hex", - "http 1.2.0", + "http", "httparse", "httpdate", "indexmap 1.9.3", @@ -2798,8 +2651,8 @@ dependencies = [ "daemonize", "flate2", "futures", - "h2 0.4.7", - "http 1.2.0", + "h2", + "http", "httparse", "httpdate", "libc", @@ -2845,7 +2698,7 @@ source = "registry+https://github.com/rust-lang/crates.io-index" checksum = "bcb3f62d852da015e76ced56e93e6d52941679a9825281c90f2897841129e59d" dependencies = [ "bytes", - "http 1.2.0", + "http", "httparse", "pingora-error", "pingora-http", @@ -2861,7 +2714,7 @@ source = "registry+https://github.com/rust-lang/crates.io-index" checksum = "70202f126056f366549afc804741e12dd9f419cfc79a0063ab15653007a0f4c6" dependencies = [ "bytes", - "http 1.2.0", + "http", "pingora-error", ] @@ -2894,7 +2747,7 @@ dependencies = [ "derivative", "fnv", "futures", - "http 1.2.0", + "http", "log", "pingora-core", "pingora-error", @@ -2942,8 +2795,8 @@ dependencies = [ "bytes", "clap 3.2.25", "futures", - "h2 0.4.7", - "http 1.2.0", + "h2", + "http", "log", "once_cell", "pingora-cache", @@ -3379,20 +3232,23 @@ checksum = "ba39f3699c378cd8970968dcbff9c43159ea4cfbd88d43c00b22f2ef10a435d2" [[package]] name = "reqwest" -version = "0.11.27" +version = "0.12.12" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "dd67538700a17451e7cba03ac727fb961abb7607553461627b97de0b89cf4a62" +checksum = "43e734407157c3c2034e0258f5e4473ddb361b1e85f95a66690d67264d7cd1da" dependencies = [ - "base64 0.21.7", + "base64", "bytes", "encoding_rs", "futures-core", "futures-util", - "h2 0.3.26", - "http 0.2.12", - "http-body 0.4.6", - "hyper 0.14.32", + "h2", + "http", + "http-body", + "http-body-util", + "hyper", + "hyper-rustls", "hyper-tls", + "hyper-util", "ipnet", "js-sys", "log", @@ -3405,16 +3261,17 @@ dependencies = [ "serde", "serde_json", "serde_urlencoded", - "sync_wrapper 0.1.2", + "sync_wrapper", "system-configuration", "tokio", "tokio-native-tls", + "tower 0.5.2", "tower-service", "url", "wasm-bindgen", "wasm-bindgen-futures", "web-sys", - "winreg", + "windows-registry", ] [[package]] @@ -3426,6 +3283,21 @@ dependencies = [ "bytemuck", ] +[[package]] +name = "ring" +version = "0.17.8" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "c17fa4cb658e3583423e915b9f3acc01cceaee1860e33d59ebae66adc3a2dc0d" +dependencies = [ + "cc", + "cfg-if", + "getrandom", + "libc", + "spin", + "untrusted", + "windows-sys 0.52.0", +] + [[package]] name = "rmp" version = "0.8.14" @@ -3525,13 +3397,43 @@ dependencies = [ "windows-sys 0.59.0", ] +[[package]] +name = "rustls" +version = "0.23.21" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "8f287924602bf649d949c63dc8ac8b235fa5387d394020705b80c4eb597ce5b8" +dependencies = [ + "once_cell", + "rustls-pki-types", + "rustls-webpki", + "subtle", + "zeroize", +] + [[package]] name = "rustls-pemfile" -version = "1.0.4" +version = "2.2.0" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "1c74cae0a4cf6ccbbf5f359f08efdf8ee7e1dc532573bf0db71968cb56b1448c" +checksum = "dce314e5fee3f39953d46bb63bb8a46d40c2f8fb7cc5a3b6cab2bde9721d6e50" dependencies = [ - "base64 0.21.7", + "rustls-pki-types", +] + +[[package]] +name = "rustls-pki-types" +version = "1.10.1" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "d2bf47e6ff922db3825eb750c4e2ff784c6ff8fb9e13046ef6a1d1c5401b0b37" + +[[package]] +name = "rustls-webpki" +version = "0.102.8" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "64ca1bc8749bd4cf37b5ce386cc146580777b4e8572c7b97baf22c83f444bee9" +dependencies = [ + "ring", + "rustls-pki-types", + "untrusted", ] [[package]] @@ -3964,17 +3866,14 @@ dependencies = [ "unicode-ident", ] -[[package]] -name = "sync_wrapper" -version = "0.1.2" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "2047c6ded9c721764247e62cd3b03c09ffc529b2ba5b10ec482ae507a4a70160" - [[package]] name = "sync_wrapper" version = "1.0.2" source = "registry+https://github.com/rust-lang/crates.io-index" checksum = "0bf256ce5efdfa370213c1dabab5935a12e49f2c58d15e9eac2870d3b4f27263" +dependencies = [ + "futures-core", +] [[package]] name = "synstructure" @@ -3989,20 +3888,20 @@ dependencies = [ [[package]] name = "system-configuration" -version = "0.5.1" +version = "0.6.1" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "ba3a3adc5c275d719af8cb4272ea1c4a6d668a777f37e115f6d11ddbc1c8e0e7" +checksum = "3c879d448e9d986b661742763247d3693ed13609438cf3d006f51f5368a5ba6b" dependencies = [ - "bitflags 1.3.2", + "bitflags 2.7.0", "core-foundation", "system-configuration-sys", ] [[package]] name = "system-configuration-sys" -version = "0.5.0" +version = "0.6.0" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "a75fb188eb626b924683e3b95e3a48e63551fcfb51949de2f06a9d91dbee93c9" +checksum = "8e1d1b10ced5ca923a1fcb8d03e96b8d3268065d724548c0211415ff6ac6bac4" dependencies = [ "core-foundation-sys", "libc", @@ -4129,28 +4028,6 @@ dependencies = [ "once_cell", ] -[[package]] -name = "threadpool" -version = "1.8.1" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "d050e60b33d41c19108b32cea32164033a9013fe3b46cbd4457559bfbf77afaa" -dependencies = [ - "num_cpus", -] - -[[package]] -name = "thrift" -version = "0.17.0" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "7e54bc85fc7faa8bc175c4bab5b92ba8d9a3ce893d0e9f42cc455c8ab16a9e09" -dependencies = [ - "byteorder", - "integer-encoding", - "log", - "ordered-float 2.10.1", - "threadpool", -] - [[package]] name = "thrift_codec" version = "0.1.1" @@ -4229,6 +4106,16 @@ dependencies = [ "tokio", ] +[[package]] +name = "tokio-rustls" +version = "0.26.1" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "5f6d0975eaace0cf0fcadee4e4aaa5da15b5c079146f2cffb67c113be122bf37" +dependencies = [ + "rustls", + "tokio", +] + [[package]] name = "tokio-stream" version = "0.1.17" @@ -4309,13 +4196,13 @@ dependencies = [ "async-stream", "async-trait", "axum", - "base64 0.22.1", + "base64", "bytes", - "h2 0.4.7", - "http 1.2.0", - "http-body 1.0.1", + "h2", + "http", + "http-body", "http-body-util", - "hyper 1.5.2", + "hyper", "hyper-timeout", "hyper-util", "percent-encoding", @@ -4363,10 +4250,10 @@ version = "0.12.3" source = "registry+https://github.com/rust-lang/crates.io-index" checksum = "5299dd20801ad736dccb4a5ea0da7376e59cd98f213bf1c3d478cf53f4834b58" dependencies = [ - "base64 0.22.1", + "base64", "bytes", - "http 1.2.0", - "http-body 1.0.1", + "http", + "http-body", "http-body-util", "pin-project", "tokio-stream", @@ -4383,12 +4270,12 @@ version = "0.6.0" source = "registry+https://github.com/rust-lang/crates.io-index" checksum = "ef5ca6e7bdd0042c440d36b6df97c1436f1d45871ce18298091f114004b1beb4" dependencies = [ - "base64 0.22.1", + "base64", "byteorder", "bytes", "futures-util", - "http 1.2.0", - "http-body 1.0.1", + "http", + "http-body", "http-body-util", "httparse", "js-sys", @@ -4431,7 +4318,7 @@ dependencies = [ "futures-core", "futures-util", "pin-project-lite", - "sync_wrapper 1.0.2", + "sync_wrapper", "tokio", "tower-layer", "tower-service", @@ -4446,8 +4333,8 @@ checksum = "1e9cd434a998747dd2c4276bc96ee2e0c7a2eadf3cae88e52be55a05fa9053f5" dependencies = [ "bitflags 2.7.0", "bytes", - "http 1.2.0", - "http-body 1.0.1", + "http", + "http-body", "http-body-util", "pin-project-lite", "tower-layer", @@ -4518,8 +4405,8 @@ checksum = "97a971f6058498b5c0f1affa23e7ea202057a7301dbff68e968b2d578bcbd053" dependencies = [ "js-sys", "once_cell", - "opentelemetry 0.27.1", - "opentelemetry_sdk 0.27.1", + "opentelemetry", + "opentelemetry_sdk", "smallvec", "tracing", "tracing-core", @@ -4661,6 +4548,12 @@ version = "0.2.6" source = "registry+https://github.com/rust-lang/crates.io-index" checksum = "ebc1c04c71510c7f702b52b7c350734c9ff1295c464a03335b00bb84fc54f853" +[[package]] +name = "untrusted" +version = "0.9.0" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "8ecb6da28b8a351d773b68d5825ac39017e680750f980f3a1a85cd8dd28a47c1" + [[package]] name = "url" version = "2.5.4" @@ -4942,6 +4835,17 @@ dependencies = [ "syn 2.0.96", ] +[[package]] +name = "windows-registry" +version = "0.2.0" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "e400001bb720a623c1c69032f8e3e4cf09984deec740f007dd2b03ec864804b0" +dependencies = [ + "windows-result", + "windows-strings", + "windows-targets 0.52.6", +] + [[package]] name = "windows-result" version = "0.2.0" @@ -5118,16 +5022,6 @@ dependencies = [ "memchr", ] -[[package]] -name = "winreg" -version = "0.50.0" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "524e57b2c537c0f9b1e69f1965311ec12182b4122e45035b1508cd24d2adadb1" -dependencies = [ - "cfg-if", - "windows-sys 0.48.0", -] - [[package]] name = "winter-air" version = "0.10.3" @@ -5323,6 +5217,12 @@ dependencies = [ "synstructure", ] +[[package]] +name = "zeroize" +version = "1.8.1" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "ced3678a2879b30306d323f4542626697a464a97c0a07c9aebf7ebca65cd4dde" + [[package]] name = "zerovec" version = "0.10.4" diff --git a/bin/proving-service/Cargo.toml b/bin/proving-service/Cargo.toml index bf8ec6438..ddb3a5185 100644 --- a/bin/proving-service/Cargo.toml +++ b/bin/proving-service/Cargo.toml @@ -17,7 +17,6 @@ path = "src/main.rs" [features] default = ["concurrent"] -testing = ["miden-objects/testing", "miden-lib/testing", "miden-tx/testing"] concurrent = ["miden-tx/concurrent"] [dependencies] @@ -34,14 +33,13 @@ opentelemetry = { version = "0.27", features = ["metrics", "trace"] } opentelemetry-otlp = { version = "0.27", features = ["grpc-tonic"] } opentelemetry_sdk = { version = "0.27", features = ["metrics", "rt-tokio"] } opentelemetry-semantic-conventions = "0.27" -opentelemetry-jaeger = "0.22" prometheus = "0.13" prost = { version = "0.13", default-features = false, features = ["derive"] } pingora = { version = "0.4", features = [ "lb" ] } pingora-core = "0.4" pingora-proxy = "0.4" pingora-limits = "0.4" -reqwest = { version = "0.11" } +reqwest = { version = "0.12" } serde = { version = "1.0", features = ["derive"] } serde_qs = { version = "0.13" } tokio = { version = "1.38", features = ["full"] } @@ -55,7 +53,6 @@ tracing = { version = "0.1" } tracing-opentelemetry = "0.28" tracing-subscriber = { version = "0.3", features = ["fmt", "json", "env-filter"] } uuid = { version = "1.11", features = ["v4"] } -winter-maybe-async = { version = "0.10" } [dev-dependencies] miden-lib = { workspace = true , default-features = false, features = ["testing"]} From f020bf94b21aa774c9aee469660a18f4b2e73a88 Mon Sep 17 00:00:00 2001 From: SantiagoPittella Date: Fri, 17 Jan 2025 10:33:05 -0300 Subject: [PATCH 02/10] review: remove testing feature from docs and README --- Makefile | 4 ---- bin/proving-service/README.md | 8 -------- 2 files changed, 12 deletions(-) diff --git a/Makefile b/Makefile index 17fbccefc..f10f73383 100644 --- a/Makefile +++ b/Makefile @@ -129,7 +129,3 @@ bench-tx: ## Run transaction benchmarks .PHONY: install-proving-service install-proving-service: ## Install proving service's CLI cargo install --path bin/proving-service --bin miden-proving-service --locked --features concurrent - -.PHONY: install-proving-service-testing -install-proving-service-testing: ## Install proving service's CLI intended for testing purposes - cargo install --path bin/proving-service --bin miden-proving-service --locked --features concurrent,testing diff --git a/bin/proving-service/README.md b/bin/proving-service/README.md index 7b5d71ef2..8a7dc70a9 100644 --- a/bin/proving-service/README.md +++ b/bin/proving-service/README.md @@ -16,12 +16,6 @@ make install-proving-service The CLI can be installed from the source code using specific git revisions with `cargo install`. Note that since these aren't official releases we cannot provide much support for any issues you run into, so consider this for advanced users only. -Note that for the prover worker you might need to enable the `testing` feature in case the transactions were executed with reduced proof-of-work requirements (or otherwise, the proving process will fail). This step will also generate the necessary protobuf-related files. You can achieve that by generating the binary with: - -```bash -make install-proving-service-testing -``` - ## Worker To start the worker service you will need to run: @@ -154,6 +148,4 @@ Description of this crate's feature: | Features | Description | | ------------ | ------------------------------------------------------------------------------------------------------------| -| `std` | Enable usage of Rust's `std`, use `--no-default-features` for `no-std` support. | | `concurrent` | Enables concurrent code to speed up runtime execution. | -| `testing` | Enables testing utilities and reduces proof-of-work requirements to speed up tests' runtimes. | From 08c0f7de23ca4accef294469ab07b0c31df29147 Mon Sep 17 00:00:00 2001 From: SantiagoPittella Date: Fri, 17 Jan 2025 10:41:07 -0300 Subject: [PATCH 03/10] review: remove once_cell dep --- Cargo.lock | 1 - bin/proving-service/Cargo.toml | 1 - bin/proving-service/src/proxy/mod.rs | 7 +++---- 3 files changed, 3 insertions(+), 6 deletions(-) diff --git a/Cargo.lock b/Cargo.lock index 813feaed2..7ef81b350 100644 --- a/Cargo.lock +++ b/Cargo.lock @@ -1998,7 +1998,6 @@ dependencies = [ "miden-objects", "miden-tx", "miette", - "once_cell", "opentelemetry", "opentelemetry-otlp", "opentelemetry-semantic-conventions", diff --git a/bin/proving-service/Cargo.toml b/bin/proving-service/Cargo.toml index ddb3a5185..f7fdec068 100644 --- a/bin/proving-service/Cargo.toml +++ b/bin/proving-service/Cargo.toml @@ -28,7 +28,6 @@ figment = { version = "0.10", features = ["toml", "env"] } miden-lib = { workspace = true, default-features = false } miden-objects = { workspace = true, default-features = false, features = ["std"] } miden-tx = { workspace = true, default-features = false, features = ["std"] } -once_cell = "1.19" opentelemetry = { version = "0.27", features = ["metrics", "trace"] } opentelemetry-otlp = { version = "0.27", features = ["grpc-tonic"] } opentelemetry_sdk = { version = "0.27", features = ["metrics", "rt-tokio"] } diff --git a/bin/proving-service/src/proxy/mod.rs b/bin/proving-service/src/proxy/mod.rs index 511a102ad..7e770322d 100644 --- a/bin/proving-service/src/proxy/mod.rs +++ b/bin/proving-service/src/proxy/mod.rs @@ -2,7 +2,7 @@ use std::{ collections::VecDeque, future::Future, pin::Pin, - sync::Arc, + sync::{Arc, LazyLock}, time::{Duration, Instant}, }; @@ -13,7 +13,6 @@ use metrics::{ REQUEST_FAILURE_COUNT, REQUEST_LATENCY, REQUEST_RETRIES, WORKER_BUSY, WORKER_COUNT, WORKER_REQUEST_COUNT, WORKER_UNHEALTHY, }; -use once_cell::sync::Lazy; use pingora::{ http::ResponseHeader, lb::Backend, @@ -275,7 +274,7 @@ impl LoadBalancerState { } /// Rate limiter -static RATE_LIMITER: Lazy = Lazy::new(|| Rate::new(Duration::from_secs(1))); +static RATE_LIMITER: LazyLock = LazyLock::new(|| Rate::new(Duration::from_secs(1))); // REQUEST QUEUE // ================================================================================================ @@ -329,7 +328,7 @@ impl RequestQueue { } /// Shared state. It keeps track of the order of the requests to then assign them to the workers. -static QUEUE: Lazy = Lazy::new(RequestQueue::new); +static QUEUE: LazyLock = LazyLock::new(RequestQueue::new); // REQUEST CONTEXT // ================================================================================================ From 173a553f6bdc46388f20f25f72c71fdf0262a819 Mon Sep 17 00:00:00 2001 From: SantiagoPittella Date: Fri, 17 Jan 2025 10:41:30 -0300 Subject: [PATCH 04/10] review: add license section to readme --- bin/proving-service/README.md | 4 ++++ miden-remote-provers/README.md | 4 ++++ 2 files changed, 8 insertions(+) diff --git a/bin/proving-service/README.md b/bin/proving-service/README.md index 8a7dc70a9..6de1b2782 100644 --- a/bin/proving-service/README.md +++ b/bin/proving-service/README.md @@ -149,3 +149,7 @@ Description of this crate's feature: | Features | Description | | ------------ | ------------------------------------------------------------------------------------------------------------| | `concurrent` | Enables concurrent code to speed up runtime execution. | + +## License + +This project is [MIT licensed](../LICENSE). diff --git a/miden-remote-provers/README.md b/miden-remote-provers/README.md index 4031a4344..698332618 100644 --- a/miden-remote-provers/README.md +++ b/miden-remote-provers/README.md @@ -10,3 +10,7 @@ Description of this crate's features: | ------------ | ------------------------------------------------------------------------------------------------------------| | `std` | Enable usage of Rust's `std`, use `--no-default-features` for `no-std` support. | | `tx-prover` | Makes the `RemoteTransactionProver` struct public. | + +## License + +This project is [MIT licensed](../LICENSE). From 9444b9a9e3ef1d4a597a64e9bb99ecb97bf7e56a Mon Sep 17 00:00:00 2001 From: SantiagoPittella Date: Fri, 17 Jan 2025 10:44:34 -0300 Subject: [PATCH 05/10] review: use crate_root for proto files dir --- miden-remote-provers/build.rs | 6 +----- 1 file changed, 1 insertion(+), 5 deletions(-) diff --git a/miden-remote-provers/build.rs b/miden-remote-provers/build.rs index 9ac9f1cdb..8799c04ce 100644 --- a/miden-remote-provers/build.rs +++ b/miden-remote-provers/build.rs @@ -27,11 +27,7 @@ fn compile_tonic_client_proto() -> miette::Result<()> { let dst_dir = crate_root.join("src").join("generated"); // Compute the directory of the `proto` definitions - let cwd: PathBuf = env::current_dir().expect("current directory"); - - let cwd = cwd.parent().expect("navigating to parent directory"); - - let proto_dir: PathBuf = cwd.join("proto"); + let proto_dir = crate_root.parent().expect("workspace root should exist").join("proto"); // Remove `api.rs` if it exists. fs::remove_file(dst_dir.join("api.rs")).into_diagnostic().ok(); From 0d5020d4669f4b85190ba1737b60f83d4c4225fd Mon Sep 17 00:00:00 2001 From: SantiagoPittella Date: Fri, 17 Jan 2025 11:47:12 -0300 Subject: [PATCH 06/10] review: rename midne-remote-provers, mark it as no_std in lib.rs --- CHANGELOG.md | 2 +- Cargo.lock | 2 +- Cargo.toml | 2 +- .../Cargo.toml | 4 ++-- .../README.md | 0 .../build.rs | 0 .../src/generated/mod.rs | 0 .../src/generated/nostd/api.rs | 0 .../src/generated/nostd/mod.rs | 0 .../src/generated/std/api.rs | 0 .../src/generated/std/mod.rs | 0 .../src/lib.rs | 10 +++++++--- .../src/prover.rs | 0 13 files changed, 12 insertions(+), 8 deletions(-) rename {miden-remote-provers => miden-proving-service-client}/Cargo.toml (94%) rename {miden-remote-provers => miden-proving-service-client}/README.md (100%) rename {miden-remote-provers => miden-proving-service-client}/build.rs (100%) rename {miden-remote-provers => miden-proving-service-client}/src/generated/mod.rs (100%) rename {miden-remote-provers => miden-proving-service-client}/src/generated/nostd/api.rs (100%) rename {miden-remote-provers => miden-proving-service-client}/src/generated/nostd/mod.rs (100%) rename {miden-remote-provers => miden-proving-service-client}/src/generated/std/api.rs (100%) rename {miden-remote-provers => miden-proving-service-client}/src/generated/std/mod.rs (100%) rename {miden-remote-provers => miden-proving-service-client}/src/lib.rs (77%) rename {miden-remote-provers => miden-proving-service-client}/src/prover.rs (100%) diff --git a/CHANGELOG.md b/CHANGELOG.md index b361c114c..b97cf06d6 100644 --- a/CHANGELOG.md +++ b/CHANGELOG.md @@ -31,7 +31,7 @@ - Remove multi-threaded account seed generation due to single-threaded generation being faster (#1061). - Made `AccountIdError` public (#1067). - Made `BasicFungibleFaucet::MAX_DECIMALS` public (#1063). -- [BREAKING] Removed `miden-tx-prover` crate and created `miden-proving-service` and `miden-remote-provers` (#1047). +- [BREAKING] Removed `miden-tx-prover` crate and created `miden-proving-service` and `miden-proving-service-client` (#1047). - Deduplicate `masm` procedures across kernel and miden lib to a shared `util` module (#1070). ## 0.6.2 (2024-11-20) diff --git a/Cargo.lock b/Cargo.lock index 7ef81b350..68bf3fe80 100644 --- a/Cargo.lock +++ b/Cargo.lock @@ -2028,7 +2028,7 @@ dependencies = [ ] [[package]] -name = "miden-remote-provers" +name = "miden-proving-service-client" version = "0.1.0" dependencies = [ "async-trait", diff --git a/Cargo.toml b/Cargo.toml index 4a6acab50..dfd217821 100644 --- a/Cargo.toml +++ b/Cargo.toml @@ -3,7 +3,7 @@ resolver = "2" members = [ "miden-lib", "miden-tx", - "miden-remote-provers", + "miden-proving-service-client", "objects", "bin/bench-tx", "bin/proving-service", diff --git a/miden-remote-provers/Cargo.toml b/miden-proving-service-client/Cargo.toml similarity index 94% rename from miden-remote-provers/Cargo.toml rename to miden-proving-service-client/Cargo.toml index d3d2a6228..018c683f7 100644 --- a/miden-remote-provers/Cargo.toml +++ b/miden-proving-service-client/Cargo.toml @@ -1,9 +1,9 @@ [package] -name = "miden-remote-provers" +name = "miden-proving-service-client" version = "0.1.0" description = "client library that provides a client for the remote provers" readme = "README.md" -keywords = ["miden", "miden-remote-provers"] +keywords = ["miden", "miden-proving-service-client"] license.workspace = true authors.workspace = true repository.workspace = true diff --git a/miden-remote-provers/README.md b/miden-proving-service-client/README.md similarity index 100% rename from miden-remote-provers/README.md rename to miden-proving-service-client/README.md diff --git a/miden-remote-provers/build.rs b/miden-proving-service-client/build.rs similarity index 100% rename from miden-remote-provers/build.rs rename to miden-proving-service-client/build.rs diff --git a/miden-remote-provers/src/generated/mod.rs b/miden-proving-service-client/src/generated/mod.rs similarity index 100% rename from miden-remote-provers/src/generated/mod.rs rename to miden-proving-service-client/src/generated/mod.rs diff --git a/miden-remote-provers/src/generated/nostd/api.rs b/miden-proving-service-client/src/generated/nostd/api.rs similarity index 100% rename from miden-remote-provers/src/generated/nostd/api.rs rename to miden-proving-service-client/src/generated/nostd/api.rs diff --git a/miden-remote-provers/src/generated/nostd/mod.rs b/miden-proving-service-client/src/generated/nostd/mod.rs similarity index 100% rename from miden-remote-provers/src/generated/nostd/mod.rs rename to miden-proving-service-client/src/generated/nostd/mod.rs diff --git a/miden-remote-provers/src/generated/std/api.rs b/miden-proving-service-client/src/generated/std/api.rs similarity index 100% rename from miden-remote-provers/src/generated/std/api.rs rename to miden-proving-service-client/src/generated/std/api.rs diff --git a/miden-remote-provers/src/generated/std/mod.rs b/miden-proving-service-client/src/generated/std/mod.rs similarity index 100% rename from miden-remote-provers/src/generated/std/mod.rs rename to miden-proving-service-client/src/generated/std/mod.rs diff --git a/miden-remote-provers/src/lib.rs b/miden-proving-service-client/src/lib.rs similarity index 77% rename from miden-remote-provers/src/lib.rs rename to miden-proving-service-client/src/lib.rs index a7f005324..60f2f81e7 100644 --- a/miden-remote-provers/src/lib.rs +++ b/miden-proving-service-client/src/lib.rs @@ -1,6 +1,10 @@ +#![no_std] +use alloc::string::{String, ToString}; + extern crate alloc; -use alloc::string::String; +#[cfg(feature = "std")] +extern crate std; use thiserror::Error; @@ -12,8 +16,8 @@ mod prover; #[cfg(feature = "tx-prover")] pub use prover::RemoteTransactionProver; -/// Contains the protobuf definitions -pub const PROTO_MESSAGES: &str = include_str!("../../proto/api.proto"); +/// Protobuf definition for the Miden proving service +pub const SERVICE_PROTO: &str = include_str!("../../proto/api.proto"); /// ERRORS /// =============================================================================================== diff --git a/miden-remote-provers/src/prover.rs b/miden-proving-service-client/src/prover.rs similarity index 100% rename from miden-remote-provers/src/prover.rs rename to miden-proving-service-client/src/prover.rs From 492e3abf1c9fc9d513a93cba99848ec8af1b1049 Mon Sep 17 00:00:00 2001 From: SantiagoPittella Date: Fri, 17 Jan 2025 11:47:31 -0300 Subject: [PATCH 07/10] chore: update comment in build.rs --- bin/proving-service/build.rs | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/bin/proving-service/build.rs b/bin/proving-service/build.rs index e4187a324..3bb23b9be 100644 --- a/bin/proving-service/build.rs +++ b/bin/proving-service/build.rs @@ -24,7 +24,7 @@ fn compile_tonic_server_proto() -> miette::Result<()> { PathBuf::from(env::var("CARGO_MANIFEST_DIR").expect("CARGO_MANIFEST_DIR should be set")); let dst_dir = crate_root.join("src").join("generated"); - // Construct the path to the miden-remote-provers/proto/api.proto file + // Construct the path to the proto/api.proto file let proto_dir = crate_root .parent() // Go up to the workspace root .expect("bin directory should exist") From 80f2b7de6cb71e92d07e59639f82ad3487d33001 Mon Sep 17 00:00:00 2001 From: SantiagoPittella Date: Fri, 17 Jan 2025 12:09:25 -0300 Subject: [PATCH 08/10] review: do not use .take --- miden-proving-service-client/src/prover.rs | 5 +++-- 1 file changed, 3 insertions(+), 2 deletions(-) diff --git a/miden-proving-service-client/src/prover.rs b/miden-proving-service-client/src/prover.rs index 213e6370d..2318d0a38 100644 --- a/miden-proving-service-client/src/prover.rs +++ b/miden-proving-service-client/src/prover.rs @@ -80,8 +80,9 @@ impl TransactionProver for RemoteTransactionProver { let mut client = self .client .write() - .take() - .ok_or_else(|| TransactionProverError::other("client should be connected"))?; + .as_ref() + .ok_or_else(|| TransactionProverError::other("client should be connected"))? + .clone(); let request = tonic::Request::new(crate::generated::ProveTransactionRequest { transaction_witness: tx_witness.to_bytes(), From 0158a8aec7b13fb30c5c831eab430ae8cde6f720 Mon Sep 17 00:00:00 2001 From: SantiagoPittella Date: Fri, 17 Jan 2025 12:15:11 -0300 Subject: [PATCH 09/10] review: swap --features and --exclude calls in makefile --- Makefile | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) diff --git a/Makefile b/Makefile index f10f73383..e8034b1d7 100644 --- a/Makefile +++ b/Makefile @@ -23,7 +23,7 @@ clippy: ## Runs Clippy with configs .PHONY: clippy-no-std clippy-no-std: ## Runs Clippy with configs - cargo clippy --no-default-features --target wasm32-unknown-unknown --workspace --lib --exclude miden-proving-service --features tx-prover -- -D warnings + cargo clippy --no-default-features --target wasm32-unknown-unknown --workspace --lib --features tx-prover --exclude miden-proving-service -- -D warnings .PHONY: fix @@ -105,12 +105,12 @@ build: ## By default we should build in release mode .PHONY: build-no-std build-no-std: ## Build without the standard library - ${BUILD_KERNEL_ERRORS} cargo build --no-default-features --target wasm32-unknown-unknown --workspace --lib --exclude miden-proving-service --features tx-prover + ${BUILD_KERNEL_ERRORS} cargo build --no-default-features --target wasm32-unknown-unknown --workspace --lib --features tx-prover --exclude miden-proving-service .PHONY: build-no-std-testing build-no-std-testing: ## Build without the standard library. Includes the `testing` feature - cargo build --no-default-features --target wasm32-unknown-unknown --workspace --exclude miden-bench-tx --exclude miden-proving-service --features testing,tx-prover + cargo build --no-default-features --target wasm32-unknown-unknown --workspace --exclude miden-bench-tx --features testing,tx-prover --exclude miden-proving-service .PHONY: build-async From 952d10a786b99a3a3e773f4fec6703b0459c97e6 Mon Sep 17 00:00:00 2001 From: SantiagoPittella Date: Fri, 17 Jan 2025 14:28:12 -0300 Subject: [PATCH 10/10] review: fix license section in readme --- bin/proving-service/README.md | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/bin/proving-service/README.md b/bin/proving-service/README.md index 6de1b2782..eeba9021d 100644 --- a/bin/proving-service/README.md +++ b/bin/proving-service/README.md @@ -152,4 +152,4 @@ Description of this crate's feature: ## License -This project is [MIT licensed](../LICENSE). +This project is [MIT licensed](../../LICENSE).