From 5f28b285655b0359ec2ab187fdbff64667a299bd Mon Sep 17 00:00:00 2001 From: Staszek Krotki <16387248+staszek-krotki@users.noreply.github.com> Date: Thu, 9 May 2024 10:03:44 +0200 Subject: [PATCH] use updated gsb http proxy --- Cargo.lock | 218 +++++++++++++++++++++++++++------------------------- Cargo.toml | 20 +++-- src/main.rs | 1 + 3 files changed, 126 insertions(+), 113 deletions(-) diff --git a/Cargo.lock b/Cargo.lock index af81838..e085a50 100644 --- a/Cargo.lock +++ b/Cargo.lock @@ -1658,12 +1658,6 @@ dependencies = [ "static_assertions", ] -[[package]] -name = "fixedbitset" -version = "0.2.0" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "37ab347416e802de484e4d03c7316c48f1ecb56574dfd4a46a80f173ce1de04d" - [[package]] name = "fixedbitset" version = "0.4.2" @@ -1925,7 +1919,7 @@ dependencies = [ [[package]] name = "gftp" version = "0.4.0" -source = "git+https://github.com/golemfactory/yagna.git?rev=891f319668add90938183d7f266790329bcb5f08#891f319668add90938183d7f266790329bcb5f08" +source = "git+https://github.com/golemfactory/yagna.git?rev=eebe86dc36e26a97253f43132a2829f88f40d009#eebe86dc36e26a97253f43132a2829f88f40d009" dependencies = [ "actix-rt", "anyhow", @@ -1941,7 +1935,7 @@ dependencies = [ "tokio", "url", "ya-compile-time-utils", - "ya-core-model", + "ya-core-model 0.9.0", "ya-service-bus", ] @@ -2452,15 +2446,6 @@ dependencies = [ "windows-sys 0.52.0", ] -[[package]] -name = "itertools" -version = "0.9.0" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "284f18f85651fe11e8a991b2adb42cb078325c996ed026d994719efcfca1d54b" -dependencies = [ - "either", -] - [[package]] name = "itertools" version = "0.10.5" @@ -3207,23 +3192,13 @@ dependencies = [ "ucd-trie", ] -[[package]] -name = "petgraph" -version = "0.5.1" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "467d164a6de56270bd7c4d070df81d07beace25012d5103ced4e9ff08d6afdb7" -dependencies = [ - "fixedbitset 0.2.0", - "indexmap 1.9.3", -] - [[package]] name = "petgraph" version = "0.6.4" source = "registry+https://github.com/rust-lang/crates.io-index" checksum = "e1d3afd2628e69da2be385eb6f2fd57c8ac7977ceeff6dc166ff1657b0e386a9" dependencies = [ - "fixedbitset 0.4.2", + "fixedbitset", "indexmap 2.2.6", ] @@ -3422,16 +3397,6 @@ dependencies = [ "unicode-ident", ] -[[package]] -name = "prost" -version = "0.7.0" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "9e6984d2f1a23009bd270b8bb56d0926810a3d483f59c987d77969e9d8e840b2" -dependencies = [ - "bytes 1.6.0", - "prost-derive 0.7.0", -] - [[package]] name = "prost" version = "0.10.4" @@ -3439,25 +3404,7 @@ source = "registry+https://github.com/rust-lang/crates.io-index" checksum = "71adf41db68aa0daaefc69bb30bcd68ded9b9abaad5d1fbb6304c4fb390e083e" dependencies = [ "bytes 1.6.0", - "prost-derive 0.10.1", -] - -[[package]] -name = "prost-build" -version = "0.7.0" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "32d3ebd75ac2679c2af3a92246639f9fcc8a442ee420719cc4fe195b98dd5fa3" -dependencies = [ - "bytes 1.6.0", - "heck 0.3.3", - "itertools 0.9.0", - "log", - "multimap", - "petgraph 0.5.1", - "prost 0.7.0", - "prost-types 0.7.0", - "tempfile", - "which", + "prost-derive", ] [[package]] @@ -3474,27 +3421,14 @@ dependencies = [ "lazy_static", "log", "multimap", - "petgraph 0.6.4", - "prost 0.10.4", - "prost-types 0.10.1", + "petgraph", + "prost", + "prost-types", "regex", "tempfile", "which", ] -[[package]] -name = "prost-derive" -version = "0.7.0" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "169a15f3008ecb5160cba7d37bcd690a7601b6d30cfb87a117d45e59d52af5d4" -dependencies = [ - "anyhow", - "itertools 0.9.0", - "proc-macro2", - "quote", - "syn 1.0.109", -] - [[package]] name = "prost-derive" version = "0.10.1" @@ -3508,16 +3442,6 @@ dependencies = [ "syn 1.0.109", ] -[[package]] -name = "prost-types" -version = "0.7.0" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "b518d7cdd93dab1d1122cf07fa9a60771836c668dde9d9e2a139f957f0d9f1bb" -dependencies = [ - "bytes 1.6.0", - "prost 0.7.0", -] - [[package]] name = "prost-types" version = "0.10.1" @@ -3525,7 +3449,7 @@ source = "registry+https://github.com/rust-lang/crates.io-index" checksum = "2d0a014229361011dc8e69c8a1ec6c2e8d0f2af7c91e3ea3f5b2170298461e68" dependencies = [ "bytes 1.6.0", - "prost 0.10.4", + "prost", ] [[package]] @@ -3774,10 +3698,12 @@ dependencies = [ "tokio", "tokio-native-tls", "tokio-rustls 0.24.1", + "tokio-util", "tower-service", "url", "wasm-bindgen", "wasm-bindgen-futures", + "wasm-streams", "web-sys", "webpki-roots 0.25.4", "winreg", @@ -3952,10 +3878,24 @@ checksum = "f9d5a6813c0759e4609cd494e8e725babae6a2ca7b62a5536a13daaec6fcb7ba" dependencies = [ "log", "ring 0.17.8", - "rustls-webpki", + "rustls-webpki 0.101.7", "sct", ] +[[package]] +name = "rustls" +version = "0.22.4" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "bf4ef73721ac7bcd79b2b315da7779d8fc09718c6b3d2d1b2d94850eb8c18432" +dependencies = [ + "log", + "ring 0.17.8", + "rustls-pki-types", + "rustls-webpki 0.102.3", + "subtle", + "zeroize", +] + [[package]] name = "rustls-pemfile" version = "1.0.4" @@ -3965,6 +3905,12 @@ dependencies = [ "base64 0.21.7", ] +[[package]] +name = "rustls-pki-types" +version = "1.7.0" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "976295e77ce332211c0d24d92c0e83e50f5c5f046d11082cea19f3df13a3562d" + [[package]] name = "rustls-webpki" version = "0.101.7" @@ -3975,6 +3921,17 @@ dependencies = [ "untrusted 0.9.0", ] +[[package]] +name = "rustls-webpki" +version = "0.102.3" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "f3bce581c0dd41bce533ce695a1437fa16a7ab5ac3ccfa99fe1a620a7885eabf" +dependencies = [ + "ring 0.17.8", + "rustls-pki-types", + "untrusted 0.9.0", +] + [[package]] name = "rustversion" version = "1.0.14" @@ -4969,6 +4926,17 @@ dependencies = [ "tokio", ] +[[package]] +name = "tokio-rustls" +version = "0.25.0" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "775e0c0f0adb3a2f22a00c4745d728b479985fc15ee7ca6a2608388c5569860f" +dependencies = [ + "rustls 0.22.4", + "rustls-pki-types", + "tokio", +] + [[package]] name = "tokio-stream" version = "0.1.15" @@ -5447,6 +5415,19 @@ version = "0.2.92" source = "registry+https://github.com/rust-lang/crates.io-index" checksum = "af190c94f2773fdb3729c55b007a722abb5384da03bc0986df4c289bf5567e96" +[[package]] +name = "wasm-streams" +version = "0.4.0" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "b65dc4c90b63b118468cf747d8bf3566c1913ef60be765b5730ead9e0a3ba129" +dependencies = [ + "futures-util", + "js-sys", + "wasm-bindgen", + "wasm-bindgen-futures", + "web-sys", +] + [[package]] name = "web-sys" version = "0.3.69" @@ -5811,7 +5792,6 @@ dependencies = [ [[package]] name = "ya-agreement-utils" version = "0.6.0" -source = "git+https://github.com/golemfactory/yagna.git?rev=891f319668add90938183d7f266790329bcb5f08#891f319668add90938183d7f266790329bcb5f08" dependencies = [ "chrono", "regex", @@ -5889,10 +5869,29 @@ dependencies = [ "ya-service-bus", ] +[[package]] +name = "ya-core-model" +version = "0.9.1" +source = "git+https://github.com/golemfactory/yagna.git?rev=eebe86dc36e26a97253f43132a2829f88f40d009#eebe86dc36e26a97253f43132a2829f88f40d009" +dependencies = [ + "chrono", + "derive_more", + "log", + "serde", + "serde_bytes", + "serde_json", + "serde_json_canonicalizer", + "structopt", + "strum 0.24.1", + "strum_macros 0.24.3", + "thiserror", + "ya-client-model 0.6.0", + "ya-service-bus", +] + [[package]] name = "ya-counters" version = "0.2.0" -source = "git+https://github.com/golemfactory/yagna.git?rev=891f319668add90938183d7f266790329bcb5f08#891f319668add90938183d7f266790329bcb5f08" dependencies = [ "actix", "actix-rt", @@ -5910,13 +5909,14 @@ dependencies = [ [[package]] name = "ya-gsb-http-proxy" version = "0.1.0" -source = "git+https://github.com/golemfactory/yagna.git?rev=891f319668add90938183d7f266790329bcb5f08#891f319668add90938183d7f266790329bcb5f08" +source = "git+https://github.com/golemfactory/yagna.git?rev=eebe86dc36e26a97253f43132a2829f88f40d009#eebe86dc36e26a97253f43132a2829f88f40d009" dependencies = [ "actix", "actix-http", "actix-rt", "actix-web", "async-stream", + "bytes 1.6.0", "chrono", "env_logger 0.10.2", "futures 0.3.30", @@ -5932,7 +5932,7 @@ dependencies = [ "thiserror", "tokio", "ya-client-model 0.6.0", - "ya-core-model", + "ya-core-model 0.9.0", "ya-counters", "ya-service-bus", ] @@ -5981,7 +5981,7 @@ dependencies = [ "tokio-stream", "ya-agreement-utils 0.5.0", "ya-client-model 0.6.0", - "ya-core-model", + "ya-core-model 0.9.1", "ya-counters", "ya-gsb-http-proxy", "ya-runtime-api", @@ -5994,14 +5994,14 @@ dependencies = [ [[package]] name = "ya-runtime-api" version = "0.7.1" -source = "git+https://github.com/golemfactory/yagna.git?rev=891f319668add90938183d7f266790329bcb5f08#891f319668add90938183d7f266790329bcb5f08" +source = "git+https://github.com/golemfactory/yagna.git?rev=eebe86dc36e26a97253f43132a2829f88f40d009#eebe86dc36e26a97253f43132a2829f88f40d009" dependencies = [ "anyhow", "bytes 1.6.0", "futures 0.3.30", "log", - "prost 0.10.4", - "prost-build 0.10.4", + "prost", + "prost-build", "serde", "serde_json", "thiserror", @@ -6012,13 +6012,13 @@ dependencies = [ [[package]] name = "ya-sb-proto" -version = "0.6.1" +version = "0.6.2" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "368d7e4b74c11137caa9a1cd2c590459581ea0d1ee5f7dc7c56082476cd38ce6" +checksum = "69e6b13e3a7d0deab2421046e7fd5b498bd30b9d51d068b3fb4e3278a48bb63f" dependencies = [ "bytes 1.6.0", - "prost 0.10.4", - "prost-build 0.7.0", + "prost", + "prost-build", "thiserror", "tokio", "tokio-util", @@ -6027,21 +6027,25 @@ dependencies = [ [[package]] name = "ya-sb-util" -version = "0.4.1" +version = "0.5.1" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "c525504f7ca7d13825ef10a44005663b91b4b9f3eeebd6768188884bec78a37d" +checksum = "6a2f0f8815c82785a89a3b9bf19b131c2824dd8a5c3da100e93e670e9a0aa702" dependencies = [ "actix", "bitflags 1.3.2", "futures 0.3.30", + "hex", "pin-project 0.4.30", + "ring 0.17.8", + "rustls 0.22.4", + "sha2", ] [[package]] name = "ya-service-bus" -version = "0.7.1" +version = "0.7.3" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "fa60b9089a5bc247cd8942e6e755f7f5fa66b50583fdd0ef4b3807a2ecc00276" +checksum = "ccf9b57e0630c1babdfa4557676be79d476c33225b5a89d13e6cee9c7319e268" dependencies = [ "actix", "flexbuffers", @@ -6050,10 +6054,12 @@ dependencies = [ "log", "miniz_oxide 0.5.4", "rand 0.8.5", + "rustls 0.22.4", "semver 0.11.0", "serde", "thiserror", "tokio", + "tokio-rustls 0.25.0", "tokio-util", "url", "uuid 0.8.2", @@ -6065,7 +6071,7 @@ dependencies = [ [[package]] name = "ya-transfer" version = "0.3.0" -source = "git+https://github.com/golemfactory/yagna.git?rev=891f319668add90938183d7f266790329bcb5f08#891f319668add90938183d7f266790329bcb5f08" +source = "git+https://github.com/golemfactory/yagna.git?rev=eebe86dc36e26a97253f43132a2829f88f40d009#eebe86dc36e26a97253f43132a2829f88f40d009" dependencies = [ "actix", "actix-http", @@ -6096,7 +6102,7 @@ dependencies = [ "url", "walkdir", "ya-client-model 0.6.0", - "ya-core-model", + "ya-core-model 0.9.0", "ya-runtime-api", "ya-service-bus", "ya-utils-futures", @@ -6107,7 +6113,7 @@ dependencies = [ [[package]] name = "ya-utils-futures" version = "0.3.0" -source = "git+https://github.com/golemfactory/yagna.git?rev=891f319668add90938183d7f266790329bcb5f08#891f319668add90938183d7f266790329bcb5f08" +source = "git+https://github.com/golemfactory/yagna.git?rev=eebe86dc36e26a97253f43132a2829f88f40d009#eebe86dc36e26a97253f43132a2829f88f40d009" dependencies = [ "futures 0.3.30", "tokio", @@ -6116,7 +6122,7 @@ dependencies = [ [[package]] name = "ya-utils-path" version = "0.1.0" -source = "git+https://github.com/golemfactory/yagna.git?rev=891f319668add90938183d7f266790329bcb5f08#891f319668add90938183d7f266790329bcb5f08" +source = "git+https://github.com/golemfactory/yagna.git?rev=eebe86dc36e26a97253f43132a2829f88f40d009#eebe86dc36e26a97253f43132a2829f88f40d009" dependencies = [ "anyhow", "directories", @@ -6126,7 +6132,7 @@ dependencies = [ [[package]] name = "ya-utils-process" version = "0.3.0" -source = "git+https://github.com/golemfactory/yagna.git?rev=891f319668add90938183d7f266790329bcb5f08#891f319668add90938183d7f266790329bcb5f08" +source = "git+https://github.com/golemfactory/yagna.git?rev=eebe86dc36e26a97253f43132a2829f88f40d009#eebe86dc36e26a97253f43132a2829f88f40d009" dependencies = [ "actix", "anyhow", diff --git a/Cargo.toml b/Cargo.toml index 596068f..5fdf97f 100644 --- a/Cargo.toml +++ b/Cargo.toml @@ -12,14 +12,14 @@ members = [ ] [dependencies] -ya-core-model = { git = "https://github.com/golemfactory/yagna.git", rev = "891f319668add90938183d7f266790329bcb5f08", features = ["activity", "appkey"] } -ya-runtime-api = { git = "https://github.com/golemfactory/yagna.git", rev = "891f319668add90938183d7f266790329bcb5f08" } -ya-utils-process = { git = "https://github.com/golemfactory/yagna.git", rev = "891f319668add90938183d7f266790329bcb5f08" } -ya-service-bus = "0.7.1" +ya-core-model = { git = "https://github.com/golemfactory/yagna.git", rev = "eebe86dc36e26a97253f43132a2829f88f40d009", features = ["activity", "appkey"] } +ya-runtime-api = { git = "https://github.com/golemfactory/yagna.git", rev = "eebe86dc36e26a97253f43132a2829f88f40d009" } +ya-utils-process = { git = "https://github.com/golemfactory/yagna.git", rev = "eebe86dc36e26a97253f43132a2829f88f40d009" } +ya-service-bus = "0.7.3" ya-client-model = "0.6.0" ya-agreement-utils = "0.5" -ya-transfer = { git = "https://github.com/golemfactory/yagna.git", rev = "891f319668add90938183d7f266790329bcb5f08" } -ya-counters = { git = "https://github.com/golemfactory/yagna.git", rev = "891f319668add90938183d7f266790329bcb5f08" } +ya-transfer = { git = "https://github.com/golemfactory/yagna.git", rev = "eebe86dc36e26a97253f43132a2829f88f40d009" } +ya-counters = { git = "https://github.com/golemfactory/yagna.git", rev = "eebe86dc36e26a97253f43132a2829f88f40d009" } gpu-detection = { path = "gpu-detection" } actix = "0.13" @@ -41,7 +41,7 @@ flexi_logger = { version = "0.28", features = ["colors"] } regex = "1" reqwest = { version = "0.11", features = ["blocking", "json"] } async-stream = "0.3" -ya-gsb-http-proxy = { git = "https://github.com/golemfactory/yagna.git", rev = "891f319668add90938183d7f266790329bcb5f08" } +ya-gsb-http-proxy = { git = "https://github.com/golemfactory/yagna.git", rev = "eebe86dc36e26a97253f43132a2829f88f40d009" } http = "1.1" bytes = "1.5" humantime = "2.1" @@ -55,5 +55,11 @@ predicates = "3.1" [patch.crates-io] ya-core-model = { git = "https://github.com/golemfactory/yagna.git", rev = "891f319668add90938183d7f266790329bcb5f08" } + +[patch."https://github.com/golemfactory/yagna.git"] +#ya-gsb-http-proxy = { path = "../yagna/exe-unit/components/gsb-http-proxy" } +#ya-core-model = { path = "../yagna/core/model" } +ya-counters = { path = "../yagna/exe-unit/components/counters" } + [build-dependencies] static_vcruntime = "2.0" diff --git a/src/main.rs b/src/main.rs index 405cfc6..55f18cd 100644 --- a/src/main.rs +++ b/src/main.rs @@ -466,6 +466,7 @@ async fn run( }); gsb_proxy.bind(&exe_unit_url); + gsb_proxy.bind_streaming(&exe_unit_url); }; send_state( &ctx,