From 6392f279aad7f31eaac1b676ba7b04266fe4ad71 Mon Sep 17 00:00:00 2001 From: rob-maron <132852777+rob-maron@users.noreply.github.com> Date: Tue, 10 Dec 2024 12:06:20 -0500 Subject: [PATCH] back to quic (#2386) * back to quic * fmt * cargo sort * fmt --- Cargo.lock | 186 +++++++++++++++++++---------------- Cargo.toml | 11 +++ sequencer/src/network/cdn.rs | 11 --- 3 files changed, 114 insertions(+), 94 deletions(-) diff --git a/Cargo.lock b/Cargo.lock index 66e5ce319..34ce75c6e 100644 --- a/Cargo.lock +++ b/Cargo.lock @@ -14,19 +14,13 @@ dependencies = [ [[package]] name = "addr2line" -version = "0.21.0" +version = "0.24.2" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "8a30b2e23b9e17a9f90641c7ab1549cd9b44f296d3ccbf309d2863cfe398a0cb" +checksum = "dfbe277e56a376000877090da837660b4427aad530e3028d44e0bffe4f89a1c1" dependencies = [ "gimli", ] -[[package]] -name = "adler" -version = "1.0.2" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "f26201604c87b1e01bd3d98f8d5d9a8fcbb815e8cedb41ffccbeb4bf593a35fe" - [[package]] name = "adler2" version = "2.0.0" @@ -1062,19 +1056,28 @@ dependencies = [ "rand 0.8.5", ] +[[package]] +name = "backon" +version = "1.3.0" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "ba5289ec98f68f28dd809fd601059e6aa908bb8f6108620930828283d4ee23d7" +dependencies = [ + "fastrand 2.2.0", +] + [[package]] name = "backtrace" -version = "0.3.71" +version = "0.3.74" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "26b05800d2e817c8b3b4b54abd461726265fa9789ae34330622f2db9ee696f9d" +checksum = "8d82cb332cdfaed17ae235a638438ac4d4839913cc2af585c3c6746e8f8bee1a" dependencies = [ "addr2line", - "cc", "cfg-if", "libc", - "miniz_oxide 0.7.4", + "miniz_oxide", "object", "rustc-demangle", + "windows-targets 0.52.6", ] [[package]] @@ -1555,7 +1558,7 @@ dependencies = [ "rcgen 0.13.1", "redis", "rkyv", - "rustls 0.23.18", + "rustls 0.23.16", "rustls-pki-types", "sqlx", "thiserror 1.0.69", @@ -1590,7 +1593,7 @@ dependencies = [ "rcgen 0.13.1", "redis", "rkyv", - "rustls 0.23.18", + "rustls 0.23.16", "rustls-pki-types", "sqlx", "thiserror 1.0.69", @@ -1716,9 +1719,9 @@ dependencies = [ [[package]] name = "coarsetime" -version = "0.1.34" +version = "0.1.35" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "13b3839cf01bb7960114be3ccf2340f541b6d0c81f8690b007b2b39f750f7e5d" +checksum = "4252bf230cb600c19826a575b31c8c9c84c6f11acfab6dfcad2e941b10b6f8e2" dependencies = [ "libc", "wasix", @@ -3304,7 +3307,7 @@ source = "registry+https://github.com/rust-lang/crates.io-index" checksum = "a1b589b4dc103969ad3cf85c950899926ec64300a1a46d76c03a6072957036f0" dependencies = [ "crc32fast", - "miniz_oxide 0.8.0", + "miniz_oxide", ] [[package]] @@ -3517,7 +3520,7 @@ source = "registry+https://github.com/rust-lang/crates.io-index" checksum = "a8f2f12607f92c69b12ed746fabf9ca4f5c482cba46679c1a75b874ed7c26adb" dependencies = [ "futures-io", - "rustls 0.23.18", + "rustls 0.23.16", "rustls-pki-types", ] @@ -3640,9 +3643,9 @@ dependencies = [ [[package]] name = "gimli" -version = "0.28.1" +version = "0.31.1" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "4271d37baee1b8c7e4b708028c57d816cf9d2434acb33a549475f78c181f6253" +checksum = "07e28edb80900c19c28f1072f2e8aeca7fa06b23cd4169cefe1af5aa3260783f" [[package]] name = "glob" @@ -3996,7 +3999,7 @@ dependencies = [ [[package]] name = "hotshot" version = "0.5.79" -source = "git+https://github.com/EspressoSystems/hotshot?tag=0.5.82#ecfd22a4b3d20b7cf89282b172f178ab2ebf81a4" +source = "git+https://www.github.com/EspressoSystems/HotShot.git?tag=0.5.82-patch1#06f693cf38bd2723b44adbe90de377515c8897d7" dependencies = [ "anyhow", "async-broadcast", @@ -4018,7 +4021,7 @@ dependencies = [ "hotshot-task-impls", "hotshot-types", "libp2p-identity", - "libp2p-networking", + "libp2p-networking 0.5.79 (git+https://www.github.com/EspressoSystems/HotShot.git?tag=0.5.82-patch1)", "lru 0.12.5", "num_enum", "parking_lot", @@ -4039,7 +4042,7 @@ dependencies = [ [[package]] name = "hotshot-builder-api" version = "0.1.7" -source = "git+https://github.com/EspressoSystems/hotshot?tag=0.5.82#ecfd22a4b3d20b7cf89282b172f178ab2ebf81a4" +source = "git+https://www.github.com/EspressoSystems/HotShot.git?tag=0.5.82-patch1#06f693cf38bd2723b44adbe90de377515c8897d7" dependencies = [ "async-trait", "clap", @@ -4049,7 +4052,7 @@ dependencies = [ "hotshot-types", "serde", "tagged-base64", - "thiserror 2.0.3", + "thiserror 2.0.6", "tide-disco", "toml 0.8.19", "vbs", @@ -4139,7 +4142,7 @@ dependencies = [ [[package]] name = "hotshot-example-types" version = "0.5.79" -source = "git+https://github.com/EspressoSystems/hotshot?tag=0.5.82#ecfd22a4b3d20b7cf89282b172f178ab2ebf81a4" +source = "git+https://www.github.com/EspressoSystems/HotShot.git?tag=0.5.82-patch1#06f693cf38bd2723b44adbe90de377515c8897d7" dependencies = [ "anyhow", "async-lock 3.4.0", @@ -4154,7 +4157,7 @@ dependencies = [ "serde", "sha2 0.10.8", "sha3", - "thiserror 2.0.3", + "thiserror 2.0.6", "time 0.3.36", "tokio", "url", @@ -4164,7 +4167,7 @@ dependencies = [ [[package]] name = "hotshot-fakeapi" version = "0.5.79" -source = "git+https://github.com/EspressoSystems/hotshot?tag=0.5.82#ecfd22a4b3d20b7cf89282b172f178ab2ebf81a4" +source = "git+https://www.github.com/EspressoSystems/HotShot.git?tag=0.5.82-patch1#06f693cf38bd2723b44adbe90de377515c8897d7" dependencies = [ "anyhow", "async-lock 3.4.0", @@ -4182,7 +4185,7 @@ dependencies = [ [[package]] name = "hotshot-macros" version = "0.5.79" -source = "git+https://github.com/EspressoSystems/hotshot?tag=0.5.82#ecfd22a4b3d20b7cf89282b172f178ab2ebf81a4" +source = "git+https://www.github.com/EspressoSystems/HotShot.git?tag=0.5.82-patch1#06f693cf38bd2723b44adbe90de377515c8897d7" dependencies = [ "derive_builder", "proc-macro2", @@ -4193,7 +4196,7 @@ dependencies = [ [[package]] name = "hotshot-orchestrator" version = "0.5.79" -source = "git+https://github.com/EspressoSystems/hotshot?tag=0.5.82#ecfd22a4b3d20b7cf89282b172f178ab2ebf81a4" +source = "git+https://www.github.com/EspressoSystems/HotShot.git?tag=0.5.82-patch1#06f693cf38bd2723b44adbe90de377515c8897d7" dependencies = [ "anyhow", "async-lock 3.4.0", @@ -4271,7 +4274,7 @@ dependencies = [ [[package]] name = "hotshot-stake-table" version = "0.5.79" -source = "git+https://github.com/EspressoSystems/hotshot?tag=0.5.82#ecfd22a4b3d20b7cf89282b172f178ab2ebf81a4" +source = "git+https://www.github.com/EspressoSystems/HotShot.git?tag=0.5.82-patch1#06f693cf38bd2723b44adbe90de377515c8897d7" dependencies = [ "ark-bn254", "ark-ed-on-bn254", @@ -4333,7 +4336,7 @@ dependencies = [ [[package]] name = "hotshot-task" version = "0.5.79" -source = "git+https://github.com/EspressoSystems/hotshot?tag=0.5.82#ecfd22a4b3d20b7cf89282b172f178ab2ebf81a4" +source = "git+https://www.github.com/EspressoSystems/HotShot.git?tag=0.5.82-patch1#06f693cf38bd2723b44adbe90de377515c8897d7" dependencies = [ "async-broadcast", "async-trait", @@ -4346,7 +4349,7 @@ dependencies = [ [[package]] name = "hotshot-task-impls" version = "0.5.79" -source = "git+https://github.com/EspressoSystems/hotshot?tag=0.5.82#ecfd22a4b3d20b7cf89282b172f178ab2ebf81a4" +source = "git+https://www.github.com/EspressoSystems/HotShot.git?tag=0.5.82-patch1#06f693cf38bd2723b44adbe90de377515c8897d7" dependencies = [ "anyhow", "async-broadcast", @@ -4367,7 +4370,7 @@ dependencies = [ "sha2 0.10.8", "surf-disco", "tagged-base64", - "thiserror 2.0.3", + "thiserror 2.0.6", "time 0.3.36", "tokio", "tracing", @@ -4380,7 +4383,7 @@ dependencies = [ [[package]] name = "hotshot-testing" version = "0.5.79" -source = "git+https://github.com/EspressoSystems/hotshot?tag=0.5.82#ecfd22a4b3d20b7cf89282b172f178ab2ebf81a4" +source = "git+https://www.github.com/EspressoSystems/HotShot.git?tag=0.5.82-patch1#06f693cf38bd2723b44adbe90de377515c8897d7" dependencies = [ "anyhow", "async-broadcast", @@ -4409,7 +4412,7 @@ dependencies = [ "serde", "sha2 0.10.8", "tagged-base64", - "thiserror 2.0.3", + "thiserror 2.0.6", "tide-disco", "tokio", "tracing", @@ -4421,7 +4424,7 @@ dependencies = [ [[package]] name = "hotshot-types" version = "0.1.11" -source = "git+https://github.com/EspressoSystems/hotshot?tag=0.5.82#ecfd22a4b3d20b7cf89282b172f178ab2ebf81a4" +source = "git+https://www.github.com/EspressoSystems/HotShot.git?tag=0.5.82-patch1#06f693cf38bd2723b44adbe90de377515c8897d7" dependencies = [ "anyhow", "ark-bn254", @@ -4461,7 +4464,7 @@ dependencies = [ "serde_json", "sha2 0.10.8", "tagged-base64", - "thiserror 2.0.3", + "thiserror 2.0.6", "time 0.3.36", "tokio", "toml 0.8.19", @@ -4651,7 +4654,7 @@ dependencies = [ "http 1.1.0", "hyper 1.5.0", "hyper-util", - "rustls 0.23.18", + "rustls 0.23.16", "rustls-pki-types", "tokio", "tokio-rustls 0.26.0", @@ -4716,7 +4719,7 @@ dependencies = [ "iana-time-zone-haiku", "js-sys", "wasm-bindgen", - "windows-core", + "windows-core 0.52.0", ] [[package]] @@ -5855,6 +5858,33 @@ dependencies = [ "tracing-subscriber 0.3.18", ] +[[package]] +name = "libp2p-networking" +version = "0.5.79" +source = "git+https://www.github.com/EspressoSystems/HotShot.git?tag=0.5.82-patch1#06f693cf38bd2723b44adbe90de377515c8897d7" +dependencies = [ + "anyhow", + "async-trait", + "bincode", + "blake3", + "cbor4ii", + "delegate", + "derive_builder", + "derive_more 1.0.0", + "futures", + "hotshot-types", + "lazy_static", + "libp2p", + "libp2p-identity", + "libp2p-swarm-derive", + "pin-project", + "rand 0.8.5", + "serde", + "tokio", + "tracing", + "tracing-subscriber 0.3.18", +] + [[package]] name = "libp2p-quic" version = "0.10.3" @@ -5872,7 +5902,7 @@ dependencies = [ "quinn", "rand 0.8.5", "ring 0.17.8", - "rustls 0.23.18", + "rustls 0.23.16", "socket2 0.5.7", "thiserror 1.0.69", "tokio", @@ -5966,7 +5996,7 @@ dependencies = [ "libp2p-identity", "rcgen 0.11.3", "ring 0.17.8", - "rustls 0.23.18", + "rustls 0.23.16", "rustls-webpki 0.101.7", "thiserror 1.0.69", "x509-parser", @@ -6267,7 +6297,7 @@ dependencies = [ "serde", "sha2 0.10.8", "surf-disco", - "thiserror 2.0.3", + "thiserror 2.0.6", "tokio", "tracing", "tracing-subscriber 0.3.18", @@ -6423,15 +6453,6 @@ version = "0.2.1" source = "registry+https://github.com/rust-lang/crates.io-index" checksum = "68354c5c6bd36d73ff3feceb05efa59b6acb7626617f4962be322a825e61f79a" -[[package]] -name = "miniz_oxide" -version = "0.7.4" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "b8a240ddb74feaf34a79a7add65a741f3167852fba007066dcac1ca548d89c08" -dependencies = [ - "adler", -] - [[package]] name = "miniz_oxide" version = "0.8.0" @@ -6835,9 +6856,9 @@ dependencies = [ [[package]] name = "object" -version = "0.32.2" +version = "0.36.5" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "a6a622008b6e321afc04970976f62ee297fdbaa6f95318ca343e3eebb9648441" +checksum = "aedf0a2d09c573ed1d8d85b30c119153926a2b36dce0ab28322c09a117a4683e" dependencies = [ "memchr", ] @@ -7591,7 +7612,7 @@ source = "registry+https://github.com/rust-lang/crates.io-index" checksum = "81bddcdb20abf9501610992b6759a4c888aef7d1a7247ef75e2404275ac24af1" dependencies = [ "anyhow", - "itertools 0.11.0", + "itertools 0.12.1", "proc-macro2", "quote", "syn 2.0.87", @@ -7697,7 +7718,7 @@ dependencies = [ "quinn-proto", "quinn-udp", "rustc-hash", - "rustls 0.23.18", + "rustls 0.23.16", "socket2 0.5.7", "thiserror 1.0.69", "tokio", @@ -7714,7 +7735,7 @@ dependencies = [ "rand 0.8.5", "ring 0.17.8", "rustc-hash", - "rustls 0.23.18", + "rustls 0.23.16", "slab", "thiserror 1.0.69", "tinyvec", @@ -7888,23 +7909,24 @@ dependencies = [ [[package]] name = "redis" -version = "0.27.5" +version = "0.27.6" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "81cccf17a692ce51b86564334614d72dcae1def0fd5ecebc9f02956da74352b5" +checksum = "09d8f99a4090c89cc489a94833c901ead69bfbf3877b4867d5482e321ee875bc" dependencies = [ "arc-swap", "async-trait", + "backon", "bytes 1.8.0", "combine", "futures", "futures-util", + "itertools 0.13.0", "itoa", "num-bigint", "percent-encoding", "pin-project-lite 0.2.15", "ryu", "tokio", - "tokio-retry2", "tokio-util", "url", ] @@ -8393,9 +8415,9 @@ dependencies = [ [[package]] name = "rustls" -version = "0.23.18" +version = "0.23.16" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "9c9cc1d47e243d655ace55ed38201c19ae02c148ae56412ab8750e8f0166ab7f" +checksum = "eee87ff5d9b36712a58574e12e9f0ea80f915a5b0ac518d322b24a465617925e" dependencies = [ "log", "once_cell", @@ -8694,7 +8716,7 @@ dependencies = [ "jf-signature 0.2.0", "jf-vid", "libp2p", - "libp2p-networking", + "libp2p-networking 0.5.79 (git+https://github.com/EspressoSystems/hotshot?tag=0.5.82)", "marketplace-builder-core", "marketplace-builder-shared", "marketplace-solver", @@ -9136,7 +9158,7 @@ version = "0.8.5" source = "registry+https://github.com/rust-lang/crates.io-index" checksum = "03c3c6b7927ffe7ecaa769ee0e3994da3b8cafc8f444578982c83ecb161af917" dependencies = [ - "heck 0.4.1", + "heck 0.5.0", "proc-macro2", "quote", "syn 2.0.87", @@ -9871,11 +9893,11 @@ dependencies = [ [[package]] name = "thiserror" -version = "2.0.3" +version = "2.0.6" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "c006c85c7651b3cf2ada4584faa36773bd07bac24acfb39f3c431b36d7e667aa" +checksum = "8fec2a1820ebd077e2b90c4df007bebf344cd394098a13c563957d0afc83ea47" dependencies = [ - "thiserror-impl 2.0.3", + "thiserror-impl 2.0.6", ] [[package]] @@ -9891,9 +9913,9 @@ dependencies = [ [[package]] name = "thiserror-impl" -version = "2.0.3" +version = "2.0.6" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "f077553d607adc1caf65430528a576c757a71ed73944b66ebb58ef2bbd243568" +checksum = "d65750cab40f4ff1929fb1ba509e9914eb756131cef4210da8d5d700d26f6312" dependencies = [ "proc-macro2", "quote", @@ -10207,17 +10229,6 @@ dependencies = [ "whoami", ] -[[package]] -name = "tokio-retry2" -version = "0.5.6" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "903934dba1c4c2f2e9cb460ef10b5695e0b0ecad3bf9ee7c8675e540c5e8b2d1" -dependencies = [ - "pin-project", - "rand 0.8.5", - "tokio", -] - [[package]] name = "tokio-rustls" version = "0.24.1" @@ -10234,7 +10245,7 @@ version = "0.26.0" source = "registry+https://github.com/rust-lang/crates.io-index" checksum = "0c7bc40d0e5a97695bb96e27995cd3a08538541b0a846f65bba7a359f36700d4" dependencies = [ - "rustls 0.23.18", + "rustls 0.23.16", "rustls-pki-types", "tokio", ] @@ -10716,7 +10727,7 @@ dependencies = [ "flate2", "log", "once_cell", - "rustls 0.23.18", + "rustls 0.23.16", "rustls-pki-types", "url", "webpki-roots 0.26.6", @@ -10761,7 +10772,7 @@ checksum = "06abde3611657adf66d383f00b093d7faecc7fa57071cce2578660c9f1010821" [[package]] name = "utils" version = "0.5.79" -source = "git+https://github.com/EspressoSystems/hotshot?tag=0.5.82#ecfd22a4b3d20b7cf89282b172f178ab2ebf81a4" +source = "git+https://www.github.com/EspressoSystems/HotShot.git?tag=0.5.82-patch1#06f693cf38bd2723b44adbe90de377515c8897d7" dependencies = [ "tracing", ] @@ -11131,7 +11142,7 @@ version = "0.51.1" source = "registry+https://github.com/rust-lang/crates.io-index" checksum = "ca229916c5ee38c2f2bc1e9d8f04df975b4bd93f9955dc69fabb5d91270045c9" dependencies = [ - "windows-core", + "windows-core 0.51.1", "windows-targets 0.48.5", ] @@ -11144,6 +11155,15 @@ dependencies = [ "windows-targets 0.48.5", ] +[[package]] +name = "windows-core" +version = "0.52.0" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "33ab640c8d7e35bf8ba19b884ba838ceb4fba93a4e8c65a9059d08afcfc683d9" +dependencies = [ + "windows-targets 0.52.6", +] + [[package]] name = "windows-registry" version = "0.2.0" diff --git a/Cargo.toml b/Cargo.toml index 64716f2bb..425a044a1 100644 --- a/Cargo.toml +++ b/Cargo.toml @@ -165,3 +165,14 @@ opt-level = 3 opt-level = 3 [profile.test.package.diff-test-hotshot] opt-level = 3 + +[patch."https://github.com/EspressoSystems/HotShot.git"] +hotshot = { git = "https://www.github.com/EspressoSystems/HotShot.git", tag = "0.5.82-patch1" } +hotshot-builder-api = { git = "https://www.github.com/EspressoSystems/HotShot.git", tag = "0.5.82-patch1" } +hotshot-orchestrator = { git = "https://www.github.com/EspressoSystems/HotShot.git", tag = "0.5.82-patch1" } +hotshot-stake-table = { git = "https://www.github.com/EspressoSystems/HotShot.git", tag = "0.5.82-patch1" } +hotshot-task = { git = "https://www.github.com/EspressoSystems/HotShot.git", tag = "0.5.82-patch1" } +hotshot-task-impls = { git = "https://www.github.com/EspressoSystems/HotShot.git", tag = "0.5.82-patch1" } +hotshot-testing = { git = "https://www.github.com/EspressoSystems/HotShot.git", tag = "0.5.82-patch1" } +hotshot-types = { git = "https://www.github.com/EspressoSystems/HotShot.git", tag = "0.5.82-patch1" } +hotshot-example-types = { git = "https://www.github.com/EspressoSystems/HotShot.git", tag = "0.5.82-patch1" } diff --git a/sequencer/src/network/cdn.rs b/sequencer/src/network/cdn.rs index a69c79518..c0787ca8c 100644 --- a/sequencer/src/network/cdn.rs +++ b/sequencer/src/network/cdn.rs @@ -142,17 +142,6 @@ impl ConnectionDef for BrokerDef { type MessageHook = NoMessageHook; } -/// The client definition for the Push CDN. Uses the Quic -/// protocol and no middleware. Differs from the user -/// definition in that is on the client-side. -#[derive(Clone)] -pub struct ClientDef(PhantomData); -impl ConnectionDef for ClientDef { - type Scheme = WrappedSignatureKey; - type Protocol = Quic; - type MessageHook = NoMessageHook; -} - /// The testing run definition for the Push CDN. /// Uses the real protocols, but with an embedded discovery client. pub struct TestingDef(PhantomData);