diff --git a/rust/Cargo.lock b/rust/Cargo.lock index 474860fc1..3e3ad424b 100644 --- a/rust/Cargo.lock +++ b/rust/Cargo.lock @@ -1,5 +1,15 @@ # This file is automatically @generated by Cargo. # It is not intended for manual editing. +[[package]] +name = "Inflector" +version = "0.11.4" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "fe438c63458706e03479442743baae6c88256498e6431708f6dfc520a26515d3" +dependencies = [ + "lazy_static", + "regex", +] + [[package]] name = "addr2line" version = "0.14.0" @@ -15,6 +25,15 @@ version = "0.2.3" source = "registry+https://github.com/rust-lang/crates.io-index" checksum = "ee2a4ec343196209d6594e19543ae87a39f96d5534d7174822a3ad825dd6ed7e" +[[package]] +name = "ahash" +version = "0.3.8" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "e8fd72866655d1904d6b0997d0b07ba561047d070fbe29de039031c641b61217" +dependencies = [ + "const-random", +] + [[package]] name = "aho-corasick" version = "0.7.15" @@ -54,6 +73,12 @@ version = "0.4.7" source = "registry+https://github.com/rust-lang/crates.io-index" checksum = "4d25d88fd6b8041580a654f9d0c581a047baee2b3efee13275f2fc392fc75034" +[[package]] +name = "array_tool" +version = "1.0.3" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "8f8cb5d814eb646a863c4f24978cff2880c4be96ad8cde2c0f0678732902e271" + [[package]] name = "arrayref" version = "0.3.6" @@ -66,6 +91,19 @@ version = "0.5.2" source = "registry+https://github.com/rust-lang/crates.io-index" checksum = "23b62fc65de8e4e7f52534fb52b0f3ed04746ae267519eef2a83941e8085068b" +[[package]] +name = "async-compression" +version = "0.3.6" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "fb1ff21a63d3262af46b9f33a826a8d134e2d0d9b2179c86034948b732ea8b2a" +dependencies = [ + "bytes", + "flate2", + "futures-core", + "memchr", + "pin-project-lite 0.1.11", +] + [[package]] name = "async-trait" version = "0.1.42" @@ -352,6 +390,22 @@ dependencies = [ "yaml-rust", ] +[[package]] +name = "console" +version = "0.13.0" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "a50aab2529019abfabfa93f1e6c41ef392f91fbf179b347a7e96abb524884a08" +dependencies = [ + "encode_unicode", + "lazy_static", + "libc", + "regex", + "terminal_size", + "unicode-width", + "winapi 0.3.9", + "winapi-util", +] + [[package]] name = "console_error_panic_hook" version = "0.1.6" @@ -362,6 +416,28 @@ dependencies = [ "wasm-bindgen", ] +[[package]] +name = "const-random" +version = "0.1.12" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "486d435a7351580347279f374cb8a3c16937485441db80181357b7c4d70f17ed" +dependencies = [ + "const-random-macro", + "proc-macro-hack", +] + +[[package]] +name = "const-random-macro" +version = "0.1.12" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "49a84d8ff70e3ec52311109b019c27672b4c1929e4cf7c18bcf0cd9fb5e230be" +dependencies = [ + "getrandom 0.2.0", + "lazy_static", + "proc-macro-hack", + "tiny-keccak", +] + [[package]] name = "const_fn" version = "0.4.3" @@ -499,6 +575,12 @@ dependencies = [ "lazy_static", ] +[[package]] +name = "crunchy" +version = "0.2.2" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "7a81dae078cea95a014a339291cec439d2f232ebe854a9d672b796c6afafa9b7" + [[package]] name = "crypto-mac" version = "0.8.0" @@ -531,6 +613,17 @@ dependencies = [ "memchr", ] +[[package]] +name = "dashmap" +version = "3.11.10" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "0f260e2fc850179ef410018660006951c1b55b79e8087e87111a2c388994b9b5" +dependencies = [ + "ahash", + "cfg-if 0.1.10", + "num_cpus", +] + [[package]] name = "derivative" version = "2.1.1" @@ -587,6 +680,15 @@ dependencies = [ "dirs-sys", ] +[[package]] +name = "dirs" +version = "3.0.1" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "142995ed02755914747cc6ca76fc7e4583cd18578746716d0508ea6ed558b9ff" +dependencies = [ + "dirs-sys", +] + [[package]] name = "dirs-sys" version = "0.3.5" @@ -615,6 +717,12 @@ dependencies = [ "syn", ] +[[package]] +name = "doc-comment" +version = "0.3.3" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "fea41bba32d969b513997752735605054bc0dfa92b4c56bf1189f2e174be7a10" + [[package]] name = "downcast" version = "0.10.0" @@ -627,12 +735,47 @@ version = "0.4.6" source = "registry+https://github.com/rust-lang/crates.io-index" checksum = "134951f4028bdadb9b84baf4232681efbf277da25144b9b0ad65df75946c422b" +[[package]] +name = "e2e" +version = "0.0.0" +dependencies = [ + "anyhow", + "async-trait", + "chrono", + "config", + "console", + "examples", + "futures", + "indicatif", + "influxdb", + "k8s-openapi", + "kube", + "kube-runtime", + "reqwest", + "serde 1.0.117", + "serde_json", + "serde_yaml", + "tokio", + "toml", + "tracing", + "tracing-subscriber", + "xaynet-core", + "xaynet-sdk", + "xaynet-server", +] + [[package]] name = "either" version = "1.6.1" source = "registry+https://github.com/rust-lang/crates.io-index" checksum = "e78d4f1cc4ae33bbfc157ed5d5a5ef3bc29227303d595861deb238fcec4e9457" +[[package]] +name = "encode_unicode" +version = "0.3.6" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "a357d28ed41a50f9c765dbfe56cbc04a64e53e5fc58ba79fbc34c10ef3df831f" + [[package]] name = "encoding_rs" version = "0.8.26" @@ -642,6 +785,19 @@ dependencies = [ "cfg-if 1.0.0", ] +[[package]] +name = "env_logger" +version = "0.7.1" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "44533bbbb3bb3c1fa17d9f2e4e38bbbaf8396ba82193c4cb1b6445d711445d36" +dependencies = [ + "atty", + "humantime", + "log", + "regex", + "termcolor", +] + [[package]] name = "examples" version = "0.0.0" @@ -705,6 +861,18 @@ dependencies = [ "log", ] +[[package]] +name = "flate2" +version = "1.0.19" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "7411863d55df97a419aa64cb4d2f167103ea9d767e2c54a1868b7ac3f6b47129" +dependencies = [ + "cfg-if 1.0.0", + "crc32fast", + "libc", + "miniz_oxide", +] + [[package]] name = "float-cmp" version = "0.8.0" @@ -911,6 +1079,17 @@ dependencies = [ "wasi 0.9.0+wasi-snapshot-preview1", ] +[[package]] +name = "getrandom" +version = "0.2.0" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "ee8025cf36f917e6a52cce185b7c7177689b838b7ec138364e50cc2277a56cf4" +dependencies = [ + "cfg-if 0.1.10", + "libc", + "wasi 0.9.0+wasi-snapshot-preview1", +] + [[package]] name = "gimli" version = "0.23.0" @@ -1041,6 +1220,15 @@ version = "0.3.2" source = "registry+https://github.com/rust-lang/crates.io-index" checksum = "494b4d60369511e7dea41cf646832512a94e542f68bb9c49e54518e0f468eb47" +[[package]] +name = "humantime" +version = "1.3.0" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "df004cfca50ef23c36850aaaa59ad52cc70d0e90243c3c7737a4dd32dc7a3c4f" +dependencies = [ + "quick-error", +] + [[package]] name = "hyper" version = "0.13.9" @@ -1121,6 +1309,18 @@ dependencies = [ "hashbrown", ] +[[package]] +name = "indicatif" +version = "0.15.0" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "7baab56125e25686df467fe470785512329883aab42696d661247aca2a2896e4" +dependencies = [ + "console", + "lazy_static", + "number_prefix", + "regex", +] + [[package]] name = "influxdb" version = "0.1.0" @@ -1197,6 +1397,36 @@ dependencies = [ "wasm-bindgen", ] +[[package]] +name = "jsonpath_lib" +version = "0.2.5" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "f8727f6987896c010ec9add275f59de2ae418b672fafa77bc3673b4cee1f09ca" +dependencies = [ + "array_tool", + "env_logger", + "log", + "serde 1.0.117", + "serde_json", +] + +[[package]] +name = "k8s-openapi" +version = "0.9.0" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "57f95fd36c08ce592e67400a0f1a66f432196997d5a7e9a97e8743c33d8a9312" +dependencies = [ + "base64 0.12.3", + "bytes", + "chrono", + "http", + "percent-encoding", + "serde 1.0.117", + "serde-value", + "serde_json", + "url", +] + [[package]] name = "kernel32-sys" version = "0.2.2" @@ -1207,6 +1437,55 @@ dependencies = [ "winapi-build", ] +[[package]] +name = "kube" +version = "0.43.0" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "f3787d41d01ff816f93f1a73d20252f8a65887682206cfbf2d0f7d2d2b1b73fa" +dependencies = [ + "Inflector", + "base64 0.12.3", + "bytes", + "chrono", + "dirs 3.0.1", + "either", + "futures", + "futures-util", + "http", + "jsonpath_lib", + "k8s-openapi", + "log", + "openssl", + "pem", + "reqwest", + "serde 1.0.117", + "serde_json", + "serde_yaml", + "static_assertions", + "thiserror", + "time 0.2.23", + "tokio", + "url", +] + +[[package]] +name = "kube-runtime" +version = "0.43.0" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "9abc7b19889353e501e6bc7b2b9d7062b2e008ec256f11e9428ed8e56d046d2f" +dependencies = [ + "dashmap", + "derivative", + "futures", + "k8s-openapi", + "kube", + "pin-project 0.4.27", + "serde 1.0.117", + "smallvec", + "snafu", + "tokio", +] + [[package]] name = "lazy_static" version = "1.4.0" @@ -1627,6 +1906,12 @@ dependencies = [ "syn", ] +[[package]] +name = "number_prefix" +version = "0.3.0" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "17b02fc0ff9a9e4b35b3342880f48e896ebf69f2967921fe8646bf5b7125956a" + [[package]] name = "object" version = "0.22.0" @@ -1690,6 +1975,15 @@ dependencies = [ "vcpkg", ] +[[package]] +name = "ordered-float" +version = "2.0.0" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "9fe9037165d7023b1228bc4ae9a2fa1a2b0095eca6c2998c624723dfd01314a5" +dependencies = [ + "num-traits 0.2.14", +] + [[package]] name = "parking_lot" version = "0.10.2" @@ -1720,6 +2014,17 @@ version = "1.0.3" source = "registry+https://github.com/rust-lang/crates.io-index" checksum = "7151b083b0664ed58ed669fcdd92f01c3d2fdbf10af4931a301474950b52bfa9" +[[package]] +name = "pem" +version = "0.8.2" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "f4c220d01f863d13d96ca82359d1e81e64a7c6bf0637bcde7b2349630addf0c6" +dependencies = [ + "base64 0.13.0", + "once_cell", + "regex", +] + [[package]] name = "percent-encoding" version = "2.1.0" @@ -1931,7 +2236,7 @@ version = "0.7.3" source = "registry+https://github.com/rust-lang/crates.io-index" checksum = "6a6b1679d49b24bbfe0c803429aa1874472f50d9b363131f0e89fc356b544d03" dependencies = [ - "getrandom", + "getrandom 0.1.15", "libc", "rand_chacha 0.2.2", "rand_core 0.5.1", @@ -1979,7 +2284,7 @@ version = "0.5.1" source = "registry+https://github.com/rust-lang/crates.io-index" checksum = "90bde5296fc891b0cef12a6d03ddccc162ce7b2aff54160af9338f8d40df6d19" dependencies = [ - "getrandom", + "getrandom 0.1.15", ] [[package]] @@ -2121,7 +2426,7 @@ version = "0.3.5" source = "registry+https://github.com/rust-lang/crates.io-index" checksum = "de0737333e7a9502c789a36d7c7fa6092a49895d4faa31ca5df163857ded2e9d" dependencies = [ - "getrandom", + "getrandom 0.1.15", "redox_syscall", "rust-argon2", ] @@ -2169,6 +2474,7 @@ version = "0.10.9" source = "registry+https://github.com/rust-lang/crates.io-index" checksum = "fb15d6255c792356a0f578d8a645c677904dc02e862bebe2ecc18e0c01b9a0ce" dependencies = [ + "async-compression", "base64 0.13.0", "bytes", "encoding_rs", @@ -2255,7 +2561,7 @@ checksum = "09ac05563f83489b19b4d413607a30821ab08bbd9007d14fa05618da3ef09d8b" dependencies = [ "async-trait", "chrono", - "dirs", + "dirs 2.0.2", "futures", "hyper", "pin-project 0.4.27", @@ -2470,6 +2776,16 @@ dependencies = [ "serde 0.8.23", ] +[[package]] +name = "serde-value" +version = "0.7.0" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "f3a1a3341211875ef120e117ea7fd5228530ae7e7036a779fdc9117be6b3282c" +dependencies = [ + "ordered-float", + "serde 1.0.117", +] + [[package]] name = "serde_cbor" version = "0.11.1" @@ -2497,6 +2813,7 @@ version = "1.0.59" source = "registry+https://github.com/rust-lang/crates.io-index" checksum = "dcac07dbffa1c65e7f816ab9eba78eb142c6d44410f4eeba1e26e4f5dfa56b95" dependencies = [ + "indexmap", "itoa", "ryu", "serde 1.0.117", @@ -2523,6 +2840,18 @@ dependencies = [ "serde 1.0.117", ] +[[package]] +name = "serde_yaml" +version = "0.8.14" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "f7baae0a99f1a324984bcdc5f0718384c1f69775f1c7eec8b859b71b443e3fd7" +dependencies = [ + "dtoa", + "linked-hash-map 0.5.3", + "serde 1.0.117", + "yaml-rust", +] + [[package]] name = "serial_test" version = "0.5.0" @@ -2626,6 +2955,29 @@ version = "1.5.0" source = "registry+https://github.com/rust-lang/crates.io-index" checksum = "7acad6f34eb9e8a259d3283d1e8c1d34d7415943d4895f65cc73813c7396fc85" +[[package]] +name = "snafu" +version = "0.6.9" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "9c4e6046e4691afe918fd1b603fd6e515bcda5388a1092a9edbada307d159f09" +dependencies = [ + "doc-comment", + "futures-core", + "pin-project 0.4.27", + "snafu-derive", +] + +[[package]] +name = "snafu-derive" +version = "0.6.9" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "7073448732a89f2f3e6581989106067f403d378faeafb4a50812eb814170d3e5" +dependencies = [ + "proc-macro2", + "quote", + "syn", +] + [[package]] name = "socket2" version = "0.3.17" @@ -2792,6 +3144,25 @@ dependencies = [ "winapi 0.3.9", ] +[[package]] +name = "termcolor" +version = "1.1.2" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "2dfed899f0eb03f32ee8c6a0aabdb8a7949659e3466561fc0adf54e26d88c5f4" +dependencies = [ + "winapi-util", +] + +[[package]] +name = "terminal_size" +version = "0.1.15" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "4bd2d183bd3fac5f5fe38ddbeb4dc9aec4a39a9d7d59e7491d900302da01cbe1" +dependencies = [ + "libc", + "winapi 0.3.9", +] + [[package]] name = "textwrap" version = "0.11.0" @@ -2879,6 +3250,15 @@ dependencies = [ "syn", ] +[[package]] +name = "tiny-keccak" +version = "2.0.2" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "2c9d3793400a45f954c52e73d068316d76b6f4e36977e3fcebb13a2721e80237" +dependencies = [ + "crunchy", +] + [[package]] name = "tinytemplate" version = "1.1.0" diff --git a/rust/e2e/src/bin/test_case_1/config.toml b/rust/e2e/src/bin/test_case_1/config.toml index c18430be6..f80b9a09f 100644 --- a/rust/e2e/src/bin/test_case_1/config.toml +++ b/rust/e2e/src/bin/test_case_1/config.toml @@ -7,8 +7,8 @@ tls_certificate = "/app/ssl/tls.pem" tls_key = "/app/ssl/tls.key" [pet] -min_sum_count = 300 -min_update_count = 100 +min_sum_count = 2000 +min_update_count = 2000 min_sum_time = 10 min_update_time = 5 max_sum_time = 3600 diff --git a/rust/e2e/src/test_client/builder.rs b/rust/e2e/src/test_client/builder.rs index 8f0b30f16..b899c0972 100644 --- a/rust/e2e/src/test_client/builder.rs +++ b/rust/e2e/src/test_client/builder.rs @@ -5,13 +5,12 @@ use super::{ use crate::utils::concurrent_futures::ConcurrentFutures; use futures::Future; use std::{pin::Pin, sync::Arc}; -use xaynet_core::mask::{FromPrimitives, MaskConfig, Model}; +use xaynet_core::mask::{FromPrimitives, Model}; use xaynet_sdk::{client::Client as ApiClient, StateMachine, TransitionOutcome, XaynetClient}; pub struct TestClientBuilderSettings { number_of_sum: u64, number_of_update: u64, - mask_config: MaskConfig, model_size: usize, } @@ -22,7 +21,6 @@ impl TestClientBuilderSettings { Self { number_of_sum: coordinator_settings.pet.min_sum_count, number_of_update: coordinator_settings.pet.min_update_count, - mask_config: coordinator_settings.mask.clone().into(), model_size: coordinator_settings.model.size, } } @@ -30,13 +28,16 @@ impl TestClientBuilderSettings { pub struct TestClientBuilder { settings: TestClientBuilderSettings, - api_client: ApiClient, + api_client: ApiClient, model: Arc, notify: Notifier, } impl TestClientBuilder { - pub fn new(settings: TestClientBuilderSettings, api_client: ApiClient) -> Self { + pub fn new( + settings: TestClientBuilderSettings, + api_client: ApiClient, + ) -> Self { let model = Model::from_primitives(vec![1; settings.model_size].into_iter()).unwrap(); Self { api_client, @@ -50,7 +51,6 @@ impl TestClientBuilder { &mut self, number: u64, r#type: ClientType, - mask_config: MaskConfig, ) -> anyhow::Result> { let round_params = self.api_client.get_round_params().await?; let mut container = Vec::with_capacity(number as usize); @@ -58,7 +58,6 @@ impl TestClientBuilder { for _ in 0..number { let new_client = generate_client( &r#type, - mask_config, &round_params, self.api_client.clone(), LocalModel(self.model.clone()), @@ -83,7 +82,6 @@ impl TestClientBuilder { for _ in 0..self.settings.number_of_sum { let sum_client = generate_client( &ClientType::Sum, - self.settings.mask_config, &round_params, self.api_client.clone(), LocalModel(self.model.clone()), @@ -121,7 +119,6 @@ impl TestClientBuilder { for _ in 0..self.settings.number_of_update { let update_client = generate_client( &ClientType::Update, - self.settings.mask_config, &round_params, self.api_client.clone(), LocalModel(self.model.clone()), diff --git a/rust/e2e/src/test_client/utils.rs b/rust/e2e/src/test_client/utils.rs index ddedc580f..cc3546343 100644 --- a/rust/e2e/src/test_client/utils.rs +++ b/rust/e2e/src/test_client/utils.rs @@ -3,7 +3,7 @@ use std::sync::Arc; use xaynet_core::{ common::RoundParameters, crypto::{ByteObject, Signature, SigningKeyPair}, - mask::{MaskConfig, Model}, + mask::Model, ParticipantSecretKey, }; use xaynet_sdk::{ @@ -23,21 +23,16 @@ pub enum ClientType { pub fn generate_client( r#type: &ClientType, - mask_config: MaskConfig, round_params: &RoundParameters, - api_client: ApiClient, + api_client: ApiClient, model_store: LocalModel, notify: Notifier, ) -> anyhow::Result { loop { let (client_type, key_pair) = new_client(&round_params); if client_type == *r#type { - let new_client = StateMachine::new( - PetSettings::new(key_pair, mask_config), - api_client, - model_store, - notify, - ); + let new_client = + StateMachine::new(PetSettings::new(key_pair), api_client, model_store, notify); break Ok(new_client); } } diff --git a/rust/e2e/src/test_env/environment.rs b/rust/e2e/src/test_env/environment.rs index 491faacac..4bd9d2f1e 100644 --- a/rust/e2e/src/test_env/environment.rs +++ b/rust/e2e/src/test_env/environment.rs @@ -4,13 +4,14 @@ use tracing_subscriber::{fmt::Formatter, reload::Handle, EnvFilter, FmtSubscribe use xaynet_sdk::client::Client as ApiClient; use xaynet_server::{ - settings::Settings, storage::coordinator_storage::redis, storage::model_storage::s3, + settings::Settings, + storage::{coordinator_storage::redis, model_storage::s3}, }; #[allow(dead_code)] pub struct TestEnvironment { k8s_client: Option, - api_client: Option, + api_client: Option>, influx_client: Option, redis_client: Option, s3_client: Option, @@ -54,23 +55,24 @@ impl TestEnvironment { } fn init_api_client(&mut self) -> anyhow::Result<()> { - let certificates = self - .settings - .api_client - .certificates - .as_ref() - .map(ApiClient::certificates_from) - .transpose()?; - - let identity = self - .settings - .api_client - .identity - .as_ref() - .map(ApiClient::identity_from) - .transpose()?; - - let api_client = ApiClient::new(&self.settings.api_client.address, certificates, identity)?; + // let certificates = self + // .settings + // .api_client + // .certificates + // .as_ref() + // .map(ApiClient::certificates_from) + // .transpose()?; + + // let identity = self + // .settings + // .api_client + // .identity + // .as_ref() + // .map(ApiClient::identity_from) + // .transpose()?; + + let http_client = reqwest::ClientBuilder::new().build().unwrap(); + let api_client = ApiClient::new(http_client, &self.settings.api_client.address)?; self.api_client = Some(api_client); Ok(()) } @@ -97,7 +99,7 @@ impl TestEnvironment { Ok(self.k8s_client.clone().unwrap()) } - pub fn get_api_client(&mut self) -> anyhow::Result { + pub fn get_api_client(&mut self) -> anyhow::Result> { if self.api_client.is_none() { self.init_api_client()?; } diff --git a/rust/e2e/src/test_env/utils.rs b/rust/e2e/src/test_env/utils.rs index b12e40706..566bf1375 100644 --- a/rust/e2e/src/test_env/utils.rs +++ b/rust/e2e/src/test_env/utils.rs @@ -4,7 +4,7 @@ use tokio::time::{interval, Duration}; use xaynet_sdk::{client::Client as HttpApiClient, XaynetClient}; use xaynet_server::state_machine::phases::PhaseName; -pub async fn wait_until_coordinator_is_ready(client: &mut HttpApiClient) { +pub async fn wait_until_coordinator_is_ready(client: &mut HttpApiClient) { let mut interval = interval(Duration::from_millis(500)); while client.get_round_params().await.is_err() { interval.tick().await;