diff --git a/Cargo.lock b/Cargo.lock index 959fb36cd1d78..fb1a0cbd7263e 100644 --- a/Cargo.lock +++ b/Cargo.lock @@ -16215,12 +16215,6 @@ dependencies = [ "strum_macros 0.25.3", ] -[[package]] -name = "strum" -version = "0.26.3" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "8fec0f0aef304996cf250b31b5a10dee7980c85da9d759361292b8bca5a18f06" - [[package]] name = "strum_macros" version = "0.24.3" @@ -16247,19 +16241,6 @@ dependencies = [ "syn 2.0.87", ] -[[package]] -name = "strum_macros" -version = "0.26.4" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "4c6bee85a5a24955dc440386795aa378cd9cf82acd5f764469152d2270e581be" -dependencies = [ - "heck 0.5.0", - "proc-macro2", - "quote", - "rustversion", - "syn 2.0.87", -] - [[package]] name = "subtle" version = "2.5.0" @@ -17028,12 +17009,13 @@ dependencies = [ [[package]] name = "tonic" version = "0.11.0" -source = "git+https://github.com/aptos-labs/tonic.git?rev=0da1ba8b1751d6e19eb55be24cccf9ae933c666e#0da1ba8b1751d6e19eb55be24cccf9ae933c666e" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "76c4eb7a4e9ef9d4763600161f12f5070b92a578e1b634db88a6887844c91a13" dependencies = [ "async-stream", "async-trait", "axum 0.6.20", - "base64 0.22.1", + "base64 0.21.7", "bytes", "flate2", "h2 0.3.26", @@ -17046,16 +17028,15 @@ dependencies = [ "prost 0.12.3", "rustls-native-certs 0.7.0", "rustls-pemfile 2.1.1", - "strum 0.26.3", - "strum_macros 0.26.4", + "rustls-pki-types", "tokio", - "tokio-rustls 0.26.0", + "tokio-rustls 0.25.0", "tokio-stream", "tower", "tower-layer", "tower-service", "tracing", - "zstd", + "zstd 0.12.4", ] [[package]] @@ -17090,7 +17071,7 @@ dependencies = [ "tower-layer", "tower-service", "tracing", - "zstd", + "zstd 0.13.0", ] [[package]] @@ -18507,13 +18488,32 @@ dependencies = [ "thiserror", ] +[[package]] +name = "zstd" +version = "0.12.4" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "1a27595e173641171fc74a1232b7b1c7a7cb6e18222c11e9dfb9888fa424c53c" +dependencies = [ + "zstd-safe 6.0.6", +] + [[package]] name = "zstd" version = "0.13.0" source = "registry+https://github.com/rust-lang/crates.io-index" checksum = "bffb3309596d527cfcba7dfc6ed6052f1d39dfbd7c867aa2e865e4a449c10110" dependencies = [ - "zstd-safe", + "zstd-safe 7.0.0", +] + +[[package]] +name = "zstd-safe" +version = "6.0.6" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "ee98ffd0b48ee95e6c5168188e44a54550b1564d9d530ee21d5f0eaed1069581" +dependencies = [ + "libc", + "zstd-sys", ] [[package]] diff --git a/Cargo.toml b/Cargo.toml index b4156c4834c51..7eb0a47c949b8 100644 --- a/Cargo.toml +++ b/Cargo.toml @@ -929,7 +929,6 @@ debug = true serde-reflection = { git = "https://github.com/aptos-labs/serde-reflection", rev = "73b6bbf748334b71ff6d7d09d06a29e3062ca075" } merlin = { git = "https://github.com/aptos-labs/merlin" } x25519-dalek = { git = "https://github.com/aptos-labs/x25519-dalek", branch = "zeroize_v1" } -tonic = { git = "https://github.com/aptos-labs/tonic.git", rev = "0da1ba8b1751d6e19eb55be24cccf9ae933c666e" } futures = { git = "https://github.com/aptos-labs/futures-rs", branch = "backport" } futures-channel = { git = "https://github.com/aptos-labs/futures-rs", branch = "backport" } futures-executor = { git = "https://github.com/aptos-labs/futures-rs", branch = "backport" } diff --git a/protos/rust/src/pb/aptos.indexer.v1.rs b/protos/rust/src/pb/aptos.indexer.v1.rs index 000b9e73c1c7c..1ed6649b8ffc0 100644 --- a/protos/rust/src/pb/aptos.indexer.v1.rs +++ b/protos/rust/src/pb/aptos.indexer.v1.rs @@ -4,6 +4,7 @@ // @generated // This file is @generated by prost-build. /// This is for storage only. +#[allow(clippy::derive_partial_eq_without_eq)] #[derive(Clone, PartialEq, ::prost::Message)] pub struct TransactionsInStorage { /// Required; transactions data. @@ -13,6 +14,7 @@ pub struct TransactionsInStorage { #[prost(uint64, optional, tag="2")] pub starting_version: ::core::option::Option, } +#[allow(clippy::derive_partial_eq_without_eq)] #[derive(Clone, Copy, PartialEq, ::prost::Message)] pub struct GetTransactionsRequest { /// Required; start version of current stream. @@ -28,6 +30,7 @@ pub struct GetTransactionsRequest { pub batch_size: ::core::option::Option, } /// TransactionsResponse is a batch of transactions. +#[allow(clippy::derive_partial_eq_without_eq)] #[derive(Clone, PartialEq, ::prost::Message)] pub struct TransactionsResponse { /// Required; transactions data. diff --git a/protos/rust/src/pb/aptos.indexer.v1.tonic.rs b/protos/rust/src/pb/aptos.indexer.v1.tonic.rs index fac3da40c7d14..c974c2d02a567 100644 --- a/protos/rust/src/pb/aptos.indexer.v1.tonic.rs +++ b/protos/rust/src/pb/aptos.indexer.v1.tonic.rs @@ -4,13 +4,7 @@ // @generated /// Generated client implementations. pub mod raw_data_client { - #![allow( - unused_variables, - dead_code, - missing_docs, - clippy::wildcard_imports, - clippy::let_unit_value, - )] + #![allow(unused_variables, dead_code, missing_docs, clippy::let_unit_value)] use tonic::codegen::*; use tonic::codegen::http::Uri; /// @@ -33,8 +27,8 @@ pub mod raw_data_client { where T: tonic::client::GrpcService, T::Error: Into, - T::ResponseBody: Body + std::marker::Send + 'static, - ::Error: Into + std::marker::Send, + T::ResponseBody: Body + Send + 'static, + ::Error: Into + Send, { pub fn new(inner: T) -> Self { let inner = tonic::client::Grpc::new(inner); @@ -59,7 +53,7 @@ pub mod raw_data_client { >, , - >>::Error: Into + std::marker::Send + std::marker::Sync, + >>::Error: Into + Send + Sync, { RawDataClient::new(InterceptedService::new(inner, interceptor)) } @@ -107,7 +101,8 @@ pub mod raw_data_client { .ready() .await .map_err(|e| { - tonic::Status::unknown( + tonic::Status::new( + tonic::Code::Unknown, format!("Service was not ready: {}", e.into()), ) })?; @@ -124,22 +119,16 @@ pub mod raw_data_client { } /// Generated server implementations. pub mod raw_data_server { - #![allow( - unused_variables, - dead_code, - missing_docs, - clippy::wildcard_imports, - clippy::let_unit_value, - )] + #![allow(unused_variables, dead_code, missing_docs, clippy::let_unit_value)] use tonic::codegen::*; /// Generated trait containing gRPC methods that should be implemented for use with RawDataServer. #[async_trait] - pub trait RawData: std::marker::Send + std::marker::Sync + 'static { + pub trait RawData: Send + Sync + 'static { /// Server streaming response type for the GetTransactions method. type GetTransactionsStream: tonic::codegen::tokio_stream::Stream< Item = std::result::Result, > - + std::marker::Send + + Send + 'static; /** Get transactions batch without any filtering from starting version and end if transaction count is present. */ @@ -153,14 +142,14 @@ pub mod raw_data_server { } /// #[derive(Debug)] - pub struct RawDataServer { + pub struct RawDataServer { inner: Arc, accept_compression_encodings: EnabledCompressionEncodings, send_compression_encodings: EnabledCompressionEncodings, max_decoding_message_size: Option, max_encoding_message_size: Option, } - impl RawDataServer { + impl RawDataServer { pub fn new(inner: T) -> Self { Self::from_arc(Arc::new(inner)) } @@ -214,8 +203,8 @@ pub mod raw_data_server { impl tonic::codegen::Service> for RawDataServer where T: RawData, - B: Body + std::marker::Send + 'static, - B::Error: Into + std::marker::Send + 'static, + B: Body + Send + 'static, + B::Error: Into + Send + 'static, { type Response = http::Response; type Error = std::convert::Infallible; @@ -277,25 +266,23 @@ pub mod raw_data_server { } _ => { Box::pin(async move { - let mut response = http::Response::new(empty_body()); - let headers = response.headers_mut(); - headers - .insert( - tonic::Status::GRPC_STATUS, - (tonic::Code::Unimplemented as i32).into(), - ); - headers - .insert( - http::header::CONTENT_TYPE, - tonic::metadata::GRPC_CONTENT_TYPE, - ); - Ok(response) + Ok( + http::Response::builder() + .status(200) + .header("grpc-status", tonic::Code::Unimplemented as i32) + .header( + http::header::CONTENT_TYPE, + tonic::metadata::GRPC_CONTENT_TYPE, + ) + .body(empty_body()) + .unwrap(), + ) }) } } } } - impl Clone for RawDataServer { + impl Clone for RawDataServer { fn clone(&self) -> Self { let inner = self.inner.clone(); Self { @@ -307,9 +294,7 @@ pub mod raw_data_server { } } } - /// Generated gRPC service name - pub const SERVICE_NAME: &str = "aptos.indexer.v1.RawData"; - impl tonic::server::NamedService for RawDataServer { - const NAME: &'static str = SERVICE_NAME; + impl tonic::server::NamedService for RawDataServer { + const NAME: &'static str = "aptos.indexer.v1.RawData"; } } diff --git a/protos/rust/src/pb/aptos.internal.fullnode.v1.rs b/protos/rust/src/pb/aptos.internal.fullnode.v1.rs index 2567f141fad8d..7ee768e325b22 100644 --- a/protos/rust/src/pb/aptos.internal.fullnode.v1.rs +++ b/protos/rust/src/pb/aptos.internal.fullnode.v1.rs @@ -10,11 +10,13 @@ // TransactionOutput data(size n) // StreamStatus: BATCH_END with version x + (k + 1) * n - 1 +#[allow(clippy::derive_partial_eq_without_eq)] #[derive(Clone, PartialEq, ::prost::Message)] pub struct TransactionsOutput { #[prost(message, repeated, tag="1")] pub transactions: ::prost::alloc::vec::Vec, } +#[allow(clippy::derive_partial_eq_without_eq)] #[derive(Clone, Copy, PartialEq, ::prost::Message)] pub struct StreamStatus { #[prost(enumeration="stream_status::StatusType", tag="1")] @@ -44,9 +46,9 @@ pub mod stream_status { /// (if the ProtoBuf definition does not change) and safe for programmatic use. pub fn as_str_name(&self) -> &'static str { match self { - Self::Unspecified => "STATUS_TYPE_UNSPECIFIED", - Self::Init => "STATUS_TYPE_INIT", - Self::BatchEnd => "STATUS_TYPE_BATCH_END", + StatusType::Unspecified => "STATUS_TYPE_UNSPECIFIED", + StatusType::Init => "STATUS_TYPE_INIT", + StatusType::BatchEnd => "STATUS_TYPE_BATCH_END", } } /// Creates an enum from field names used in the ProtoBuf definition. @@ -60,6 +62,7 @@ pub mod stream_status { } } } +#[allow(clippy::derive_partial_eq_without_eq)] #[derive(Clone, Copy, PartialEq, ::prost::Message)] pub struct GetTransactionsFromNodeRequest { /// Required; start version of current stream. @@ -71,6 +74,7 @@ pub struct GetTransactionsFromNodeRequest { #[prost(uint64, optional, tag="2")] pub transactions_count: ::core::option::Option, } +#[allow(clippy::derive_partial_eq_without_eq)] #[derive(Clone, PartialEq, ::prost::Message)] pub struct TransactionsFromNodeResponse { /// Making sure that all the responses include a chain id @@ -81,7 +85,8 @@ pub struct TransactionsFromNodeResponse { } /// Nested message and enum types in `TransactionsFromNodeResponse`. pub mod transactions_from_node_response { - #[derive(Clone, PartialEq, ::prost::Oneof)] + #[allow(clippy::derive_partial_eq_without_eq)] +#[derive(Clone, PartialEq, ::prost::Oneof)] pub enum Response { #[prost(message, tag="1")] Status(super::StreamStatus), diff --git a/protos/rust/src/pb/aptos.internal.fullnode.v1.tonic.rs b/protos/rust/src/pb/aptos.internal.fullnode.v1.tonic.rs index e5ad50187619f..2ae76b857a0f0 100644 --- a/protos/rust/src/pb/aptos.internal.fullnode.v1.tonic.rs +++ b/protos/rust/src/pb/aptos.internal.fullnode.v1.tonic.rs @@ -4,13 +4,7 @@ // @generated /// Generated client implementations. pub mod fullnode_data_client { - #![allow( - unused_variables, - dead_code, - missing_docs, - clippy::wildcard_imports, - clippy::let_unit_value, - )] + #![allow(unused_variables, dead_code, missing_docs, clippy::let_unit_value)] use tonic::codegen::*; use tonic::codegen::http::Uri; /// @@ -33,8 +27,8 @@ pub mod fullnode_data_client { where T: tonic::client::GrpcService, T::Error: Into, - T::ResponseBody: Body + std::marker::Send + 'static, - ::Error: Into + std::marker::Send, + T::ResponseBody: Body + Send + 'static, + ::Error: Into + Send, { pub fn new(inner: T) -> Self { let inner = tonic::client::Grpc::new(inner); @@ -59,7 +53,7 @@ pub mod fullnode_data_client { >, , - >>::Error: Into + std::marker::Send + std::marker::Sync, + >>::Error: Into + Send + Sync, { FullnodeDataClient::new(InterceptedService::new(inner, interceptor)) } @@ -108,7 +102,8 @@ pub mod fullnode_data_client { .ready() .await .map_err(|e| { - tonic::Status::unknown( + tonic::Status::new( + tonic::Code::Unknown, format!("Service was not ready: {}", e.into()), ) })?; @@ -130,17 +125,11 @@ pub mod fullnode_data_client { } /// Generated server implementations. pub mod fullnode_data_server { - #![allow( - unused_variables, - dead_code, - missing_docs, - clippy::wildcard_imports, - clippy::let_unit_value, - )] + #![allow(unused_variables, dead_code, missing_docs, clippy::let_unit_value)] use tonic::codegen::*; /// Generated trait containing gRPC methods that should be implemented for use with FullnodeDataServer. #[async_trait] - pub trait FullnodeData: std::marker::Send + std::marker::Sync + 'static { + pub trait FullnodeData: Send + Sync + 'static { /// Server streaming response type for the GetTransactionsFromNode method. type GetTransactionsFromNodeStream: tonic::codegen::tokio_stream::Stream< Item = std::result::Result< @@ -148,7 +137,7 @@ pub mod fullnode_data_server { tonic::Status, >, > - + std::marker::Send + + Send + 'static; /// async fn get_transactions_from_node( @@ -161,14 +150,14 @@ pub mod fullnode_data_server { } /// #[derive(Debug)] - pub struct FullnodeDataServer { + pub struct FullnodeDataServer { inner: Arc, accept_compression_encodings: EnabledCompressionEncodings, send_compression_encodings: EnabledCompressionEncodings, max_decoding_message_size: Option, max_encoding_message_size: Option, } - impl FullnodeDataServer { + impl FullnodeDataServer { pub fn new(inner: T) -> Self { Self::from_arc(Arc::new(inner)) } @@ -222,8 +211,8 @@ pub mod fullnode_data_server { impl tonic::codegen::Service> for FullnodeDataServer where T: FullnodeData, - B: Body + std::marker::Send + 'static, - B::Error: Into + std::marker::Send + 'static, + B: Body + Send + 'static, + B::Error: Into + Send + 'static, { type Response = http::Response; type Error = std::convert::Infallible; @@ -291,25 +280,23 @@ pub mod fullnode_data_server { } _ => { Box::pin(async move { - let mut response = http::Response::new(empty_body()); - let headers = response.headers_mut(); - headers - .insert( - tonic::Status::GRPC_STATUS, - (tonic::Code::Unimplemented as i32).into(), - ); - headers - .insert( - http::header::CONTENT_TYPE, - tonic::metadata::GRPC_CONTENT_TYPE, - ); - Ok(response) + Ok( + http::Response::builder() + .status(200) + .header("grpc-status", tonic::Code::Unimplemented as i32) + .header( + http::header::CONTENT_TYPE, + tonic::metadata::GRPC_CONTENT_TYPE, + ) + .body(empty_body()) + .unwrap(), + ) }) } } } } - impl Clone for FullnodeDataServer { + impl Clone for FullnodeDataServer { fn clone(&self) -> Self { let inner = self.inner.clone(); Self { @@ -321,9 +308,7 @@ pub mod fullnode_data_server { } } } - /// Generated gRPC service name - pub const SERVICE_NAME: &str = "aptos.internal.fullnode.v1.FullnodeData"; - impl tonic::server::NamedService for FullnodeDataServer { - const NAME: &'static str = SERVICE_NAME; + impl tonic::server::NamedService for FullnodeDataServer { + const NAME: &'static str = "aptos.internal.fullnode.v1.FullnodeData"; } } diff --git a/protos/rust/src/pb/aptos.remote_executor.v1.rs b/protos/rust/src/pb/aptos.remote_executor.v1.rs index 29daad3efd968..b84e6e1e68f50 100644 --- a/protos/rust/src/pb/aptos.remote_executor.v1.rs +++ b/protos/rust/src/pb/aptos.remote_executor.v1.rs @@ -3,6 +3,7 @@ // @generated // This file is @generated by prost-build. +#[allow(clippy::derive_partial_eq_without_eq)] #[derive(Clone, PartialEq, ::prost::Message)] pub struct NetworkMessage { #[prost(bytes="vec", tag="1")] @@ -10,6 +11,7 @@ pub struct NetworkMessage { #[prost(string, tag="2")] pub message_type: ::prost::alloc::string::String, } +#[allow(clippy::derive_partial_eq_without_eq)] #[derive(Clone, Copy, PartialEq, ::prost::Message)] pub struct Empty { } diff --git a/protos/rust/src/pb/aptos.remote_executor.v1.tonic.rs b/protos/rust/src/pb/aptos.remote_executor.v1.tonic.rs index 85f08bf9e8caa..bab5b94b15a56 100644 --- a/protos/rust/src/pb/aptos.remote_executor.v1.tonic.rs +++ b/protos/rust/src/pb/aptos.remote_executor.v1.tonic.rs @@ -4,13 +4,7 @@ // @generated /// Generated client implementations. pub mod network_message_service_client { - #![allow( - unused_variables, - dead_code, - missing_docs, - clippy::wildcard_imports, - clippy::let_unit_value, - )] + #![allow(unused_variables, dead_code, missing_docs, clippy::let_unit_value)] use tonic::codegen::*; use tonic::codegen::http::Uri; /// @@ -33,8 +27,8 @@ pub mod network_message_service_client { where T: tonic::client::GrpcService, T::Error: Into, - T::ResponseBody: Body + std::marker::Send + 'static, - ::Error: Into + std::marker::Send, + T::ResponseBody: Body + Send + 'static, + ::Error: Into + Send, { pub fn new(inner: T) -> Self { let inner = tonic::client::Grpc::new(inner); @@ -59,7 +53,7 @@ pub mod network_message_service_client { >, , - >>::Error: Into + std::marker::Send + std::marker::Sync, + >>::Error: Into + Send + Sync, { NetworkMessageServiceClient::new(InterceptedService::new(inner, interceptor)) } @@ -103,7 +97,8 @@ pub mod network_message_service_client { .ready() .await .map_err(|e| { - tonic::Status::unknown( + tonic::Status::new( + tonic::Code::Unknown, format!("Service was not ready: {}", e.into()), ) })?; @@ -125,17 +120,11 @@ pub mod network_message_service_client { } /// Generated server implementations. pub mod network_message_service_server { - #![allow( - unused_variables, - dead_code, - missing_docs, - clippy::wildcard_imports, - clippy::let_unit_value, - )] + #![allow(unused_variables, dead_code, missing_docs, clippy::let_unit_value)] use tonic::codegen::*; /// Generated trait containing gRPC methods that should be implemented for use with NetworkMessageServiceServer. #[async_trait] - pub trait NetworkMessageService: std::marker::Send + std::marker::Sync + 'static { + pub trait NetworkMessageService: Send + Sync + 'static { /// async fn simple_msg_exchange( &self, @@ -144,14 +133,14 @@ pub mod network_message_service_server { } /// #[derive(Debug)] - pub struct NetworkMessageServiceServer { + pub struct NetworkMessageServiceServer { inner: Arc, accept_compression_encodings: EnabledCompressionEncodings, send_compression_encodings: EnabledCompressionEncodings, max_decoding_message_size: Option, max_encoding_message_size: Option, } - impl NetworkMessageServiceServer { + impl NetworkMessageServiceServer { pub fn new(inner: T) -> Self { Self::from_arc(Arc::new(inner)) } @@ -206,8 +195,8 @@ pub mod network_message_service_server { for NetworkMessageServiceServer where T: NetworkMessageService, - B: Body + std::marker::Send + 'static, - B::Error: Into + std::marker::Send + 'static, + B: Body + Send + 'static, + B::Error: Into + Send + 'static, { type Response = http::Response; type Error = std::convert::Infallible; @@ -271,25 +260,23 @@ pub mod network_message_service_server { } _ => { Box::pin(async move { - let mut response = http::Response::new(empty_body()); - let headers = response.headers_mut(); - headers - .insert( - tonic::Status::GRPC_STATUS, - (tonic::Code::Unimplemented as i32).into(), - ); - headers - .insert( - http::header::CONTENT_TYPE, - tonic::metadata::GRPC_CONTENT_TYPE, - ); - Ok(response) + Ok( + http::Response::builder() + .status(200) + .header("grpc-status", tonic::Code::Unimplemented as i32) + .header( + http::header::CONTENT_TYPE, + tonic::metadata::GRPC_CONTENT_TYPE, + ) + .body(empty_body()) + .unwrap(), + ) }) } } } } - impl Clone for NetworkMessageServiceServer { + impl Clone for NetworkMessageServiceServer { fn clone(&self) -> Self { let inner = self.inner.clone(); Self { @@ -301,9 +288,8 @@ pub mod network_message_service_server { } } } - /// Generated gRPC service name - pub const SERVICE_NAME: &str = "aptos.remote_executor.v1.NetworkMessageService"; - impl tonic::server::NamedService for NetworkMessageServiceServer { - const NAME: &'static str = SERVICE_NAME; + impl tonic::server::NamedService + for NetworkMessageServiceServer { + const NAME: &'static str = "aptos.remote_executor.v1.NetworkMessageService"; } } diff --git a/protos/rust/src/pb/aptos.transaction.v1.rs b/protos/rust/src/pb/aptos.transaction.v1.rs index 8e9ffcceb7d51..5eea9117daae1 100644 --- a/protos/rust/src/pb/aptos.transaction.v1.rs +++ b/protos/rust/src/pb/aptos.transaction.v1.rs @@ -12,6 +12,7 @@ /// the same `height`. /// /// The Genesis Transaction (version 0) is contained within the first block, which has a height of `0` +#[allow(clippy::derive_partial_eq_without_eq)] #[derive(Clone, PartialEq, ::prost::Message)] pub struct Block { /// Timestamp represents the timestamp of the `BlockMetadataTransaction` (or `GenesisTransaction` for the genesis block) @@ -34,6 +35,7 @@ pub struct Block { /// - Block Metadata Transaction: transactions generated by the chain to group together transactions forming a "block" /// - Block Epilogue / State Checkpoint Transaction: transactions generated by the chain to end the group transactions forming a bloc /// - Genesis Transaction: the first transaction of the chain, with all core contract and validator information baked in +#[allow(clippy::derive_partial_eq_without_eq)] #[derive(Clone, PartialEq, ::prost::Message)] pub struct Transaction { #[prost(message, optional, tag="1")] @@ -74,13 +76,13 @@ pub mod transaction { /// (if the ProtoBuf definition does not change) and safe for programmatic use. pub fn as_str_name(&self) -> &'static str { match self { - Self::Unspecified => "TRANSACTION_TYPE_UNSPECIFIED", - Self::Genesis => "TRANSACTION_TYPE_GENESIS", - Self::BlockMetadata => "TRANSACTION_TYPE_BLOCK_METADATA", - Self::StateCheckpoint => "TRANSACTION_TYPE_STATE_CHECKPOINT", - Self::User => "TRANSACTION_TYPE_USER", - Self::Validator => "TRANSACTION_TYPE_VALIDATOR", - Self::BlockEpilogue => "TRANSACTION_TYPE_BLOCK_EPILOGUE", + TransactionType::Unspecified => "TRANSACTION_TYPE_UNSPECIFIED", + TransactionType::Genesis => "TRANSACTION_TYPE_GENESIS", + TransactionType::BlockMetadata => "TRANSACTION_TYPE_BLOCK_METADATA", + TransactionType::StateCheckpoint => "TRANSACTION_TYPE_STATE_CHECKPOINT", + TransactionType::User => "TRANSACTION_TYPE_USER", + TransactionType::Validator => "TRANSACTION_TYPE_VALIDATOR", + TransactionType::BlockEpilogue => "TRANSACTION_TYPE_BLOCK_EPILOGUE", } } /// Creates an enum from field names used in the ProtoBuf definition. @@ -97,7 +99,8 @@ pub mod transaction { } } } - #[derive(Clone, PartialEq, ::prost::Oneof)] + #[allow(clippy::derive_partial_eq_without_eq)] +#[derive(Clone, PartialEq, ::prost::Oneof)] pub enum TxnData { #[prost(message, tag="7")] BlockMetadata(super::BlockMetadataTransaction), @@ -116,6 +119,7 @@ pub mod transaction { } } /// Transaction types. +#[allow(clippy::derive_partial_eq_without_eq)] #[derive(Clone, PartialEq, ::prost::Message)] pub struct BlockMetadataTransaction { #[prost(string, tag="1")] @@ -131,6 +135,7 @@ pub struct BlockMetadataTransaction { #[prost(uint32, repeated, tag="6")] pub failed_proposer_indices: ::prost::alloc::vec::Vec, } +#[allow(clippy::derive_partial_eq_without_eq)] #[derive(Clone, PartialEq, ::prost::Message)] pub struct GenesisTransaction { #[prost(message, optional, tag="1")] @@ -138,9 +143,11 @@ pub struct GenesisTransaction { #[prost(message, repeated, tag="2")] pub events: ::prost::alloc::vec::Vec, } +#[allow(clippy::derive_partial_eq_without_eq)] #[derive(Clone, Copy, PartialEq, ::prost::Message)] pub struct StateCheckpointTransaction { } +#[allow(clippy::derive_partial_eq_without_eq)] #[derive(Clone, PartialEq, ::prost::Message)] pub struct ValidatorTransaction { #[prost(message, repeated, tag="3")] @@ -150,14 +157,16 @@ pub struct ValidatorTransaction { } /// Nested message and enum types in `ValidatorTransaction`. pub mod validator_transaction { - #[derive(Clone, PartialEq, ::prost::Message)] + #[allow(clippy::derive_partial_eq_without_eq)] +#[derive(Clone, PartialEq, ::prost::Message)] pub struct ObservedJwkUpdate { #[prost(message, optional, tag="1")] pub quorum_certified_update: ::core::option::Option, } /// Nested message and enum types in `ObservedJwkUpdate`. pub mod observed_jwk_update { - #[derive(Clone, PartialEq, ::prost::Message)] + #[allow(clippy::derive_partial_eq_without_eq)] +#[derive(Clone, PartialEq, ::prost::Message)] pub struct ExportedProviderJwKs { #[prost(string, tag="1")] pub issuer: ::prost::alloc::string::String, @@ -168,14 +177,16 @@ pub mod validator_transaction { } /// Nested message and enum types in `ExportedProviderJWKs`. pub mod exported_provider_jw_ks { - #[derive(Clone, PartialEq, ::prost::Message)] + #[allow(clippy::derive_partial_eq_without_eq)] +#[derive(Clone, PartialEq, ::prost::Message)] pub struct Jwk { #[prost(oneof="jwk::JwkType", tags="1, 2")] pub jwk_type: ::core::option::Option, } /// Nested message and enum types in `JWK`. pub mod jwk { - #[derive(Clone, PartialEq, ::prost::Message)] + #[allow(clippy::derive_partial_eq_without_eq)] +#[derive(Clone, PartialEq, ::prost::Message)] pub struct Rsa { #[prost(string, tag="1")] pub kid: ::prost::alloc::string::String, @@ -188,14 +199,16 @@ pub mod validator_transaction { #[prost(string, tag="5")] pub n: ::prost::alloc::string::String, } - #[derive(Clone, PartialEq, ::prost::Message)] + #[allow(clippy::derive_partial_eq_without_eq)] +#[derive(Clone, PartialEq, ::prost::Message)] pub struct UnsupportedJwk { #[prost(bytes="vec", tag="1")] pub id: ::prost::alloc::vec::Vec, #[prost(bytes="vec", tag="2")] pub payload: ::prost::alloc::vec::Vec, } - #[derive(Clone, PartialEq, ::prost::Oneof)] + #[allow(clippy::derive_partial_eq_without_eq)] +#[derive(Clone, PartialEq, ::prost::Oneof)] pub enum JwkType { #[prost(message, tag="1")] UnsupportedJwk(UnsupportedJwk), @@ -204,7 +217,8 @@ pub mod validator_transaction { } } } - #[derive(Clone, PartialEq, ::prost::Message)] + #[allow(clippy::derive_partial_eq_without_eq)] +#[derive(Clone, PartialEq, ::prost::Message)] pub struct ExportedAggregateSignature { #[prost(uint64, repeated, tag="1")] pub signer_indices: ::prost::alloc::vec::Vec, @@ -212,7 +226,8 @@ pub mod validator_transaction { #[prost(bytes="vec", tag="2")] pub sig: ::prost::alloc::vec::Vec, } - #[derive(Clone, PartialEq, ::prost::Message)] + #[allow(clippy::derive_partial_eq_without_eq)] +#[derive(Clone, PartialEq, ::prost::Message)] pub struct QuorumCertifiedUpdate { #[prost(message, optional, tag="1")] pub update: ::core::option::Option, @@ -220,14 +235,16 @@ pub mod validator_transaction { pub multi_sig: ::core::option::Option, } } - #[derive(Clone, PartialEq, ::prost::Message)] + #[allow(clippy::derive_partial_eq_without_eq)] +#[derive(Clone, PartialEq, ::prost::Message)] pub struct DkgUpdate { #[prost(message, optional, tag="1")] pub dkg_transcript: ::core::option::Option, } /// Nested message and enum types in `DkgUpdate`. pub mod dkg_update { - #[derive(Clone, PartialEq, ::prost::Message)] + #[allow(clippy::derive_partial_eq_without_eq)] +#[derive(Clone, PartialEq, ::prost::Message)] pub struct DkgTranscript { #[prost(uint64, tag="1")] pub epoch: u64, @@ -237,7 +254,8 @@ pub mod validator_transaction { pub payload: ::prost::alloc::vec::Vec, } } - #[derive(Clone, PartialEq, ::prost::Oneof)] + #[allow(clippy::derive_partial_eq_without_eq)] +#[derive(Clone, PartialEq, ::prost::Oneof)] pub enum ValidatorTransactionType { #[prost(message, tag="1")] ObservedJwkUpdate(ObservedJwkUpdate), @@ -245,11 +263,13 @@ pub mod validator_transaction { DkgUpdate(DkgUpdate), } } +#[allow(clippy::derive_partial_eq_without_eq)] #[derive(Clone, Copy, PartialEq, ::prost::Message)] pub struct BlockEpilogueTransaction { #[prost(message, optional, tag="1")] pub block_end_info: ::core::option::Option, } +#[allow(clippy::derive_partial_eq_without_eq)] #[derive(Clone, Copy, PartialEq, ::prost::Message)] pub struct BlockEndInfo { #[prost(bool, tag="1")] @@ -261,6 +281,7 @@ pub struct BlockEndInfo { #[prost(uint64, tag="4")] pub block_approx_output_size: u64, } +#[allow(clippy::derive_partial_eq_without_eq)] #[derive(Clone, PartialEq, ::prost::Message)] pub struct UserTransaction { #[prost(message, optional, tag="1")] @@ -268,6 +289,7 @@ pub struct UserTransaction { #[prost(message, repeated, tag="2")] pub events: ::prost::alloc::vec::Vec, } +#[allow(clippy::derive_partial_eq_without_eq)] #[derive(Clone, PartialEq, ::prost::Message)] pub struct Event { #[prost(message, optional, tag="1")] @@ -281,6 +303,7 @@ pub struct Event { #[prost(string, tag="4")] pub data: ::prost::alloc::string::String, } +#[allow(clippy::derive_partial_eq_without_eq)] #[derive(Clone, PartialEq, ::prost::Message)] pub struct TransactionInfo { #[prost(bytes="vec", tag="1")] @@ -302,6 +325,7 @@ pub struct TransactionInfo { #[prost(message, repeated, tag="9")] pub changes: ::prost::alloc::vec::Vec, } +#[allow(clippy::derive_partial_eq_without_eq)] #[derive(Clone, PartialEq, ::prost::Message)] pub struct EventKey { #[prost(uint64, tag="1")] @@ -309,6 +333,7 @@ pub struct EventKey { #[prost(string, tag="2")] pub account_address: ::prost::alloc::string::String, } +#[allow(clippy::derive_partial_eq_without_eq)] #[derive(Clone, PartialEq, ::prost::Message)] pub struct UserTransactionRequest { #[prost(string, tag="1")] @@ -326,6 +351,7 @@ pub struct UserTransactionRequest { #[prost(message, optional, tag="7")] pub signature: ::core::option::Option, } +#[allow(clippy::derive_partial_eq_without_eq)] #[derive(Clone, PartialEq, ::prost::Message)] pub struct WriteSet { #[prost(enumeration="write_set::WriteSetType", tag="1")] @@ -349,9 +375,9 @@ pub mod write_set { /// (if the ProtoBuf definition does not change) and safe for programmatic use. pub fn as_str_name(&self) -> &'static str { match self { - Self::Unspecified => "WRITE_SET_TYPE_UNSPECIFIED", - Self::ScriptWriteSet => "WRITE_SET_TYPE_SCRIPT_WRITE_SET", - Self::DirectWriteSet => "WRITE_SET_TYPE_DIRECT_WRITE_SET", + WriteSetType::Unspecified => "WRITE_SET_TYPE_UNSPECIFIED", + WriteSetType::ScriptWriteSet => "WRITE_SET_TYPE_SCRIPT_WRITE_SET", + WriteSetType::DirectWriteSet => "WRITE_SET_TYPE_DIRECT_WRITE_SET", } } /// Creates an enum from field names used in the ProtoBuf definition. @@ -364,7 +390,8 @@ pub mod write_set { } } } - #[derive(Clone, PartialEq, ::prost::Oneof)] + #[allow(clippy::derive_partial_eq_without_eq)] +#[derive(Clone, PartialEq, ::prost::Oneof)] pub enum WriteSet { #[prost(message, tag="2")] ScriptWriteSet(super::ScriptWriteSet), @@ -372,6 +399,7 @@ pub mod write_set { DirectWriteSet(super::DirectWriteSet), } } +#[allow(clippy::derive_partial_eq_without_eq)] #[derive(Clone, PartialEq, ::prost::Message)] pub struct ScriptWriteSet { #[prost(string, tag="1")] @@ -379,6 +407,7 @@ pub struct ScriptWriteSet { #[prost(message, optional, tag="2")] pub script: ::core::option::Option, } +#[allow(clippy::derive_partial_eq_without_eq)] #[derive(Clone, PartialEq, ::prost::Message)] pub struct DirectWriteSet { #[prost(message, repeated, tag="1")] @@ -386,6 +415,7 @@ pub struct DirectWriteSet { #[prost(message, repeated, tag="2")] pub events: ::prost::alloc::vec::Vec, } +#[allow(clippy::derive_partial_eq_without_eq)] #[derive(Clone, PartialEq, ::prost::Message)] pub struct WriteSetChange { #[prost(enumeration="write_set_change::Type", tag="1")] @@ -413,13 +443,13 @@ pub mod write_set_change { /// (if the ProtoBuf definition does not change) and safe for programmatic use. pub fn as_str_name(&self) -> &'static str { match self { - Self::Unspecified => "TYPE_UNSPECIFIED", - Self::DeleteModule => "TYPE_DELETE_MODULE", - Self::DeleteResource => "TYPE_DELETE_RESOURCE", - Self::DeleteTableItem => "TYPE_DELETE_TABLE_ITEM", - Self::WriteModule => "TYPE_WRITE_MODULE", - Self::WriteResource => "TYPE_WRITE_RESOURCE", - Self::WriteTableItem => "TYPE_WRITE_TABLE_ITEM", + Type::Unspecified => "TYPE_UNSPECIFIED", + Type::DeleteModule => "TYPE_DELETE_MODULE", + Type::DeleteResource => "TYPE_DELETE_RESOURCE", + Type::DeleteTableItem => "TYPE_DELETE_TABLE_ITEM", + Type::WriteModule => "TYPE_WRITE_MODULE", + Type::WriteResource => "TYPE_WRITE_RESOURCE", + Type::WriteTableItem => "TYPE_WRITE_TABLE_ITEM", } } /// Creates an enum from field names used in the ProtoBuf definition. @@ -436,7 +466,8 @@ pub mod write_set_change { } } } - #[derive(Clone, PartialEq, ::prost::Oneof)] + #[allow(clippy::derive_partial_eq_without_eq)] +#[derive(Clone, PartialEq, ::prost::Oneof)] pub enum Change { #[prost(message, tag="2")] DeleteModule(super::DeleteModule), @@ -452,6 +483,7 @@ pub mod write_set_change { WriteTableItem(super::WriteTableItem), } } +#[allow(clippy::derive_partial_eq_without_eq)] #[derive(Clone, PartialEq, ::prost::Message)] pub struct DeleteModule { #[prost(string, tag="1")] @@ -461,6 +493,7 @@ pub struct DeleteModule { #[prost(message, optional, tag="3")] pub module: ::core::option::Option, } +#[allow(clippy::derive_partial_eq_without_eq)] #[derive(Clone, PartialEq, ::prost::Message)] pub struct DeleteResource { #[prost(string, tag="1")] @@ -472,6 +505,7 @@ pub struct DeleteResource { #[prost(string, tag="4")] pub type_str: ::prost::alloc::string::String, } +#[allow(clippy::derive_partial_eq_without_eq)] #[derive(Clone, PartialEq, ::prost::Message)] pub struct DeleteTableItem { #[prost(bytes="vec", tag="1")] @@ -483,6 +517,7 @@ pub struct DeleteTableItem { #[prost(message, optional, tag="4")] pub data: ::core::option::Option, } +#[allow(clippy::derive_partial_eq_without_eq)] #[derive(Clone, PartialEq, ::prost::Message)] pub struct DeleteTableData { #[prost(string, tag="1")] @@ -490,6 +525,7 @@ pub struct DeleteTableData { #[prost(string, tag="2")] pub key_type: ::prost::alloc::string::String, } +#[allow(clippy::derive_partial_eq_without_eq)] #[derive(Clone, PartialEq, ::prost::Message)] pub struct WriteModule { #[prost(string, tag="1")] @@ -499,6 +535,7 @@ pub struct WriteModule { #[prost(message, optional, tag="3")] pub data: ::core::option::Option, } +#[allow(clippy::derive_partial_eq_without_eq)] #[derive(Clone, PartialEq, ::prost::Message)] pub struct WriteResource { #[prost(string, tag="1")] @@ -512,6 +549,7 @@ pub struct WriteResource { #[prost(string, tag="5")] pub data: ::prost::alloc::string::String, } +#[allow(clippy::derive_partial_eq_without_eq)] #[derive(Clone, PartialEq, ::prost::Message)] pub struct WriteTableData { #[prost(string, tag="1")] @@ -523,6 +561,7 @@ pub struct WriteTableData { #[prost(string, tag="4")] pub value_type: ::prost::alloc::string::String, } +#[allow(clippy::derive_partial_eq_without_eq)] #[derive(Clone, PartialEq, ::prost::Message)] pub struct WriteTableItem { #[prost(bytes="vec", tag="1")] @@ -534,6 +573,7 @@ pub struct WriteTableItem { #[prost(message, optional, tag="4")] pub data: ::core::option::Option, } +#[allow(clippy::derive_partial_eq_without_eq)] #[derive(Clone, PartialEq, ::prost::Message)] pub struct TransactionPayload { #[prost(enumeration="transaction_payload::Type", tag="1")] @@ -559,11 +599,11 @@ pub mod transaction_payload { /// (if the ProtoBuf definition does not change) and safe for programmatic use. pub fn as_str_name(&self) -> &'static str { match self { - Self::Unspecified => "TYPE_UNSPECIFIED", - Self::EntryFunctionPayload => "TYPE_ENTRY_FUNCTION_PAYLOAD", - Self::ScriptPayload => "TYPE_SCRIPT_PAYLOAD", - Self::WriteSetPayload => "TYPE_WRITE_SET_PAYLOAD", - Self::MultisigPayload => "TYPE_MULTISIG_PAYLOAD", + Type::Unspecified => "TYPE_UNSPECIFIED", + Type::EntryFunctionPayload => "TYPE_ENTRY_FUNCTION_PAYLOAD", + Type::ScriptPayload => "TYPE_SCRIPT_PAYLOAD", + Type::WriteSetPayload => "TYPE_WRITE_SET_PAYLOAD", + Type::MultisigPayload => "TYPE_MULTISIG_PAYLOAD", } } /// Creates an enum from field names used in the ProtoBuf definition. @@ -578,7 +618,8 @@ pub mod transaction_payload { } } } - #[derive(Clone, PartialEq, ::prost::Oneof)] + #[allow(clippy::derive_partial_eq_without_eq)] +#[derive(Clone, PartialEq, ::prost::Oneof)] pub enum Payload { #[prost(message, tag="2")] EntryFunctionPayload(super::EntryFunctionPayload), @@ -590,6 +631,7 @@ pub mod transaction_payload { MultisigPayload(super::MultisigPayload), } } +#[allow(clippy::derive_partial_eq_without_eq)] #[derive(Clone, PartialEq, ::prost::Message)] pub struct EntryFunctionPayload { #[prost(message, optional, tag="1")] @@ -601,6 +643,7 @@ pub struct EntryFunctionPayload { #[prost(string, tag="4")] pub entry_function_id_str: ::prost::alloc::string::String, } +#[allow(clippy::derive_partial_eq_without_eq)] #[derive(Clone, PartialEq, ::prost::Message)] pub struct MoveScriptBytecode { #[prost(bytes="vec", tag="1")] @@ -608,6 +651,7 @@ pub struct MoveScriptBytecode { #[prost(message, optional, tag="2")] pub abi: ::core::option::Option, } +#[allow(clippy::derive_partial_eq_without_eq)] #[derive(Clone, PartialEq, ::prost::Message)] pub struct ScriptPayload { #[prost(message, optional, tag="1")] @@ -617,6 +661,7 @@ pub struct ScriptPayload { #[prost(string, repeated, tag="3")] pub arguments: ::prost::alloc::vec::Vec<::prost::alloc::string::String>, } +#[allow(clippy::derive_partial_eq_without_eq)] #[derive(Clone, PartialEq, ::prost::Message)] pub struct MultisigPayload { #[prost(string, tag="1")] @@ -624,6 +669,7 @@ pub struct MultisigPayload { #[prost(message, optional, tag="2")] pub transaction_payload: ::core::option::Option, } +#[allow(clippy::derive_partial_eq_without_eq)] #[derive(Clone, PartialEq, ::prost::Message)] pub struct MultisigTransactionPayload { #[prost(enumeration="multisig_transaction_payload::Type", tag="1")] @@ -646,8 +692,8 @@ pub mod multisig_transaction_payload { /// (if the ProtoBuf definition does not change) and safe for programmatic use. pub fn as_str_name(&self) -> &'static str { match self { - Self::Unspecified => "TYPE_UNSPECIFIED", - Self::EntryFunctionPayload => "TYPE_ENTRY_FUNCTION_PAYLOAD", + Type::Unspecified => "TYPE_UNSPECIFIED", + Type::EntryFunctionPayload => "TYPE_ENTRY_FUNCTION_PAYLOAD", } } /// Creates an enum from field names used in the ProtoBuf definition. @@ -659,12 +705,14 @@ pub mod multisig_transaction_payload { } } } - #[derive(Clone, PartialEq, ::prost::Oneof)] + #[allow(clippy::derive_partial_eq_without_eq)] +#[derive(Clone, PartialEq, ::prost::Oneof)] pub enum Payload { #[prost(message, tag="2")] EntryFunctionPayload(super::EntryFunctionPayload), } } +#[allow(clippy::derive_partial_eq_without_eq)] #[derive(Clone, PartialEq, ::prost::Message)] pub struct MoveModuleBytecode { #[prost(bytes="vec", tag="1")] @@ -672,6 +720,7 @@ pub struct MoveModuleBytecode { #[prost(message, optional, tag="2")] pub abi: ::core::option::Option, } +#[allow(clippy::derive_partial_eq_without_eq)] #[derive(Clone, PartialEq, ::prost::Message)] pub struct MoveModule { #[prost(string, tag="1")] @@ -685,6 +734,7 @@ pub struct MoveModule { #[prost(message, repeated, tag="5")] pub structs: ::prost::alloc::vec::Vec, } +#[allow(clippy::derive_partial_eq_without_eq)] #[derive(Clone, PartialEq, ::prost::Message)] pub struct MoveFunction { #[prost(string, tag="1")] @@ -717,10 +767,10 @@ pub mod move_function { /// (if the ProtoBuf definition does not change) and safe for programmatic use. pub fn as_str_name(&self) -> &'static str { match self { - Self::Unspecified => "VISIBILITY_UNSPECIFIED", - Self::Private => "VISIBILITY_PRIVATE", - Self::Public => "VISIBILITY_PUBLIC", - Self::Friend => "VISIBILITY_FRIEND", + Visibility::Unspecified => "VISIBILITY_UNSPECIFIED", + Visibility::Private => "VISIBILITY_PRIVATE", + Visibility::Public => "VISIBILITY_PUBLIC", + Visibility::Friend => "VISIBILITY_FRIEND", } } /// Creates an enum from field names used in the ProtoBuf definition. @@ -735,6 +785,7 @@ pub mod move_function { } } } +#[allow(clippy::derive_partial_eq_without_eq)] #[derive(Clone, PartialEq, ::prost::Message)] pub struct MoveStruct { #[prost(string, tag="1")] @@ -750,6 +801,7 @@ pub struct MoveStruct { #[prost(message, repeated, tag="5")] pub fields: ::prost::alloc::vec::Vec, } +#[allow(clippy::derive_partial_eq_without_eq)] #[derive(Clone, PartialEq, ::prost::Message)] pub struct MoveStructGenericTypeParam { #[prost(enumeration="MoveAbility", repeated, tag="1")] @@ -757,6 +809,7 @@ pub struct MoveStructGenericTypeParam { #[prost(bool, tag="2")] pub is_phantom: bool, } +#[allow(clippy::derive_partial_eq_without_eq)] #[derive(Clone, PartialEq, ::prost::Message)] pub struct MoveStructField { #[prost(string, tag="1")] @@ -764,11 +817,13 @@ pub struct MoveStructField { #[prost(message, optional, tag="2")] pub r#type: ::core::option::Option, } +#[allow(clippy::derive_partial_eq_without_eq)] #[derive(Clone, PartialEq, ::prost::Message)] pub struct MoveFunctionGenericTypeParam { #[prost(enumeration="MoveAbility", repeated, tag="1")] pub constraints: ::prost::alloc::vec::Vec, } +#[allow(clippy::derive_partial_eq_without_eq)] #[derive(Clone, PartialEq, ::prost::Message)] pub struct MoveType { #[prost(enumeration="MoveTypes", tag="1")] @@ -778,14 +833,16 @@ pub struct MoveType { } /// Nested message and enum types in `MoveType`. pub mod move_type { - #[derive(Clone, PartialEq, ::prost::Message)] + #[allow(clippy::derive_partial_eq_without_eq)] +#[derive(Clone, PartialEq, ::prost::Message)] pub struct ReferenceType { #[prost(bool, tag="1")] pub mutable: bool, #[prost(message, optional, boxed, tag="2")] pub to: ::core::option::Option<::prost::alloc::boxed::Box>, } - #[derive(Clone, PartialEq, ::prost::Oneof)] + #[allow(clippy::derive_partial_eq_without_eq)] +#[derive(Clone, PartialEq, ::prost::Oneof)] pub enum Content { #[prost(message, tag="3")] Vector(::prost::alloc::boxed::Box), @@ -799,11 +856,13 @@ pub mod move_type { Unparsable(::prost::alloc::string::String), } } +#[allow(clippy::derive_partial_eq_without_eq)] #[derive(Clone, PartialEq, ::prost::Message)] pub struct WriteSetPayload { #[prost(message, optional, tag="1")] pub write_set: ::core::option::Option, } +#[allow(clippy::derive_partial_eq_without_eq)] #[derive(Clone, PartialEq, ::prost::Message)] pub struct EntryFunctionId { #[prost(message, optional, tag="1")] @@ -811,6 +870,7 @@ pub struct EntryFunctionId { #[prost(string, tag="2")] pub name: ::prost::alloc::string::String, } +#[allow(clippy::derive_partial_eq_without_eq)] #[derive(Clone, PartialEq, ::prost::Message)] pub struct MoveModuleId { #[prost(string, tag="1")] @@ -818,6 +878,7 @@ pub struct MoveModuleId { #[prost(string, tag="2")] pub name: ::prost::alloc::string::String, } +#[allow(clippy::derive_partial_eq_without_eq)] #[derive(Clone, PartialEq, ::prost::Message)] pub struct MoveStructTag { #[prost(string, tag="1")] @@ -829,6 +890,7 @@ pub struct MoveStructTag { #[prost(message, repeated, tag="4")] pub generic_type_params: ::prost::alloc::vec::Vec, } +#[allow(clippy::derive_partial_eq_without_eq)] #[derive(Clone, PartialEq, ::prost::Message)] pub struct Signature { #[prost(enumeration="signature::Type", tag="1")] @@ -855,12 +917,12 @@ pub mod signature { /// (if the ProtoBuf definition does not change) and safe for programmatic use. pub fn as_str_name(&self) -> &'static str { match self { - Self::Unspecified => "TYPE_UNSPECIFIED", - Self::Ed25519 => "TYPE_ED25519", - Self::MultiEd25519 => "TYPE_MULTI_ED25519", - Self::MultiAgent => "TYPE_MULTI_AGENT", - Self::FeePayer => "TYPE_FEE_PAYER", - Self::SingleSender => "TYPE_SINGLE_SENDER", + Type::Unspecified => "TYPE_UNSPECIFIED", + Type::Ed25519 => "TYPE_ED25519", + Type::MultiEd25519 => "TYPE_MULTI_ED25519", + Type::MultiAgent => "TYPE_MULTI_AGENT", + Type::FeePayer => "TYPE_FEE_PAYER", + Type::SingleSender => "TYPE_SINGLE_SENDER", } } /// Creates an enum from field names used in the ProtoBuf definition. @@ -876,7 +938,8 @@ pub mod signature { } } } - #[derive(Clone, PartialEq, ::prost::Oneof)] + #[allow(clippy::derive_partial_eq_without_eq)] +#[derive(Clone, PartialEq, ::prost::Oneof)] pub enum Signature { #[prost(message, tag="2")] Ed25519(super::Ed25519Signature), @@ -891,6 +954,7 @@ pub mod signature { SingleSender(super::SingleSender), } } +#[allow(clippy::derive_partial_eq_without_eq)] #[derive(Clone, PartialEq, ::prost::Message)] pub struct Ed25519Signature { #[prost(bytes="vec", tag="1")] @@ -898,6 +962,7 @@ pub struct Ed25519Signature { #[prost(bytes="vec", tag="2")] pub signature: ::prost::alloc::vec::Vec, } +#[allow(clippy::derive_partial_eq_without_eq)] #[derive(Clone, PartialEq, ::prost::Message)] pub struct MultiEd25519Signature { #[prost(bytes="vec", repeated, tag="1")] @@ -909,6 +974,7 @@ pub struct MultiEd25519Signature { #[prost(uint32, repeated, tag="4")] pub public_key_indices: ::prost::alloc::vec::Vec, } +#[allow(clippy::derive_partial_eq_without_eq)] #[derive(Clone, PartialEq, ::prost::Message)] pub struct MultiAgentSignature { #[prost(message, optional, tag="1")] @@ -918,6 +984,7 @@ pub struct MultiAgentSignature { #[prost(message, repeated, tag="3")] pub secondary_signers: ::prost::alloc::vec::Vec, } +#[allow(clippy::derive_partial_eq_without_eq)] #[derive(Clone, PartialEq, ::prost::Message)] pub struct FeePayerSignature { #[prost(message, optional, tag="1")] @@ -931,6 +998,7 @@ pub struct FeePayerSignature { #[prost(message, optional, tag="5")] pub fee_payer_signer: ::core::option::Option, } +#[allow(clippy::derive_partial_eq_without_eq)] #[derive(Clone, PartialEq, ::prost::Message)] pub struct AnyPublicKey { #[prost(enumeration="any_public_key::Type", tag="1")] @@ -957,12 +1025,12 @@ pub mod any_public_key { /// (if the ProtoBuf definition does not change) and safe for programmatic use. pub fn as_str_name(&self) -> &'static str { match self { - Self::Unspecified => "TYPE_UNSPECIFIED", - Self::Ed25519 => "TYPE_ED25519", - Self::Secp256k1Ecdsa => "TYPE_SECP256K1_ECDSA", - Self::Secp256r1Ecdsa => "TYPE_SECP256R1_ECDSA", - Self::Keyless => "TYPE_KEYLESS", - Self::FederatedKeyless => "TYPE_FEDERATED_KEYLESS", + Type::Unspecified => "TYPE_UNSPECIFIED", + Type::Ed25519 => "TYPE_ED25519", + Type::Secp256k1Ecdsa => "TYPE_SECP256K1_ECDSA", + Type::Secp256r1Ecdsa => "TYPE_SECP256R1_ECDSA", + Type::Keyless => "TYPE_KEYLESS", + Type::FederatedKeyless => "TYPE_FEDERATED_KEYLESS", } } /// Creates an enum from field names used in the ProtoBuf definition. @@ -979,6 +1047,7 @@ pub mod any_public_key { } } } +#[allow(clippy::derive_partial_eq_without_eq)] #[derive(Clone, PartialEq, ::prost::Message)] pub struct AnySignature { #[prost(enumeration="any_signature::Type", tag="1")] @@ -1010,11 +1079,11 @@ pub mod any_signature { /// (if the ProtoBuf definition does not change) and safe for programmatic use. pub fn as_str_name(&self) -> &'static str { match self { - Self::Unspecified => "TYPE_UNSPECIFIED", - Self::Ed25519 => "TYPE_ED25519", - Self::Secp256k1Ecdsa => "TYPE_SECP256K1_ECDSA", - Self::Webauthn => "TYPE_WEBAUTHN", - Self::Keyless => "TYPE_KEYLESS", + Type::Unspecified => "TYPE_UNSPECIFIED", + Type::Ed25519 => "TYPE_ED25519", + Type::Secp256k1Ecdsa => "TYPE_SECP256K1_ECDSA", + Type::Webauthn => "TYPE_WEBAUTHN", + Type::Keyless => "TYPE_KEYLESS", } } /// Creates an enum from field names used in the ProtoBuf definition. @@ -1030,7 +1099,8 @@ pub mod any_signature { } } /// Support: >= 1.10. - #[derive(Clone, PartialEq, ::prost::Oneof)] + #[allow(clippy::derive_partial_eq_without_eq)] +#[derive(Clone, PartialEq, ::prost::Oneof)] pub enum SignatureVariant { #[prost(message, tag="3")] Ed25519(super::Ed25519), @@ -1042,26 +1112,31 @@ pub mod any_signature { Keyless(super::Keyless), } } +#[allow(clippy::derive_partial_eq_without_eq)] #[derive(Clone, PartialEq, ::prost::Message)] pub struct Ed25519 { #[prost(bytes="vec", tag="1")] pub signature: ::prost::alloc::vec::Vec, } +#[allow(clippy::derive_partial_eq_without_eq)] #[derive(Clone, PartialEq, ::prost::Message)] pub struct Secp256k1Ecdsa { #[prost(bytes="vec", tag="1")] pub signature: ::prost::alloc::vec::Vec, } +#[allow(clippy::derive_partial_eq_without_eq)] #[derive(Clone, PartialEq, ::prost::Message)] pub struct WebAuthn { #[prost(bytes="vec", tag="1")] pub signature: ::prost::alloc::vec::Vec, } +#[allow(clippy::derive_partial_eq_without_eq)] #[derive(Clone, PartialEq, ::prost::Message)] pub struct Keyless { #[prost(bytes="vec", tag="1")] pub signature: ::prost::alloc::vec::Vec, } +#[allow(clippy::derive_partial_eq_without_eq)] #[derive(Clone, PartialEq, ::prost::Message)] pub struct SingleKeySignature { #[prost(message, optional, tag="1")] @@ -1069,6 +1144,7 @@ pub struct SingleKeySignature { #[prost(message, optional, tag="2")] pub signature: ::core::option::Option, } +#[allow(clippy::derive_partial_eq_without_eq)] #[derive(Clone, PartialEq, ::prost::Message)] pub struct IndexedSignature { #[prost(uint32, tag="1")] @@ -1076,6 +1152,7 @@ pub struct IndexedSignature { #[prost(message, optional, tag="2")] pub signature: ::core::option::Option, } +#[allow(clippy::derive_partial_eq_without_eq)] #[derive(Clone, PartialEq, ::prost::Message)] pub struct MultiKeySignature { #[prost(message, repeated, tag="1")] @@ -1085,11 +1162,13 @@ pub struct MultiKeySignature { #[prost(uint32, tag="3")] pub signatures_required: u32, } +#[allow(clippy::derive_partial_eq_without_eq)] #[derive(Clone, PartialEq, ::prost::Message)] pub struct SingleSender { #[prost(message, optional, tag="1")] pub sender: ::core::option::Option, } +#[allow(clippy::derive_partial_eq_without_eq)] #[derive(Clone, PartialEq, ::prost::Message)] pub struct AccountSignature { #[prost(enumeration="account_signature::Type", tag="1")] @@ -1115,11 +1194,11 @@ pub mod account_signature { /// (if the ProtoBuf definition does not change) and safe for programmatic use. pub fn as_str_name(&self) -> &'static str { match self { - Self::Unspecified => "TYPE_UNSPECIFIED", - Self::Ed25519 => "TYPE_ED25519", - Self::MultiEd25519 => "TYPE_MULTI_ED25519", - Self::SingleKey => "TYPE_SINGLE_KEY", - Self::MultiKey => "TYPE_MULTI_KEY", + Type::Unspecified => "TYPE_UNSPECIFIED", + Type::Ed25519 => "TYPE_ED25519", + Type::MultiEd25519 => "TYPE_MULTI_ED25519", + Type::SingleKey => "TYPE_SINGLE_KEY", + Type::MultiKey => "TYPE_MULTI_KEY", } } /// Creates an enum from field names used in the ProtoBuf definition. @@ -1134,7 +1213,8 @@ pub mod account_signature { } } } - #[derive(Clone, PartialEq, ::prost::Oneof)] + #[allow(clippy::derive_partial_eq_without_eq)] +#[derive(Clone, PartialEq, ::prost::Oneof)] pub enum Signature { #[prost(message, tag="2")] Ed25519(super::Ed25519Signature), @@ -1147,6 +1227,7 @@ pub mod account_signature { MultiKeySignature(super::MultiKeySignature), } } +#[allow(clippy::derive_partial_eq_without_eq)] #[derive(Clone, PartialEq, ::prost::Message)] pub struct TransactionSizeInfo { #[prost(uint32, tag="1")] @@ -1156,6 +1237,7 @@ pub struct TransactionSizeInfo { #[prost(message, repeated, tag="3")] pub write_op_size_info: ::prost::alloc::vec::Vec, } +#[allow(clippy::derive_partial_eq_without_eq)] #[derive(Clone, Copy, PartialEq, ::prost::Message)] pub struct EventSizeInfo { #[prost(uint32, tag="1")] @@ -1163,6 +1245,7 @@ pub struct EventSizeInfo { #[prost(uint32, tag="2")] pub total_bytes: u32, } +#[allow(clippy::derive_partial_eq_without_eq)] #[derive(Clone, Copy, PartialEq, ::prost::Message)] pub struct WriteOpSizeInfo { #[prost(uint32, tag="1")] @@ -1201,21 +1284,21 @@ impl MoveTypes { /// (if the ProtoBuf definition does not change) and safe for programmatic use. pub fn as_str_name(&self) -> &'static str { match self { - Self::Unspecified => "MOVE_TYPES_UNSPECIFIED", - Self::Bool => "MOVE_TYPES_BOOL", - Self::U8 => "MOVE_TYPES_U8", - Self::U16 => "MOVE_TYPES_U16", - Self::U32 => "MOVE_TYPES_U32", - Self::U64 => "MOVE_TYPES_U64", - Self::U128 => "MOVE_TYPES_U128", - Self::U256 => "MOVE_TYPES_U256", - Self::Address => "MOVE_TYPES_ADDRESS", - Self::Signer => "MOVE_TYPES_SIGNER", - Self::Vector => "MOVE_TYPES_VECTOR", - Self::Struct => "MOVE_TYPES_STRUCT", - Self::GenericTypeParam => "MOVE_TYPES_GENERIC_TYPE_PARAM", - Self::Reference => "MOVE_TYPES_REFERENCE", - Self::Unparsable => "MOVE_TYPES_UNPARSABLE", + MoveTypes::Unspecified => "MOVE_TYPES_UNSPECIFIED", + MoveTypes::Bool => "MOVE_TYPES_BOOL", + MoveTypes::U8 => "MOVE_TYPES_U8", + MoveTypes::U16 => "MOVE_TYPES_U16", + MoveTypes::U32 => "MOVE_TYPES_U32", + MoveTypes::U64 => "MOVE_TYPES_U64", + MoveTypes::U128 => "MOVE_TYPES_U128", + MoveTypes::U256 => "MOVE_TYPES_U256", + MoveTypes::Address => "MOVE_TYPES_ADDRESS", + MoveTypes::Signer => "MOVE_TYPES_SIGNER", + MoveTypes::Vector => "MOVE_TYPES_VECTOR", + MoveTypes::Struct => "MOVE_TYPES_STRUCT", + MoveTypes::GenericTypeParam => "MOVE_TYPES_GENERIC_TYPE_PARAM", + MoveTypes::Reference => "MOVE_TYPES_REFERENCE", + MoveTypes::Unparsable => "MOVE_TYPES_UNPARSABLE", } } /// Creates an enum from field names used in the ProtoBuf definition. @@ -1256,11 +1339,11 @@ impl MoveAbility { /// (if the ProtoBuf definition does not change) and safe for programmatic use. pub fn as_str_name(&self) -> &'static str { match self { - Self::Unspecified => "MOVE_ABILITY_UNSPECIFIED", - Self::Copy => "MOVE_ABILITY_COPY", - Self::Drop => "MOVE_ABILITY_DROP", - Self::Store => "MOVE_ABILITY_STORE", - Self::Key => "MOVE_ABILITY_KEY", + MoveAbility::Unspecified => "MOVE_ABILITY_UNSPECIFIED", + MoveAbility::Copy => "MOVE_ABILITY_COPY", + MoveAbility::Drop => "MOVE_ABILITY_DROP", + MoveAbility::Store => "MOVE_ABILITY_STORE", + MoveAbility::Key => "MOVE_ABILITY_KEY", } } /// Creates an enum from field names used in the ProtoBuf definition. diff --git a/protos/rust/src/pb/aptos.util.timestamp.rs b/protos/rust/src/pb/aptos.util.timestamp.rs index f746dba3fd7b1..df8a9f30f8a73 100644 --- a/protos/rust/src/pb/aptos.util.timestamp.rs +++ b/protos/rust/src/pb/aptos.util.timestamp.rs @@ -3,6 +3,7 @@ // @generated // This file is @generated by prost-build. +#[allow(clippy::derive_partial_eq_without_eq)] #[derive(Clone, Copy, PartialEq, ::prost::Message)] pub struct Timestamp { /// Represents seconds of UTC time since Unix epoch diff --git a/protos/scripts/install_deps.sh b/protos/scripts/install_deps.sh index 07e0c0ab23526..5772ee7418a44 100755 --- a/protos/scripts/install_deps.sh +++ b/protos/scripts/install_deps.sh @@ -8,10 +8,10 @@ set -e set -x # For generating Rust code -cargo install --locked --version 0.2.3 protoc-gen-prost +cargo install --locked --version 0.4.0 protoc-gen-prost cargo install --locked --version 0.2.3 protoc-gen-prost-serde cargo install --locked --version 0.3.1 protoc-gen-prost-crate -cargo install --locked --version 0.3.0 protoc-gen-tonic +cargo install --locked --version 0.4.1 protoc-gen-tonic # For generating Python code cd python