diff --git a/Cargo.lock b/Cargo.lock index 973eb77baa..c0328fed82 100644 --- a/Cargo.lock +++ b/Cargo.lock @@ -928,8 +928,8 @@ version = "0.5.0" source = "registry+https://github.com/rust-lang/crates.io-index" checksum = "c2895653b4d9f1538a83970077cb01dfc77a4810524e51a110944688e916b18e" dependencies = [ - "prost 0.11.9", - "prost-types 0.11.9", + "prost", + "prost-types", "tonic 0.9.2", "tracing-core", ] @@ -946,7 +946,7 @@ dependencies = [ "futures 0.3.29", "hdrhistogram", "humantime 2.1.0", - "prost-types 0.11.9", + "prost-types", "serde", "serde_json", "thread_local", @@ -3053,8 +3053,8 @@ dependencies = [ "borsh", "chrono", "log", - "prost 0.9.0", - "prost-types 0.9.0", + "prost", + "prost-types", "rand", "rcgen", "subtle", @@ -3066,7 +3066,7 @@ dependencies = [ "tari_utilities", "thiserror", "tokio", - "tonic 0.6.2", + "tonic 0.8.3", "tonic-build", "zeroize", ] @@ -3090,7 +3090,7 @@ dependencies = [ "tari_utilities", "thiserror", "tokio", - "tonic 0.6.2", + "tonic 0.8.3", ] [[package]] @@ -3162,7 +3162,7 @@ dependencies = [ "tari_utilities", "thiserror", "tokio", - "tonic 0.6.2", + "tonic 0.8.3", "tui", "unicode-segmentation", "unicode-width", @@ -3205,7 +3205,7 @@ dependencies = [ "tari_utilities", "thiserror", "tokio", - "tonic 0.6.2", + "tonic 0.8.3", "tracing", "url", ] @@ -3231,7 +3231,7 @@ dependencies = [ "minotari_app_utilities", "native-tls", "num_cpus", - "prost-types 0.9.0", + "prost-types", "rand", "serde", "serde_json", @@ -3243,7 +3243,7 @@ dependencies = [ "tari_utilities", "thiserror", "tokio", - "tonic 0.6.2", + "tonic 0.8.3", ] [[package]] @@ -3306,7 +3306,7 @@ dependencies = [ "thiserror", "tokio", "toml 0.5.11", - "tonic 0.6.2", + "tonic 0.8.3", ] [[package]] @@ -3338,7 +3338,7 @@ dependencies = [ "itertools 0.10.5", "libsqlite3-sys", "log", - "prost 0.9.0", + "prost", "rand", "serde", "serde_json", @@ -3414,7 +3414,7 @@ dependencies = [ "tari_common_types", "thiserror", "tokio", - "tonic 0.6.2", + "tonic 0.8.3", ] [[package]] @@ -4260,6 +4260,16 @@ version = "0.2.17" source = "registry+https://github.com/rust-lang/crates.io-index" checksum = "5b40af805b3121feab8a3c29f04d8ad262fa8e0561883e7653e024ae4479e6de" +[[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 = "primeorder" version = "0.13.2" @@ -4348,16 +4358,6 @@ dependencies = [ "thiserror", ] -[[package]] -name = "prost" -version = "0.9.0" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "444879275cb4fd84958b1a1d5420d15e6fcf7c235fe47f053c9c2a80aceb6001" -dependencies = [ - "bytes 1.5.0", - "prost-derive 0.9.0", -] - [[package]] name = "prost" version = "0.11.9" @@ -4365,42 +4365,31 @@ source = "registry+https://github.com/rust-lang/crates.io-index" checksum = "0b82eaa1d779e9a4bc1c3217db8ffbeabaae1dca241bf70183242128d48681cd" dependencies = [ "bytes 1.5.0", - "prost-derive 0.11.9", + "prost-derive", ] [[package]] name = "prost-build" -version = "0.9.0" +version = "0.11.9" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "62941722fb675d463659e49c4f3fe1fe792ff24fe5bbaa9c08cd3b98a1c354f5" +checksum = "119533552c9a7ffacc21e099c24a0ac8bb19c2a2a3f363de84cd9b844feab270" dependencies = [ "bytes 1.5.0", - "heck 0.3.3", + "heck 0.4.1", "itertools 0.10.5", "lazy_static", "log", "multimap", "petgraph 0.6.4", - "prost 0.9.0", - "prost-types 0.9.0", + "prettyplease", + "prost", + "prost-types", "regex", + "syn 1.0.109", "tempfile", "which", ] -[[package]] -name = "prost-derive" -version = "0.9.0" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "f9cc1a3263e07e0bf68e96268f37665207b49560d98739662cdfaae215c720fe" -dependencies = [ - "anyhow", - "itertools 0.10.5", - "proc-macro2", - "quote", - "syn 1.0.109", -] - [[package]] name = "prost-derive" version = "0.11.9" @@ -4414,23 +4403,13 @@ dependencies = [ "syn 1.0.109", ] -[[package]] -name = "prost-types" -version = "0.9.0" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "534b7a0e836e3c482d2693070f982e39e7611da9695d4d1f5a4b186b51faef0a" -dependencies = [ - "bytes 1.5.0", - "prost 0.9.0", -] - [[package]] name = "prost-types" version = "0.11.9" source = "registry+https://github.com/rust-lang/crates.io-index" checksum = "213622a1460818959ac1181aaeb2dc9c7f63df720db7d788b3e24eacd1983e13" dependencies = [ - "prost 0.11.9", + "prost", ] [[package]] @@ -4849,19 +4828,6 @@ dependencies = [ "windows-sys 0.48.0", ] -[[package]] -name = "rustls" -version = "0.19.1" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "35edb675feee39aec9c99fa5ff985081995a06d594114ae14cbe797ad7b7a6d7" -dependencies = [ - "base64 0.13.1", - "log", - "ring 0.16.20", - "sct 0.6.1", - "webpki 0.21.4", -] - [[package]] name = "rustls" version = "0.20.9" @@ -4870,18 +4836,18 @@ checksum = "1b80e3dec595989ea8510028f30c408a4630db12c9cbb8de34203b89d6577e99" dependencies = [ "log", "ring 0.16.20", - "sct 0.7.1", - "webpki 0.22.4", + "sct", + "webpki", ] [[package]] name = "rustls-native-certs" -version = "0.5.0" +version = "0.6.3" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "5a07b7c1885bd8ed3831c289b7870b13ef46fe0e856d288c30d9cc17d75a2092" +checksum = "a9aace74cb666635c918e9c12bc0d348266037aa8eb599b5cba565709a8dff00" dependencies = [ "openssl-probe", - "rustls 0.19.1", + "rustls-pemfile 1.0.3", "schannel", "security-framework", ] @@ -4995,16 +4961,6 @@ version = "1.2.0" source = "registry+https://github.com/rust-lang/crates.io-index" checksum = "94143f37725109f92c262ed2cf5e59bce7498c01bcc1502d7b9afe439a4e9f49" -[[package]] -name = "sct" -version = "0.6.1" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "b362b83898e0e69f38515b82ee15aa80636befe47c3b6d3d89a911e78fc228ce" -dependencies = [ - "ring 0.16.20", - "untrusted 0.7.1", -] - [[package]] name = "sct" version = "0.7.1" @@ -5753,7 +5709,7 @@ dependencies = [ "nom", "once_cell", "pin-project 1.1.3", - "prost 0.9.0", + "prost", "rand", "serde", "serde_derive", @@ -5803,7 +5759,7 @@ dependencies = [ "once_cell", "petgraph 0.5.1", "pin-project 0.4.30", - "prost 0.9.0", + "prost", "rand", "serde", "tari_common", @@ -5829,7 +5785,7 @@ version = "1.0.0-pre.4" dependencies = [ "futures 0.3.29", "proc-macro2", - "prost 0.9.0", + "prost", "quote", "syn 1.0.109", "tari_comms", @@ -5849,7 +5805,7 @@ dependencies = [ "log", "num-derive 0.3.3", "num-traits", - "prost 0.9.0", + "prost", "rand", "serde", "serde_json", @@ -5904,7 +5860,7 @@ dependencies = [ "num-traits", "once_cell", "primitive-types", - "prost 0.9.0", + "prost", "quickcheck", "rand", "randomx-rs", @@ -6013,7 +5969,7 @@ dependencies = [ "thiserror", "time", "tokio", - "tonic 0.6.2", + "tonic 0.8.3", ] [[package]] @@ -6113,10 +6069,10 @@ dependencies = [ "lmdb-zero", "log", "pgp", - "prost 0.9.0", + "prost", "rand", "reqwest", - "rustls 0.20.9", + "rustls", "semver", "serde", "tari_common", @@ -6134,7 +6090,7 @@ dependencies = [ "tokio-stream", "tower", "trust-dns-client", - "webpki 0.22.4", + "webpki", ] [[package]] @@ -6438,26 +6394,15 @@ dependencies = [ "tokio", ] -[[package]] -name = "tokio-rustls" -version = "0.22.0" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "bc6844de72e57df1980054b38be3a9f4702aba4858be64dd700181a8a6d0e1b6" -dependencies = [ - "rustls 0.19.1", - "tokio", - "webpki 0.21.4", -] - [[package]] name = "tokio-rustls" version = "0.23.4" source = "registry+https://github.com/rust-lang/crates.io-index" checksum = "c43ee83903113e03984cb9e5cebe6c04a5116269e900e3ddba8f068a62adda59" dependencies = [ - "rustls 0.20.9", + "rustls", "tokio", - "webpki 0.22.4", + "webpki", ] [[package]] @@ -6557,12 +6502,13 @@ dependencies = [ [[package]] name = "tonic" -version = "0.6.2" +version = "0.8.3" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "ff08f4649d10a70ffa3522ca559031285d8e421d727ac85c60825761818f5d0a" +checksum = "8f219fad3b929bef19b1f86fbc0358d35daed8f2cac972037ac0dc10bbb8d5fb" dependencies = [ "async-stream", "async-trait", + "axum", "base64 0.13.1", "bytes 1.5.0", "futures-core", @@ -6574,13 +6520,14 @@ dependencies = [ "hyper-timeout", "percent-encoding", "pin-project 1.1.3", - "prost 0.9.0", - "prost-derive 0.9.0", + "prost", + "prost-derive", "rustls-native-certs", + "rustls-pemfile 1.0.3", "tokio", - "tokio-rustls 0.22.0", + "tokio-rustls", "tokio-stream", - "tokio-util 0.6.10", + "tokio-util 0.7.10", "tower", "tower-layer", "tower-service", @@ -6607,7 +6554,7 @@ dependencies = [ "hyper-timeout", "percent-encoding", "pin-project 1.1.3", - "prost 0.11.9", + "prost", "tokio", "tokio-stream", "tower", @@ -6618,10 +6565,11 @@ dependencies = [ [[package]] name = "tonic-build" -version = "0.6.2" +version = "0.8.4" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "9403f1bafde247186684b230dc6f38b5cd514584e8bec1dd32514be4745fa757" +checksum = "5bf5e9b9c0f7e0a7c027dcfaba7b2c60816c7049171f679d99ee2ff65d0de8c4" dependencies = [ + "prettyplease", "proc-macro2", "prost-build", "quote", @@ -6747,12 +6695,12 @@ dependencies = [ "radix_trie", "rand", "ring 0.16.20", - "rustls 0.20.9", + "rustls", "thiserror", "time", "tokio", "trust-dns-proto", - "webpki 0.22.4", + "webpki", ] [[package]] @@ -6774,15 +6722,15 @@ dependencies = [ "log", "rand", "ring 0.16.20", - "rustls 0.20.9", + "rustls", "rustls-pemfile 0.3.0", "smallvec", "thiserror", "tinyvec", "tokio", - "tokio-rustls 0.23.4", + "tokio-rustls", "url", - "webpki 0.22.4", + "webpki", ] [[package]] @@ -7163,16 +7111,6 @@ dependencies = [ "wasm-bindgen", ] -[[package]] -name = "webpki" -version = "0.21.4" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "b8e38c0608262c46d4a56202ebabdeb094cef7e560ca7a226c6bf055188aa4ea" -dependencies = [ - "ring 0.16.20", - "untrusted 0.7.1", -] - [[package]] name = "webpki" version = "0.22.4" diff --git a/applications/minotari_app_grpc/Cargo.toml b/applications/minotari_app_grpc/Cargo.toml index 34a2971aa2..41a317584d 100644 --- a/applications/minotari_app_grpc/Cargo.toml +++ b/applications/minotari_app_grpc/Cargo.toml @@ -20,18 +20,18 @@ base64 = "0.13.0" borsh = "1.2" chrono = { version = "0.4.19", default-features = false } log = "0.4" -prost = "0.9" -prost-types = "0.9" +prost = "0.11.9" +prost-types = "0.11.9" rand = "0.8" rcgen = "0.11.3" subtle = { version = "2.5.0", features = ["core_hint_black_box"] } thiserror = "1" tokio = { version = "1.23", features = ["fs"] } -tonic = "0.6.2" +tonic = { version = "0.8.3", features = ["tls"]} zeroize = "1" [build-dependencies] -tonic-build = "0.6.2" +tonic-build = "0.8.4" [package.metadata.cargo-machete] ignored = ["prost"] # this is so we can run cargo machete without getting false positive about macro dependancies diff --git a/applications/minotari_app_grpc/build.rs b/applications/minotari_app_grpc/build.rs index a6d97072ce..c059857769 100644 --- a/applications/minotari_app_grpc/build.rs +++ b/applications/minotari_app_grpc/build.rs @@ -2,18 +2,14 @@ // SPDX-License-Identifier: BSD-3-Clause fn main() -> Result<(), Box> { - tonic_build::configure() - .build_client(true) - .build_server(true) - .format(false) - .compile( - &[ - "proto/base_node.proto", - "proto/wallet.proto", - "proto/validator_node.proto", - ], - &["proto"], - )?; + tonic_build::configure().build_client(true).build_server(true).compile( + &[ + "proto/base_node.proto", + "proto/wallet.proto", + "proto/validator_node.proto", + ], + &["proto"], + )?; Ok(()) } diff --git a/applications/minotari_app_grpc/src/lib.rs b/applications/minotari_app_grpc/src/lib.rs index 326c7630e8..e54030b212 100644 --- a/applications/minotari_app_grpc/src/lib.rs +++ b/applications/minotari_app_grpc/src/lib.rs @@ -24,7 +24,7 @@ pub mod authentication; pub mod conversions; pub mod tls; - +#[allow(clippy::all, clippy::pedantic)] pub mod tari_rpc { tonic::include_proto!("tari.rpc"); } diff --git a/applications/minotari_app_utilities/Cargo.toml b/applications/minotari_app_utilities/Cargo.toml index 28e2f68937..4758ff3c72 100644 --- a/applications/minotari_app_utilities/Cargo.toml +++ b/applications/minotari_app_utilities/Cargo.toml @@ -22,7 +22,7 @@ tokio = { version = "1.23", features = ["signal"] } serde = "1.0.126" thiserror = "^1.0.26" dialoguer = { version = "0.10" } -tonic = "0.6.2" +tonic = "0.8.3" [build-dependencies] diff --git a/applications/minotari_console_wallet/Cargo.toml b/applications/minotari_console_wallet/Cargo.toml index 6b097b52c4..930fc200f7 100644 --- a/applications/minotari_console_wallet/Cargo.toml +++ b/applications/minotari_console_wallet/Cargo.toml @@ -48,7 +48,7 @@ sha2 = "0.10" strum = "0.22" strum_macros = "0.22" thiserror = "1.0.26" -tonic = "0.6.2" +tonic = "0.8.3" unicode-segmentation = "1.6.0" unicode-width = "0.1" zeroize = "1" diff --git a/applications/minotari_merge_mining_proxy/Cargo.toml b/applications/minotari_merge_mining_proxy/Cargo.toml index b6f871032b..3a77842e22 100644 --- a/applications/minotari_merge_mining_proxy/Cargo.toml +++ b/applications/minotari_merge_mining_proxy/Cargo.toml @@ -41,7 +41,7 @@ serde = { version = "1.0.106", features = ["derive"] } serde_json = "1.0.57" thiserror = "1.0.26" tokio = { version = "1.23", features = ["macros"] } -tonic = "0.6.2" +tonic = "0.8.3" tracing = "0.1" url = "2.1.1" diff --git a/applications/minotari_miner/Cargo.toml b/applications/minotari_miner/Cargo.toml index 1057354933..6eb4d96ee0 100644 --- a/applications/minotari_miner/Cargo.toml +++ b/applications/minotari_miner/Cargo.toml @@ -36,10 +36,10 @@ serde = { version = "1.0", default_features = false, features = ["derive"] } serde_json = "1.0.57" thiserror = "1.0" tokio = { version = "1.23", default_features = false, features = ["rt-multi-thread"] } -tonic = { version = "0.6.2", features = ["tls", "tls-roots" ] } +tonic = { version = "0.8.3", features = ["tls", "tls-roots" ] } [dev-dependencies] -prost-types = "0.9" +prost-types = "0.11.9" chrono = { version = "0.4.19", default-features = false } config = "0.13.0" diff --git a/applications/minotari_node/Cargo.toml b/applications/minotari_node/Cargo.toml index 9d89591d21..c0904f289a 100644 --- a/applications/minotari_node/Cargo.toml +++ b/applications/minotari_node/Cargo.toml @@ -46,7 +46,7 @@ serde = "1.0.136" strum = { version = "0.22", features = ["derive"] } thiserror = "^1.0.26" tokio = { version = "1.23", features = ["signal"] } -tonic = { version = "0.6.2", features = ["tls", "tls-roots" ] } +tonic = { version = "0.8.3", features = ["tls", "tls-roots" ] } # Metrics tari_metrics = { path = "../../infrastructure/metrics", optional = true, features = ["server"] } diff --git a/base_layer/contacts/Cargo.toml b/base_layer/contacts/Cargo.toml index 9342f04a05..051507c575 100644 --- a/base_layer/contacts/Cargo.toml +++ b/base_layer/contacts/Cargo.toml @@ -25,7 +25,7 @@ futures = { version = "^0.3.1", features = ["compat", "std"] } log = "0.4.6" num-derive = "0.3.3" num-traits = "0.2.15" -prost = "0.9" +prost = "0.11.9" rand = "0.8" serde = "1.0.136" serde_json = "1.0.79" diff --git a/base_layer/core/Cargo.toml b/base_layer/core/Cargo.toml index 402509b281..2863e34ece 100644 --- a/base_layer/core/Cargo.toml +++ b/base_layer/core/Cargo.toml @@ -61,7 +61,7 @@ num-traits = "0.2.15" num-derive = "0.3.3" num-format = "0.4.0" once_cell = "1.8.0" -prost = "0.9" +prost = "0.11.9" rand = "0.8" randomx-rs = { version = "1.3", optional = true } serde = { version = "1.0.106", features = ["derive"] } diff --git a/base_layer/p2p/Cargo.toml b/base_layer/p2p/Cargo.toml index 5451de68ec..9dcbdb3d5c 100644 --- a/base_layer/p2p/Cargo.toml +++ b/base_layer/p2p/Cargo.toml @@ -25,7 +25,7 @@ futures = { version = "^0.3.1" } lmdb-zero = "0.4.4" log = "0.4.6" pgp = { version = "0.10", optional = true } -prost = "=0.9.0" +prost = "0.11.9" rand = "0.8" reqwest = { version = "0.11", optional = true, default-features = false } rustls = "0.20.2" diff --git a/base_layer/p2p/src/proto/mod.rs b/base_layer/p2p/src/proto/mod.rs index ff3b1becac..fe538b10ba 100644 --- a/base_layer/p2p/src/proto/mod.rs +++ b/base_layer/p2p/src/proto/mod.rs @@ -20,10 +20,12 @@ // WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE // USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. +#[allow(clippy::all, clippy::pedantic)] pub(crate) mod liveness { tari_comms::outdir_include!("tari.p2p.liveness.rs"); } +#[allow(clippy::all, clippy::pedantic)] pub(crate) mod message_type { tari_comms::outdir_include!("tari.p2p.message_type.rs"); } diff --git a/base_layer/wallet/Cargo.toml b/base_layer/wallet/Cargo.toml index e6c764deb3..43247743d5 100644 --- a/base_layer/wallet/Cargo.toml +++ b/base_layer/wallet/Cargo.toml @@ -51,7 +51,7 @@ strum_macros = "0.22" tempfile = "3.1.0" thiserror = "1.0.26" tower = "0.4" -prost = "0.9" +prost = "0.11.9" itertools = "0.10.3" chacha20poly1305 = "0.10.1" zeroize = "1" @@ -65,7 +65,7 @@ tari_comms_dht = { path = "../../comms/dht", features = ["test-mocks"] } tari_test_utils = { path = "../../infrastructure/test_utils" } tari_core = { path = "../../base_layer/core", default-features = false, features = ["transactions", "mempool_proto", "base_node_proto", "base_node"] } env_logger = "0.7.1" -prost = "0.9.0" +prost = "0.11.9" [features] default = ["bundled_sqlite"] diff --git a/clients/rust/wallet_grpc_client/Cargo.toml b/clients/rust/wallet_grpc_client/Cargo.toml index 79fcbc9d7c..0a17c9a9fc 100644 --- a/clients/rust/wallet_grpc_client/Cargo.toml +++ b/clients/rust/wallet_grpc_client/Cargo.toml @@ -14,7 +14,7 @@ minotari_app_grpc = { path = "../../../applications/minotari_app_grpc" } tari_common_types = { path = "../../../base_layer/common_types" } thiserror = "1.0.35" -tonic = { version = "0.6", default-features = false, features = ["codegen", "transport"] } +tonic = { version = "0.8.3", default-features = false, features = ["codegen", "transport", "tls"] } [dev-dependencies] tokio = { version = "1", features = ["macros"] } diff --git a/common/Cargo.toml b/common/Cargo.toml index 55d04d58df..6422193ddc 100644 --- a/common/Cargo.toml +++ b/common/Cargo.toml @@ -25,7 +25,7 @@ log = "0.4.8" log4rs = { git = "https://github.com/tari-project/log4rs.git", default_features = false, features = ["config_parsing", "threshold_filter", "yaml_format"] } multiaddr = { version = "0.14.0" } path-clean = "0.1.0" -prost-build = { version = "0.9.0", optional = true } +prost-build = { version = "0.11.9", optional = true } serde = { version = "1.0.106", default_features = false } serde_json = "1.0.51" serde_yaml = "0.9.17" diff --git a/comms/core/Cargo.toml b/comms/core/Cargo.toml index 19b5b63c80..1e7c69cc2d 100644 --- a/comms/core/Cargo.toml +++ b/comms/core/Cargo.toml @@ -34,7 +34,7 @@ multiaddr = { version = "0.14.0" } nom = { version = "7.1", features = ["std"], default-features = false } once_cell = "1.8.0" pin-project = "1.0.8" -prost = "=0.9.0" +prost = "=0.11.9" rand = "0.8" serde = "1.0.119" serde_derive = "1.0.119" diff --git a/comms/core/src/proto/mod.rs b/comms/core/src/proto/mod.rs index 31cacc7b0e..c28819bb1a 100644 --- a/comms/core/src/proto/mod.rs +++ b/comms/core/src/proto/mod.rs @@ -20,14 +20,17 @@ // WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE // USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. +#[allow(clippy::all, clippy::pedantic)] pub(crate) mod envelope { outdir_include!("tari.comms.envelope.rs"); } +#[allow(clippy::all, clippy::pedantic)] pub(crate) mod identity { outdir_include!("tari.comms.identity.rs"); } +#[allow(clippy::all, clippy::pedantic)] pub(crate) mod rpc { outdir_include!("tari.comms.rpc.rs"); } diff --git a/comms/dht/Cargo.toml b/comms/dht/Cargo.toml index c3276dec6e..fb8a6f1188 100644 --- a/comms/dht/Cargo.toml +++ b/comms/dht/Cargo.toml @@ -31,7 +31,7 @@ digest = "0.10" futures = "^0.3.1" log = "0.4.8" log-mdc = "0.1.0" -prost = "=0.9.0" +prost = "=0.11.9" rand = "0.8" serde = "1.0.90" thiserror = "1.0.26" diff --git a/comms/dht/src/proto/mod.rs b/comms/dht/src/proto/mod.rs index 33b2f4c536..46b79d0d5f 100644 --- a/comms/dht/src/proto/mod.rs +++ b/comms/dht/src/proto/mod.rs @@ -38,27 +38,33 @@ use tari_utilities::{hex::Hex, ByteArray}; use crate::{proto::dht::JoinMessage, rpc::UnvalidatedPeerInfo}; +#[allow(clippy::all, clippy::pedantic)] pub mod common { tari_comms::outdir_include!("tari.dht.common.rs"); } +#[allow(clippy::all, clippy::pedantic)] pub mod envelope { tari_comms::outdir_include!("tari.dht.envelope.rs"); } +#[allow(clippy::all, clippy::pedantic)] pub mod dht { use super::common; tari_comms::outdir_include!("tari.dht.rs"); } +#[allow(clippy::all, clippy::pedantic)] pub mod rpc { tari_comms::outdir_include!("tari.dht.rpc.rs"); } +#[allow(clippy::all, clippy::pedantic)] pub mod store_forward { tari_comms::outdir_include!("tari.dht.store_forward.rs"); } +#[allow(clippy::all, clippy::pedantic)] pub mod message_header { tari_comms::outdir_include!("tari.dht.message_header.rs"); } diff --git a/comms/rpc_macros/Cargo.toml b/comms/rpc_macros/Cargo.toml index 05adae3db3..68adb6e678 100644 --- a/comms/rpc_macros/Cargo.toml +++ b/comms/rpc_macros/Cargo.toml @@ -23,6 +23,6 @@ tari_comms = { path = "../core", features = ["rpc"] } tari_test_utils = { path = "../../infrastructure/test_utils" } futures = "0.3.5" -prost = "0.9.0" +prost = "0.11.9" tokio = { version = "1", features = ["macros"] } tower-service = "0.3" diff --git a/comms/rpc_macros/tests/macro.rs b/comms/rpc_macros/tests/macro.rs index 0c36355942..fa39623f59 100644 --- a/comms/rpc_macros/tests/macro.rs +++ b/comms/rpc_macros/tests/macro.rs @@ -56,8 +56,8 @@ pub trait Test: Sync + Send + 'static { fn some_non_rpc_method(&self); } -#[derive(prost::Message)] -pub struct CustomMessage; +#[derive(Clone, PartialEq, prost::Message)] +pub struct CustomMessage {} #[derive(Default)] pub struct TestService { @@ -127,7 +127,7 @@ async fn it_correctly_maps_the_method_nums() { .unwrap(); assert_eq!(*spy.read().await.get("request_response").unwrap(), 1); server - .call(Request::new(2.into(), CustomMessage.to_encoded_bytes().into())) + .call(Request::new(2.into(), CustomMessage {}.to_encoded_bytes().into())) .await .unwrap(); assert_eq!(*spy.read().await.get("server_streaming").unwrap(), 1); @@ -167,7 +167,7 @@ async fn it_generates_client_calls() { // This is a test that the correct client functions are generated - if this test compiles then it has already passed task::spawn(async move { let _result = client.request_response(111).await; - let mut streaming_resp = client.server_streaming(CustomMessage).await.unwrap(); + let mut streaming_resp = client.server_streaming(CustomMessage {}).await.unwrap(); streaming_resp.next().await; let _result = client.unit().await; }); diff --git a/integration_tests/Cargo.toml b/integration_tests/Cargo.toml index 792a942a1c..c9ce21a052 100644 --- a/integration_tests/Cargo.toml +++ b/integration_tests/Cargo.toml @@ -49,7 +49,7 @@ tempfile = "3.3.0" thiserror = "^1.0.20" time = "0.3.15" tokio = { version = "1.10", features = ["macros", "time", "sync", "rt-multi-thread"] } -tonic = "0.6.2" +tonic = "0.8.3" [package.metadata.cargo-machete] ignored = ["minotari_wallet_ffi", "minotari_chat_ffi"]