diff --git a/cloud-proto/Cargo.toml b/cloud-proto/Cargo.toml index 8fd0afa..a57a632 100644 --- a/cloud-proto/Cargo.toml +++ b/cloud-proto/Cargo.toml @@ -16,6 +16,7 @@ http = "1.1" futures-retry = "0.6" backoff = "0.4" async-trait = "0.1" +serde = { version = "1.0", default-features = false, features = ["derive"] } tracing = "0.1" tracing-opentelemetry = "0.27" opentelemetry = "0.26" diff --git a/cloud-proto/build.rs b/cloud-proto/build.rs index 87117b1..24a786f 100644 --- a/cloud-proto/build.rs +++ b/cloud-proto/build.rs @@ -18,6 +18,7 @@ fn main() -> Result<(), Box> { println!("cargo:rerun-if-changed=protos"); tonic_build::configure() .out_dir("src/proto") + .type_attribute(".", "#[derive(serde::Serialize, serde::Deserialize)]") .compile_protos( &[ "blockchain.proto", @@ -33,10 +34,12 @@ fn main() -> Result<(), Box> { )?; tonic_build::configure() .out_dir("src/proto") + .type_attribute(".", "#[derive(serde::Serialize, serde::Deserialize)]") .file_descriptor_set_path("src/reflect/controller.bin") .compile_protos(&["controller.proto"], &["protos/protos"])?; tonic_build::configure() .out_dir("src/proto") + .type_attribute(".", "#[derive(serde::Serialize, serde::Deserialize)]") .file_descriptor_set_path("src/reflect/executor.bin") .compile_protos(&["executor.proto", "vm/evm.proto"], &["protos/protos"])?; } diff --git a/cloud-proto/src/proto/blockchain.rs b/cloud-proto/src/proto/blockchain.rs index 3d6b268..4d92854 100644 --- a/cloud-proto/src/proto/blockchain.rs +++ b/cloud-proto/src/proto/blockchain.rs @@ -1,5 +1,5 @@ // This file is @generated by prost-build. -#[derive(Clone, PartialEq, ::prost::Message)] +#[derive(serde::Serialize, serde::Deserialize, Clone, PartialEq, ::prost::Message)] pub struct BlockHeader { /// hash of previous BlockHeader #[prost(bytes = "vec", tag = "1")] @@ -13,7 +13,7 @@ pub struct BlockHeader { #[prost(bytes = "vec", tag = "5")] pub proposer: ::prost::alloc::vec::Vec, } -#[derive(Clone, PartialEq, ::prost::Message)] +#[derive(serde::Serialize, serde::Deserialize, Clone, PartialEq, ::prost::Message)] pub struct Transaction { #[prost(uint32, tag = "1")] pub version: u32, @@ -37,7 +37,7 @@ pub struct Transaction { #[prost(bytes = "vec", tag = "8")] pub chain_id: ::prost::alloc::vec::Vec, } -#[derive(Clone, PartialEq, ::prost::Message)] +#[derive(serde::Serialize, serde::Deserialize, Clone, PartialEq, ::prost::Message)] pub struct Witness { #[prost(bytes = "vec", tag = "1")] pub signature: ::prost::alloc::vec::Vec, @@ -45,7 +45,7 @@ pub struct Witness { #[prost(bytes = "vec", tag = "2")] pub sender: ::prost::alloc::vec::Vec, } -#[derive(Clone, PartialEq, ::prost::Message)] +#[derive(serde::Serialize, serde::Deserialize, Clone, PartialEq, ::prost::Message)] pub struct UnverifiedTransaction { #[prost(message, optional, tag = "1")] pub transaction: ::core::option::Option, @@ -55,7 +55,7 @@ pub struct UnverifiedTransaction { #[prost(message, optional, tag = "3")] pub witness: ::core::option::Option, } -#[derive(Clone, PartialEq, ::prost::Message)] +#[derive(serde::Serialize, serde::Deserialize, Clone, PartialEq, ::prost::Message)] pub struct UtxoTransaction { #[prost(uint32, tag = "1")] pub version: u32, @@ -66,7 +66,7 @@ pub struct UtxoTransaction { #[prost(uint64, tag = "4")] pub lock_id: u64, } -#[derive(Clone, PartialEq, ::prost::Message)] +#[derive(serde::Serialize, serde::Deserialize, Clone, PartialEq, ::prost::Message)] pub struct UnverifiedUtxoTransaction { #[prost(message, optional, tag = "1")] pub transaction: ::core::option::Option, @@ -76,19 +76,19 @@ pub struct UnverifiedUtxoTransaction { #[prost(message, repeated, tag = "3")] pub witnesses: ::prost::alloc::vec::Vec, } -#[derive(Clone, PartialEq, ::prost::Message)] +#[derive(serde::Serialize, serde::Deserialize, Clone, PartialEq, ::prost::Message)] pub struct RawTransactions { #[prost(message, repeated, tag = "1")] pub body: ::prost::alloc::vec::Vec, } -#[derive(Clone, PartialEq, ::prost::Message)] +#[derive(serde::Serialize, serde::Deserialize, Clone, PartialEq, ::prost::Message)] pub struct RawTransaction { #[prost(oneof = "raw_transaction::Tx", tags = "1, 2")] pub tx: ::core::option::Option, } /// Nested message and enum types in `RawTransaction`. pub mod raw_transaction { - #[derive(Clone, PartialEq, ::prost::Oneof)] + #[derive(serde::Serialize, serde::Deserialize, Clone, PartialEq, ::prost::Oneof)] pub enum Tx { #[prost(message, tag = "1")] NormalTx(super::UnverifiedTransaction), @@ -96,13 +96,13 @@ pub mod raw_transaction { UtxoTx(super::UnverifiedUtxoTransaction), } } -#[derive(Clone, PartialEq, ::prost::Message)] +#[derive(serde::Serialize, serde::Deserialize, Clone, PartialEq, ::prost::Message)] pub struct CompactBlockBody { /// transaction hash of UnverifiedTransaction or UnverifyedUtxoTransaction. #[prost(bytes = "vec", repeated, tag = "1")] pub tx_hashes: ::prost::alloc::vec::Vec<::prost::alloc::vec::Vec>, } -#[derive(Clone, PartialEq, ::prost::Message)] +#[derive(serde::Serialize, serde::Deserialize, Clone, PartialEq, ::prost::Message)] pub struct CompactBlock { #[prost(uint32, tag = "1")] pub version: u32, @@ -111,7 +111,7 @@ pub struct CompactBlock { #[prost(message, optional, tag = "3")] pub body: ::core::option::Option, } -#[derive(Clone, PartialEq, ::prost::Message)] +#[derive(serde::Serialize, serde::Deserialize, Clone, PartialEq, ::prost::Message)] pub struct Block { #[prost(uint32, tag = "1")] pub version: u32, diff --git a/cloud-proto/src/proto/common.rs b/cloud-proto/src/proto/common.rs index 001bba0..f7570a5 100644 --- a/cloud-proto/src/proto/common.rs +++ b/cloud-proto/src/proto/common.rs @@ -1,53 +1,53 @@ // This file is @generated by prost-build. -#[derive(Clone, Copy, PartialEq, ::prost::Message)] +#[derive(serde::Serialize, serde::Deserialize, Clone, Copy, PartialEq, ::prost::Message)] pub struct Empty {} -#[derive(Clone, PartialEq, ::prost::Message)] +#[derive(serde::Serialize, serde::Deserialize, Clone, PartialEq, ::prost::Message)] pub struct Hash { #[prost(bytes = "vec", tag = "1")] pub hash: ::prost::alloc::vec::Vec, } -#[derive(Clone, PartialEq, ::prost::Message)] +#[derive(serde::Serialize, serde::Deserialize, Clone, PartialEq, ::prost::Message)] pub struct StateRoot { #[prost(bytes = "vec", tag = "1")] pub state_root: ::prost::alloc::vec::Vec, } -#[derive(Clone, PartialEq, ::prost::Message)] +#[derive(serde::Serialize, serde::Deserialize, Clone, PartialEq, ::prost::Message)] pub struct Proof { #[prost(bytes = "vec", tag = "1")] pub proof: ::prost::alloc::vec::Vec, } -#[derive(Clone, PartialEq, ::prost::Message)] +#[derive(serde::Serialize, serde::Deserialize, Clone, PartialEq, ::prost::Message)] pub struct Hashes { #[prost(message, repeated, tag = "1")] pub hashes: ::prost::alloc::vec::Vec, } -#[derive(Clone, PartialEq, ::prost::Message)] +#[derive(serde::Serialize, serde::Deserialize, Clone, PartialEq, ::prost::Message)] pub struct Address { #[prost(bytes = "vec", tag = "1")] pub address: ::prost::alloc::vec::Vec, } -#[derive(Clone, PartialEq, ::prost::Message)] +#[derive(serde::Serialize, serde::Deserialize, Clone, PartialEq, ::prost::Message)] pub struct Proposal { #[prost(uint64, tag = "1")] pub height: u64, #[prost(bytes = "vec", tag = "2")] pub data: ::prost::alloc::vec::Vec, } -#[derive(Clone, PartialEq, ::prost::Message)] +#[derive(serde::Serialize, serde::Deserialize, Clone, PartialEq, ::prost::Message)] pub struct ProposalInner { #[prost(bytes = "vec", tag = "1")] pub pre_state_root: ::prost::alloc::vec::Vec, #[prost(message, optional, tag = "2")] pub proposal: ::core::option::Option, } -#[derive(Clone, PartialEq, ::prost::Message)] +#[derive(serde::Serialize, serde::Deserialize, Clone, PartialEq, ::prost::Message)] pub struct ProposalWithProof { #[prost(message, optional, tag = "1")] pub proposal: ::core::option::Option, #[prost(bytes = "vec", tag = "2")] pub proof: ::prost::alloc::vec::Vec, } -#[derive(Clone, PartialEq, ::prost::Message)] +#[derive(serde::Serialize, serde::Deserialize, Clone, PartialEq, ::prost::Message)] pub struct ConsensusConfiguration { #[prost(uint64, tag = "1")] pub height: u64, @@ -56,45 +56,45 @@ pub struct ConsensusConfiguration { #[prost(bytes = "vec", repeated, tag = "3")] pub validators: ::prost::alloc::vec::Vec<::prost::alloc::vec::Vec>, } -#[derive(Clone, Copy, PartialEq, ::prost::Message)] +#[derive(serde::Serialize, serde::Deserialize, Clone, Copy, PartialEq, ::prost::Message)] pub struct StatusCode { #[prost(uint32, tag = "1")] pub code: u32, } -#[derive(Clone, PartialEq, ::prost::Message)] +#[derive(serde::Serialize, serde::Deserialize, Clone, PartialEq, ::prost::Message)] pub struct HashResponse { #[prost(message, optional, tag = "1")] pub status: ::core::option::Option, #[prost(message, optional, tag = "2")] pub hash: ::core::option::Option, } -#[derive(Clone, PartialEq, ::prost::Message)] +#[derive(serde::Serialize, serde::Deserialize, Clone, PartialEq, ::prost::Message)] pub struct ProposalResponse { #[prost(message, optional, tag = "1")] pub status: ::core::option::Option, #[prost(message, optional, tag = "2")] pub proposal: ::core::option::Option, } -#[derive(Clone, PartialEq, ::prost::Message)] +#[derive(serde::Serialize, serde::Deserialize, Clone, PartialEq, ::prost::Message)] pub struct ConsensusConfigurationResponse { #[prost(message, optional, tag = "1")] pub status: ::core::option::Option, #[prost(message, optional, tag = "2")] pub config: ::core::option::Option, } -#[derive(Clone, PartialEq, ::prost::Message)] +#[derive(serde::Serialize, serde::Deserialize, Clone, PartialEq, ::prost::Message)] pub struct NodeNetInfo { #[prost(string, tag = "1")] pub multi_address: ::prost::alloc::string::String, #[prost(uint64, tag = "2")] pub origin: u64, } -#[derive(Clone, PartialEq, ::prost::Message)] +#[derive(serde::Serialize, serde::Deserialize, Clone, PartialEq, ::prost::Message)] pub struct TotalNodeNetInfo { #[prost(message, repeated, tag = "1")] pub nodes: ::prost::alloc::vec::Vec, } -#[derive(Clone, PartialEq, ::prost::Message)] +#[derive(serde::Serialize, serde::Deserialize, Clone, PartialEq, ::prost::Message)] pub struct PeerStatus { #[prost(uint64, tag = "1")] pub height: u64, @@ -103,7 +103,7 @@ pub struct PeerStatus { #[prost(message, optional, tag = "3")] pub node_net_info: ::core::option::Option, } -#[derive(Clone, PartialEq, ::prost::Message)] +#[derive(serde::Serialize, serde::Deserialize, Clone, PartialEq, ::prost::Message)] pub struct NodeStatus { #[prost(bool, tag = "1")] pub is_sync: bool, diff --git a/cloud-proto/src/proto/controller.rs b/cloud-proto/src/proto/controller.rs index 7f671b3..b91a06d 100644 --- a/cloud-proto/src/proto/controller.rs +++ b/cloud-proto/src/proto/controller.rs @@ -1,15 +1,15 @@ // This file is @generated by prost-build. -#[derive(Clone, Copy, PartialEq, ::prost::Message)] +#[derive(serde::Serialize, serde::Deserialize, Clone, Copy, PartialEq, ::prost::Message)] pub struct Flag { #[prost(bool, tag = "1")] pub flag: bool, } -#[derive(Clone, Copy, PartialEq, ::prost::Message)] +#[derive(serde::Serialize, serde::Deserialize, Clone, Copy, PartialEq, ::prost::Message)] pub struct BlockNumber { #[prost(uint64, tag = "1")] pub block_number: u64, } -#[derive(Clone, PartialEq, ::prost::Message)] +#[derive(serde::Serialize, serde::Deserialize, Clone, PartialEq, ::prost::Message)] pub struct SystemConfig { #[prost(uint32, tag = "1")] pub version: u32, @@ -44,12 +44,12 @@ pub struct SystemConfig { #[prost(bytes = "vec", tag = "16")] pub block_limit_pre_hash: ::prost::alloc::vec::Vec, } -#[derive(Clone, Copy, PartialEq, ::prost::Message)] +#[derive(serde::Serialize, serde::Deserialize, Clone, Copy, PartialEq, ::prost::Message)] pub struct TransactionIndex { #[prost(uint64, tag = "1")] pub tx_index: u64, } -#[derive(Clone, PartialEq, ::prost::Message)] +#[derive(serde::Serialize, serde::Deserialize, Clone, PartialEq, ::prost::Message)] pub struct CrossChainProof { #[prost(uint32, tag = "1")] pub version: u32, diff --git a/cloud-proto/src/proto/crypto.rs b/cloud-proto/src/proto/crypto.rs index bea4564..5f93fb7 100644 --- a/cloud-proto/src/proto/crypto.rs +++ b/cloud-proto/src/proto/crypto.rs @@ -1,5 +1,5 @@ // This file is @generated by prost-build. -#[derive(Clone, PartialEq, ::prost::Message)] +#[derive(serde::Serialize, serde::Deserialize, Clone, PartialEq, ::prost::Message)] pub struct GetCryptoInfoResponse { #[prost(message, optional, tag = "1")] pub status: ::core::option::Option, @@ -12,38 +12,38 @@ pub struct GetCryptoInfoResponse { #[prost(uint32, tag = "5")] pub address_len: u32, } -#[derive(Clone, PartialEq, ::prost::Message)] +#[derive(serde::Serialize, serde::Deserialize, Clone, PartialEq, ::prost::Message)] pub struct HashDataRequest { #[prost(bytes = "vec", tag = "1")] pub data: ::prost::alloc::vec::Vec, } -#[derive(Clone, PartialEq, ::prost::Message)] +#[derive(serde::Serialize, serde::Deserialize, Clone, PartialEq, ::prost::Message)] pub struct VerifyDataHashRequest { #[prost(bytes = "vec", tag = "1")] pub data: ::prost::alloc::vec::Vec, #[prost(bytes = "vec", tag = "2")] pub hash: ::prost::alloc::vec::Vec, } -#[derive(Clone, PartialEq, ::prost::Message)] +#[derive(serde::Serialize, serde::Deserialize, Clone, PartialEq, ::prost::Message)] pub struct SignMessageRequest { #[prost(bytes = "vec", tag = "2")] pub msg: ::prost::alloc::vec::Vec, } -#[derive(Clone, PartialEq, ::prost::Message)] +#[derive(serde::Serialize, serde::Deserialize, Clone, PartialEq, ::prost::Message)] pub struct SignMessageResponse { #[prost(message, optional, tag = "1")] pub status: ::core::option::Option, #[prost(bytes = "vec", tag = "2")] pub signature: ::prost::alloc::vec::Vec, } -#[derive(Clone, PartialEq, ::prost::Message)] +#[derive(serde::Serialize, serde::Deserialize, Clone, PartialEq, ::prost::Message)] pub struct RecoverSignatureRequest { #[prost(bytes = "vec", tag = "1")] pub msg: ::prost::alloc::vec::Vec, #[prost(bytes = "vec", tag = "2")] pub signature: ::prost::alloc::vec::Vec, } -#[derive(Clone, PartialEq, ::prost::Message)] +#[derive(serde::Serialize, serde::Deserialize, Clone, PartialEq, ::prost::Message)] pub struct RecoverSignatureResponse { #[prost(message, optional, tag = "1")] pub status: ::core::option::Option, diff --git a/cloud-proto/src/proto/evm.rs b/cloud-proto/src/proto/evm.rs index 0642bce..7f4094b 100644 --- a/cloud-proto/src/proto/evm.rs +++ b/cloud-proto/src/proto/evm.rs @@ -1,5 +1,5 @@ // This file is @generated by prost-build. -#[derive(Clone, PartialEq, ::prost::Message)] +#[derive(serde::Serialize, serde::Deserialize, Clone, PartialEq, ::prost::Message)] pub struct Receipt { #[prost(bytes = "vec", tag = "1")] pub transaction_hash: ::prost::alloc::vec::Vec, @@ -24,7 +24,7 @@ pub struct Receipt { #[prost(string, tag = "11")] pub error_message: ::prost::alloc::string::String, } -#[derive(Clone, PartialEq, ::prost::Message)] +#[derive(serde::Serialize, serde::Deserialize, Clone, PartialEq, ::prost::Message)] pub struct Log { #[prost(bytes = "vec", tag = "1")] pub address: ::prost::alloc::vec::Vec, @@ -45,32 +45,32 @@ pub struct Log { #[prost(uint64, tag = "9")] pub transaction_log_index: u64, } -#[derive(Clone, PartialEq, ::prost::Message)] +#[derive(serde::Serialize, serde::Deserialize, Clone, PartialEq, ::prost::Message)] pub struct ByteCode { #[prost(bytes = "vec", tag = "1")] pub byte_code: ::prost::alloc::vec::Vec, } -#[derive(Clone, PartialEq, ::prost::Message)] +#[derive(serde::Serialize, serde::Deserialize, Clone, PartialEq, ::prost::Message)] pub struct Balance { #[prost(bytes = "vec", tag = "1")] pub value: ::prost::alloc::vec::Vec, } -#[derive(Clone, PartialEq, ::prost::Message)] +#[derive(serde::Serialize, serde::Deserialize, Clone, PartialEq, ::prost::Message)] pub struct Nonce { #[prost(bytes = "vec", tag = "1")] pub nonce: ::prost::alloc::vec::Vec, } -#[derive(Clone, PartialEq, ::prost::Message)] +#[derive(serde::Serialize, serde::Deserialize, Clone, PartialEq, ::prost::Message)] pub struct ByteAbi { #[prost(bytes = "vec", tag = "1")] pub bytes_abi: ::prost::alloc::vec::Vec, } -#[derive(Clone, PartialEq, ::prost::Message)] +#[derive(serde::Serialize, serde::Deserialize, Clone, PartialEq, ::prost::Message)] pub struct ByteQuota { #[prost(bytes = "vec", tag = "1")] pub bytes_quota: ::prost::alloc::vec::Vec, } -#[derive(Clone, PartialEq, ::prost::Message)] +#[derive(serde::Serialize, serde::Deserialize, Clone, PartialEq, ::prost::Message)] pub struct ReceiptProof { #[prost(bytes = "vec", tag = "1")] pub receipt: ::prost::alloc::vec::Vec, @@ -79,7 +79,7 @@ pub struct ReceiptProof { #[prost(message, optional, tag = "3")] pub roots_info: ::core::option::Option, } -#[derive(Clone, PartialEq, ::prost::Message)] +#[derive(serde::Serialize, serde::Deserialize, Clone, PartialEq, ::prost::Message)] pub struct RootsInfo { #[prost(uint64, tag = "1")] pub height: u64, @@ -88,14 +88,14 @@ pub struct RootsInfo { #[prost(bytes = "vec", tag = "3")] pub receipt_root: ::prost::alloc::vec::Vec, } -#[derive(Clone, PartialEq, ::prost::Message)] +#[derive(serde::Serialize, serde::Deserialize, Clone, PartialEq, ::prost::Message)] pub struct BlockNumber { #[prost(oneof = "block_number::Lable", tags = "1, 2, 3")] pub lable: ::core::option::Option, } /// Nested message and enum types in `BlockNumber`. pub mod block_number { - #[derive(Clone, PartialEq, ::prost::Oneof)] + #[derive(serde::Serialize, serde::Deserialize, Clone, PartialEq, ::prost::Oneof)] pub enum Lable { #[prost(uint64, tag = "1")] Height(u64), @@ -105,35 +105,35 @@ pub mod block_number { Hash(::prost::alloc::vec::Vec), } } -#[derive(Clone, PartialEq, ::prost::Message)] +#[derive(serde::Serialize, serde::Deserialize, Clone, PartialEq, ::prost::Message)] pub struct GetCodeRequest { #[prost(message, optional, tag = "1")] pub address: ::core::option::Option, #[prost(message, optional, tag = "2")] pub block_number: ::core::option::Option, } -#[derive(Clone, PartialEq, ::prost::Message)] +#[derive(serde::Serialize, serde::Deserialize, Clone, PartialEq, ::prost::Message)] pub struct GetBalanceRequest { #[prost(message, optional, tag = "1")] pub address: ::core::option::Option, #[prost(message, optional, tag = "2")] pub block_number: ::core::option::Option, } -#[derive(Clone, PartialEq, ::prost::Message)] +#[derive(serde::Serialize, serde::Deserialize, Clone, PartialEq, ::prost::Message)] pub struct GetTransactionCountRequest { #[prost(message, optional, tag = "1")] pub address: ::core::option::Option, #[prost(message, optional, tag = "2")] pub block_number: ::core::option::Option, } -#[derive(Clone, PartialEq, ::prost::Message)] +#[derive(serde::Serialize, serde::Deserialize, Clone, PartialEq, ::prost::Message)] pub struct GetAbiRequest { #[prost(message, optional, tag = "1")] pub address: ::core::option::Option, #[prost(message, optional, tag = "2")] pub block_number: ::core::option::Option, } -#[derive(Clone, PartialEq, ::prost::Message)] +#[derive(serde::Serialize, serde::Deserialize, Clone, PartialEq, ::prost::Message)] pub struct GetStorageAtRequest { #[prost(message, optional, tag = "1")] pub address: ::core::option::Option, diff --git a/cloud-proto/src/proto/executor.rs b/cloud-proto/src/proto/executor.rs index 278c7d6..43a0f6f 100644 --- a/cloud-proto/src/proto/executor.rs +++ b/cloud-proto/src/proto/executor.rs @@ -1,5 +1,5 @@ // This file is @generated by prost-build. -#[derive(Clone, PartialEq, ::prost::Message)] +#[derive(serde::Serialize, serde::Deserialize, Clone, PartialEq, ::prost::Message)] pub struct CallRequest { /// 1. length is 20 bytes for evm. /// 2. if executor is multi-vm, it will be a path. @@ -16,7 +16,7 @@ pub struct CallRequest { #[prost(uint64, tag = "5")] pub height: u64, } -#[derive(Clone, PartialEq, ::prost::Message)] +#[derive(serde::Serialize, serde::Deserialize, Clone, PartialEq, ::prost::Message)] pub struct CallResponse { #[prost(bytes = "vec", tag = "1")] pub value: ::prost::alloc::vec::Vec, diff --git a/cloud-proto/src/proto/health_check.rs b/cloud-proto/src/proto/health_check.rs index 795ecff..c32a1c3 100644 --- a/cloud-proto/src/proto/health_check.rs +++ b/cloud-proto/src/proto/health_check.rs @@ -1,17 +1,29 @@ // This file is @generated by prost-build. -#[derive(Clone, PartialEq, ::prost::Message)] +#[derive(serde::Serialize, serde::Deserialize, Clone, PartialEq, ::prost::Message)] pub struct HealthCheckRequest { #[prost(string, tag = "1")] pub service: ::prost::alloc::string::String, } -#[derive(Clone, Copy, PartialEq, ::prost::Message)] +#[derive(serde::Serialize, serde::Deserialize, Clone, Copy, PartialEq, ::prost::Message)] pub struct HealthCheckResponse { #[prost(enumeration = "health_check_response::ServingStatus", tag = "1")] pub status: i32, } /// Nested message and enum types in `HealthCheckResponse`. pub mod health_check_response { - #[derive(Clone, Copy, Debug, PartialEq, Eq, Hash, PartialOrd, Ord, ::prost::Enumeration)] + #[derive( + serde::Serialize, + serde::Deserialize, + Clone, + Copy, + Debug, + PartialEq, + Eq, + Hash, + PartialOrd, + Ord, + ::prost::Enumeration, + )] #[repr(i32)] pub enum ServingStatus { Unknown = 0, diff --git a/cloud-proto/src/proto/network.rs b/cloud-proto/src/proto/network.rs index af5713e..0997124 100644 --- a/cloud-proto/src/proto/network.rs +++ b/cloud-proto/src/proto/network.rs @@ -1,10 +1,10 @@ // This file is @generated by prost-build. -#[derive(Clone, Copy, PartialEq, ::prost::Message)] +#[derive(serde::Serialize, serde::Deserialize, Clone, Copy, PartialEq, ::prost::Message)] pub struct NetworkStatusResponse { #[prost(uint64, tag = "1")] pub peer_count: u64, } -#[derive(Clone, PartialEq, ::prost::Message)] +#[derive(serde::Serialize, serde::Deserialize, Clone, PartialEq, ::prost::Message)] pub struct NetworkMsg { #[prost(string, tag = "1")] pub module: ::prost::alloc::string::String, @@ -15,7 +15,7 @@ pub struct NetworkMsg { #[prost(bytes = "vec", tag = "4")] pub msg: ::prost::alloc::vec::Vec, } -#[derive(Clone, PartialEq, ::prost::Message)] +#[derive(serde::Serialize, serde::Deserialize, Clone, PartialEq, ::prost::Message)] pub struct RegisterInfo { #[prost(string, tag = "1")] pub module_name: ::prost::alloc::string::String, diff --git a/cloud-proto/src/proto/status_code.rs b/cloud-proto/src/proto/status_code.rs index 450169d..805deb2 100644 --- a/cloud-proto/src/proto/status_code.rs +++ b/cloud-proto/src/proto/status_code.rs @@ -1,5 +1,17 @@ // This file is @generated by prost-build. -#[derive(Clone, Copy, Debug, PartialEq, Eq, Hash, PartialOrd, Ord, ::prost::Enumeration)] +#[derive( + serde::Serialize, + serde::Deserialize, + Clone, + Copy, + Debug, + PartialEq, + Eq, + Hash, + PartialOrd, + Ord, + ::prost::Enumeration, +)] #[repr(i32)] pub enum StatusCodeEnum { /// / Success: 0 diff --git a/cloud-proto/src/proto/storage.rs b/cloud-proto/src/proto/storage.rs index dc69765..5fd6f26 100644 --- a/cloud-proto/src/proto/storage.rs +++ b/cloud-proto/src/proto/storage.rs @@ -1,5 +1,5 @@ // This file is @generated by prost-build. -#[derive(Clone, PartialEq, ::prost::Message)] +#[derive(serde::Serialize, serde::Deserialize, Clone, PartialEq, ::prost::Message)] pub struct Content { #[prost(uint32, tag = "1")] pub region: u32, @@ -8,21 +8,33 @@ pub struct Content { #[prost(bytes = "vec", tag = "3")] pub value: ::prost::alloc::vec::Vec, } -#[derive(Clone, PartialEq, ::prost::Message)] +#[derive(serde::Serialize, serde::Deserialize, Clone, PartialEq, ::prost::Message)] pub struct ExtKey { #[prost(uint32, tag = "1")] pub region: u32, #[prost(bytes = "vec", tag = "2")] pub key: ::prost::alloc::vec::Vec, } -#[derive(Clone, PartialEq, ::prost::Message)] +#[derive(serde::Serialize, serde::Deserialize, Clone, PartialEq, ::prost::Message)] pub struct Value { #[prost(message, optional, tag = "1")] pub status: ::core::option::Option, #[prost(bytes = "vec", tag = "2")] pub value: ::prost::alloc::vec::Vec, } -#[derive(Clone, Copy, Debug, PartialEq, Eq, Hash, PartialOrd, Ord, ::prost::Enumeration)] +#[derive( + serde::Serialize, + serde::Deserialize, + Clone, + Copy, + Debug, + PartialEq, + Eq, + Hash, + PartialOrd, + Ord, + ::prost::Enumeration, +)] #[repr(i32)] pub enum Regions { Global = 0, diff --git a/cloud-proto/src/reflect/controller.bin b/cloud-proto/src/reflect/controller.bin index e3aee90..4307203 100644 Binary files a/cloud-proto/src/reflect/controller.bin and b/cloud-proto/src/reflect/controller.bin differ diff --git a/cloud-proto/src/reflect/executor.bin b/cloud-proto/src/reflect/executor.bin index 2802f1f..770d8d5 100644 Binary files a/cloud-proto/src/reflect/executor.bin and b/cloud-proto/src/reflect/executor.bin differ