From 8a561565718a15cddcecffdca5eac7a8d21a7127 Mon Sep 17 00:00:00 2001 From: Andrew Plaza Date: Fri, 9 Aug 2024 11:59:21 -0400 Subject: [PATCH] fix tls tests --- Cargo.lock | 311 +++++++++++++++++++++++++++++++----------- Cargo.toml | 10 +- xmtp_proto/Cargo.toml | 17 ++- 3 files changed, 242 insertions(+), 96 deletions(-) diff --git a/Cargo.lock b/Cargo.lock index 8d5144bde..ca64be752 100644 --- a/Cargo.lock +++ b/Cargo.lock @@ -275,17 +275,18 @@ checksum = "0c4b4d0bd25bd0b74681c0ad21497610ce1b7c91b1022cd21c80c6fbdd9476b0" [[package]] name = "axum" -version = "0.7.5" +version = "0.6.20" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "3a6c9af12842a67734c9a2e355436e5d03b22383ed60cf13cd0c18fbfe3dcbcf" +checksum = "3b829e4e32b91e643de6eafe82b1d90675f5874230191a4ffbc1b336dec4d6bf" dependencies = [ "async-trait", "axum-core", + "bitflags 1.3.2", "bytes", "futures-util", - "http 1.1.0", - "http-body 1.0.1", - "http-body-util", + "http 0.2.12", + "http-body 0.4.6", + "hyper 0.14.30", "itoa", "matchit", "memchr", @@ -294,7 +295,7 @@ dependencies = [ "pin-project-lite", "rustversion", "serde", - "sync_wrapper 1.0.1", + "sync_wrapper 0.1.2", "tower", "tower-layer", "tower-service", @@ -302,20 +303,17 @@ dependencies = [ [[package]] name = "axum-core" -version = "0.4.3" +version = "0.3.4" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "a15c63fd72d41492dc4f497196f5da1fb04fb7529e631d73630d1b491e47a2e3" +checksum = "759fa577a247914fd3f7f76d62972792636412fbfd634cd452f6a385a74d2d2c" dependencies = [ "async-trait", "bytes", "futures-util", - "http 1.1.0", - "http-body 1.0.1", - "http-body-util", + "http 0.2.12", + "http-body 0.4.6", "mime", - "pin-project-lite", "rustversion", - "sync_wrapper 0.1.2", "tower-layer", "tower-service", ] @@ -659,7 +657,7 @@ version = "4.5.13" source = "registry+https://github.com/rust-lang/crates.io-index" checksum = "501d359d5f3dcaf6ecdeee48833ae73ec6e42723a1e52419c79abf9507eec0a0" dependencies = [ - "heck", + "heck 0.5.0", "proc-macro2", "quote", "syn 2.0.72", @@ -1191,7 +1189,7 @@ checksum = "c5d9abe6314103864cc2d8901b7ae224e0ab1a103a0a416661b4097b0779b607" dependencies = [ "darling", "either", - "heck", + "heck 0.5.0", "proc-macro2", "quote", "syn 2.0.72", @@ -1523,7 +1521,7 @@ dependencies = [ "ethers-core", "ethers-etherscan", "eyre", - "prettyplease", + "prettyplease 0.2.20", "proc-macro2", "quote", "regex", @@ -2169,6 +2167,12 @@ dependencies = [ "http 0.2.12", ] +[[package]] +name = "heck" +version = "0.4.1" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "95505c38b4572b2d910cecb0281560f54b440a19336cbbcb27bf6ce6adc6f5a8" + [[package]] name = "heck" version = "0.5.0" @@ -2430,15 +2434,14 @@ dependencies = [ [[package]] name = "hyper-timeout" -version = "0.5.1" +version = "0.4.1" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "3203a961e5c83b6f5498933e78b6b263e208c197b63e9c6c53cc82ffd3f63793" +checksum = "bbb958482e8c7be4bc3cf272a766a2b0bf1a6755e7a6ae777f017a31d11b13b1" dependencies = [ - "hyper 1.4.1", - "hyper-util", + "hyper 0.14.30", "pin-project-lite", "tokio", - "tower-service", + "tokio-io-timeout", ] [[package]] @@ -2663,9 +2666,9 @@ dependencies = [ [[package]] name = "itertools" -version = "0.13.0" +version = "0.12.1" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "413ee7dfc52ee1a4949ceeb7dbc8a33f2d6c088194d9f922fb8318faf1f01186" +checksum = "ba291022dbbd398a455acf126c1e341954079855bc60dfdda641363bd6922569" dependencies = [ "either", ] @@ -3003,7 +3006,7 @@ dependencies = [ "openmls_basic_credential", "openmls_rust_crypto", "openmls_traits", - "prost", + "prost 0.12.6", "rand", "serde", "sha2 0.10.8", @@ -3087,9 +3090,9 @@ dependencies = [ [[package]] name = "multimap" -version = "0.10.0" +version = "0.8.3" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "defc4c55412d89136f966bbb339008b474350e5e6e78d2714439c386b3137a03" +checksum = "e5ce46fe64a9d73be07dcbe690a38ce1b293be448fd8ce1e6c1b8062c9f72c6a" [[package]] name = "nanorand" @@ -3515,9 +3518,19 @@ checksum = "1e91099d4268b0e11973f036e885d652fb0b21fedcf69738c627f94db6a44f42" [[package]] name = "pbjson" -version = "0.7.0" +version = "0.5.1" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "c7e6349fa080353f4a597daffd05cb81572a9c031a6d4fff7e504947496fcc68" +checksum = "048f9ac93c1eab514f9470c4bc8d97ca2a0a236b84f45cc19d69a59fc11467f6" +dependencies = [ + "base64 0.13.1", + "serde", +] + +[[package]] +name = "pbjson" +version = "0.6.0" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "1030c719b0ec2a2d25a5df729d6cff1acf3cc230bf766f4f97833591f7577b90" dependencies = [ "base64 0.21.7", "serde", @@ -3525,28 +3538,55 @@ dependencies = [ [[package]] name = "pbjson-build" -version = "0.7.0" +version = "0.5.1" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "6eea3058763d6e656105d1403cb04e0a41b7bbac6362d413e7c33be0c32279c9" +checksum = "bdbb7b706f2afc610f3853550cdbbf6372fd324824a087806bd4480ea4996e24" dependencies = [ - "heck", - "itertools 0.13.0", - "prost", - "prost-types", + "heck 0.4.1", + "itertools 0.10.5", + "prost 0.11.9", + "prost-types 0.11.9", +] + +[[package]] +name = "pbjson-build" +version = "0.6.2" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "2580e33f2292d34be285c5bc3dba5259542b083cfad6037b6d70345f24dcb735" +dependencies = [ + "heck 0.4.1", + "itertools 0.11.0", + "prost 0.12.6", + "prost-types 0.12.6", ] [[package]] name = "pbjson-types" -version = "0.7.0" +version = "0.5.1" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "4a88c8d87f99a4ac14325e7a4c24af190fca261956e3b82dd7ed67e77e6c7043" +dependencies = [ + "bytes", + "chrono", + "pbjson 0.5.1", + "pbjson-build 0.5.1", + "prost 0.11.9", + "prost-build 0.11.9", + "serde", +] + +[[package]] +name = "pbjson-types" +version = "0.6.0" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "e54e5e7bfb1652f95bc361d76f3c780d8e526b134b85417e774166ee941f0887" +checksum = "18f596653ba4ac51bdecbb4ef6773bc7f56042dc13927910de1684ad3d32aa12" dependencies = [ "bytes", "chrono", - "pbjson", - "pbjson-build", - "prost", - "prost-build", + "pbjson 0.6.0", + "pbjson-build 0.6.2", + "prost 0.12.6", + "prost-build 0.12.6", "serde", ] @@ -3833,6 +3873,16 @@ dependencies = [ "termtree", ] +[[package]] +name = "prettyplease" +version = "0.1.25" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "6c8646e95016a7a6c4adea95bafa8a16baab64b583356217f2c85db4a39d9a86" +dependencies = [ + "proc-macro2", + "syn 1.0.109", +] + [[package]] name = "prettyplease" version = "0.2.20" @@ -3902,30 +3952,62 @@ dependencies = [ [[package]] name = "prost" -version = "0.13.1" +version = "0.11.9" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "e13db3d3fde688c61e2446b4d843bc27a7e8af269a69440c0308021dc92333cc" +checksum = "0b82eaa1d779e9a4bc1c3217db8ffbeabaae1dca241bf70183242128d48681cd" dependencies = [ "bytes", - "prost-derive", + "prost-derive 0.11.9", +] + +[[package]] +name = "prost" +version = "0.12.6" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "deb1435c188b76130da55f17a466d252ff7b1418b2ad3e037d127b94e3411f29" +dependencies = [ + "bytes", + "prost-derive 0.12.6", ] [[package]] name = "prost-build" -version = "0.13.1" +version = "0.11.9" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "119533552c9a7ffacc21e099c24a0ac8bb19c2a2a3f363de84cd9b844feab270" +dependencies = [ + "bytes", + "heck 0.4.1", + "itertools 0.10.5", + "lazy_static", + "log", + "multimap", + "petgraph", + "prettyplease 0.1.25", + "prost 0.11.9", + "prost-types 0.11.9", + "regex", + "syn 1.0.109", + "tempfile", + "which", +] + +[[package]] +name = "prost-build" +version = "0.12.6" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "5bb182580f71dd070f88d01ce3de9f4da5021db7115d2e1c3605a754153b77c1" +checksum = "22505a5c94da8e3b7c2996394d1c933236c4d743e81a410bcca4e6989fc066a4" dependencies = [ "bytes", - "heck", - "itertools 0.13.0", + "heck 0.5.0", + "itertools 0.12.1", "log", "multimap", "once_cell", "petgraph", - "prettyplease", - "prost", - "prost-types", + "prettyplease 0.2.20", + "prost 0.12.6", + "prost-types 0.12.6", "regex", "syn 2.0.72", "tempfile", @@ -3933,12 +4015,25 @@ dependencies = [ [[package]] name = "prost-derive" -version = "0.13.1" +version = "0.11.9" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "18bec9b0adc4eba778b33684b7ba3e7137789434769ee3ce3930463ef904cfca" +checksum = "e5d2d8d10f3c6ded6da8b05b5fb3b8a5082514344d56c9f871412d29b4e075b4" dependencies = [ "anyhow", - "itertools 0.13.0", + "itertools 0.10.5", + "proc-macro2", + "quote", + "syn 1.0.109", +] + +[[package]] +name = "prost-derive" +version = "0.12.6" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "81bddcdb20abf9501610992b6759a4c888aef7d1a7247ef75e2404275ac24af1" +dependencies = [ + "anyhow", + "itertools 0.12.1", "proc-macro2", "quote", "syn 2.0.72", @@ -3946,11 +4041,20 @@ dependencies = [ [[package]] name = "prost-types" -version = "0.13.1" +version = "0.11.9" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "cee5168b05f49d4b0ca581206eb14a7b22fafd963efe729ac48eb03266e25cc2" +checksum = "213622a1460818959ac1181aaeb2dc9c7f63df720db7d788b3e24eacd1983e13" dependencies = [ - "prost", + "prost 0.11.9", +] + +[[package]] +name = "prost-types" +version = "0.12.6" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "9091c90b0a32608e984ff2fa4091273cbdd755d54935c51d520887f4a1dbd5b0" +dependencies = [ + "prost 0.12.6", ] [[package]] @@ -4354,15 +4458,27 @@ dependencies = [ "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.6", + "subtle", + "zeroize", +] + [[package]] name = "rustls" version = "0.23.12" source = "registry+https://github.com/rust-lang/crates.io-index" checksum = "c58f8c84392efc0a126acce10fa59ff7b3d2ac06ab451a33f2741989b806b044" dependencies = [ - "log", "once_cell", - "ring 0.17.8", "rustls-pki-types", "rustls-webpki 0.102.6", "subtle", @@ -4890,7 +5006,7 @@ version = "0.26.4" source = "registry+https://github.com/rust-lang/crates.io-index" checksum = "4c6bee85a5a24955dc440386795aa378cd9cf82acd5f764469152d2270e581be" dependencies = [ - "heck", + "heck 0.5.0", "proc-macro2", "quote", "rustversion", @@ -5257,6 +5373,16 @@ dependencies = [ "windows-sys 0.52.0", ] +[[package]] +name = "tokio-io-timeout" +version = "1.2.0" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "30b74022ada614a1b4834de765f9bb43877f910cc8ce4be40e89042c9223a8bf" +dependencies = [ + "pin-project-lite", + "tokio", +] + [[package]] name = "tokio-macros" version = "2.4.0" @@ -5288,6 +5414,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-rustls" version = "0.26.0" @@ -5398,30 +5535,28 @@ dependencies = [ [[package]] name = "tonic" -version = "0.12.1" +version = "0.11.0" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "38659f4a91aba8598d27821589f5db7dddd94601e7a01b1e485a50e5484c7401" +checksum = "76c4eb7a4e9ef9d4763600161f12f5070b92a578e1b634db88a6887844c91a13" dependencies = [ "async-stream", "async-trait", "axum", - "base64 0.22.1", + "base64 0.21.7", "bytes", - "h2 0.4.5", - "http 1.1.0", - "http-body 1.0.1", - "http-body-util", - "hyper 1.4.1", + "h2 0.3.26", + "http 0.2.12", + "http-body 0.4.6", + "hyper 0.14.30", "hyper-timeout", - "hyper-util", "percent-encoding", "pin-project", - "prost", + "prost 0.12.6", "rustls-native-certs", "rustls-pemfile 2.1.3", - "socket2", + "rustls-pki-types", "tokio", - "tokio-rustls 0.26.0", + "tokio-rustls 0.25.0", "tokio-stream", "tower", "tower-layer", @@ -5986,6 +6121,18 @@ dependencies = [ "rustls-pki-types", ] +[[package]] +name = "which" +version = "4.4.2" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "87ba24419a2078cd2b0f2ede2691b6c66d8e47836da3b6db8265ebad47afbfc7" +dependencies = [ + "either", + "home", + "once_cell", + "rustix", +] + [[package]] name = "winapi" version = "0.3.9" @@ -6261,9 +6408,9 @@ dependencies = [ "futures", "hex", "log", - "pbjson", - "pbjson-types", - "prost", + "pbjson 0.5.1", + "pbjson-types 0.5.1", + "prost 0.12.6", "serde", "tokio", "tonic", @@ -6303,7 +6450,7 @@ dependencies = [ "hex", "kv-log-macro", "log", - "prost", + "prost 0.12.6", "serde", "serde_json", "thiserror", @@ -6355,7 +6502,7 @@ dependencies = [ "openmls_basic_credential", "openmls_rust_crypto", "openmls_traits", - "prost", + "prost 0.12.6", "rand", "regex", "rustc-hex", @@ -6402,7 +6549,7 @@ dependencies = [ "openmls_rust_crypto", "openmls_traits", "parking_lot", - "prost", + "prost 0.12.6", "rand", "reqwest 0.12.5", "ring 0.17.8", @@ -6438,10 +6585,10 @@ dependencies = [ "futures-core", "openmls", "openmls_basic_credential", - "pbjson", - "pbjson-types", - "prost", - "prost-types", + "pbjson 0.6.0", + "pbjson-types 0.6.0", + "prost 0.12.6", + "prost-types 0.12.6", "serde", "tonic", ] @@ -6453,7 +6600,7 @@ dependencies = [ "base64 0.21.7", "libsecp256k1", "once_cell", - "prost", + "prost 0.12.6", "rand", "xmtp_proto", "xmtp_v2", diff --git a/Cargo.toml b/Cargo.toml index 0b3e0612a..fe22c49cc 100644 --- a/Cargo.toml +++ b/Cargo.toml @@ -41,8 +41,6 @@ openmls = { git = "https://github.com/xmtp/openmls", rev = "9cb3207", default-fe openmls_basic_credential = { git = "https://github.com/xmtp/openmls", rev = "9cb3207" } openmls_rust_crypto = { git = "https://github.com/xmtp/openmls", rev = "9cb3207" } openmls_traits = { git = "https://github.com/xmtp/openmls", rev = "9cb3207" } -prost = "^0.13" -prost-types = "^0.13" rand = "0.8.5" regex = "1.10.4" rustc-hex = "2.1.0" @@ -56,9 +54,11 @@ async-stream = "0.3" tracing = { version = "0.1", features = ["release_max_level_debug"] } tracing-subscriber = "0.3" url = "2.5.0" -tonic = "^0.12" -pbjson = "0.7.0" -pbjson-types = "0.7.0" +tonic = "^0.11" +prost = "^0.12" +prost-types = "^0.12" +pbjson = "0.5.1" +pbjson-types = "0.5.1" # Internal Crate Dependencies xmtp_cryptography = { path = "xmtp_cryptography" } diff --git a/xmtp_proto/Cargo.toml b/xmtp_proto/Cargo.toml index dabbd937b..506479cea 100644 --- a/xmtp_proto/Cargo.toml +++ b/xmtp_proto/Cargo.toml @@ -1,30 +1,30 @@ [package] -edition = "2021" name = "xmtp_proto" version = "0.1.0" +edition = "2021" [dependencies] async-trait = { workspace = true } futures = { workspace = true } futures-core = { workspace = true } -pbjson.workspace = true -pbjson-types.workspace = true +pbjson = "0.6.0" +pbjson-types = "0.6.0" prost = { workspace = true, features = ["prost-derive"] } # Only necessary if using Protobuf well-known types: -openmls = { workspace = true, optional = true } -openmls_basic_credential = { workspace = true, optional = true } prost-types = { workspace = true } serde = { workspace = true } tonic = { workspace = true, optional = true } +openmls_basic_credential = { workspace = true, optional = true } +openmls = { workspace = true, optional = true } [features] -convert = ["openmls_basic_credential", "openmls", "proto_full"] default = [] +convert = ["openmls_basic_credential", "openmls", "proto_full"] grpc = ["tonic"] # @@protoc_deletion_point(features) # This section is automatically generated by protoc-gen-prost-crate. # Changes in this area may be lost on regeneration. -proto_full = ["xmtp-identity","xmtp-identity-api-v1","xmtp-identity-associations","xmtp-keystore_api-v1","xmtp-message_api-v1","xmtp-message_contents","xmtp-mls-api-v1","xmtp-mls-database","xmtp-mls-message_contents","xmtp-mls_validation-v1","xmtp-xmtpv4"] +proto_full = ["xmtp-identity","xmtp-identity-api-v1","xmtp-identity-associations","xmtp-keystore_api-v1","xmtp-message_api-v1","xmtp-message_contents","xmtp-mls-api-v1","xmtp-mls-database","xmtp-mls-message_contents","xmtp-mls_validation-v1"] "xmtp-identity" = [] "xmtp-identity-api-v1" = ["xmtp-identity","xmtp-identity-associations"] "xmtp-identity-associations" = ["xmtp-identity","xmtp-message_contents"] @@ -35,5 +35,4 @@ proto_full = ["xmtp-identity","xmtp-identity-api-v1","xmtp-identity-associations "xmtp-mls-database" = [] "xmtp-mls-message_contents" = ["xmtp-message_contents"] "xmtp-mls_validation-v1" = ["xmtp-identity-associations"] -"xmtp-xmtpv4" = ["xmtp-identity-associations","xmtp-mls-api-v1"] -## @@protoc_insertion_point(features) +## @@protoc_insertion_point(features) \ No newline at end of file