Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

upgrade deps #35

Merged
merged 1 commit into from
Nov 7, 2024
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
8 changes: 4 additions & 4 deletions cloud-proto/Cargo.toml
Original file line number Diff line number Diff line change
Expand Up @@ -10,15 +10,15 @@ description = "cita-cloud proto library"
[dependencies]
tonic = "0.12"
prost = "0.13"
tokio = { version = "1.38", default-features = false, features = ["macros"] }
thiserror = "1.0"
tokio = { version = "1.41", default-features = false, features = ["macros"] }
thiserror = "2.0"
http = "1.1"
futures-retry = "0.6"
backoff = "0.4"
async-trait = "0.1"
tracing = "0.1"
tracing-opentelemetry = "0.24"
opentelemetry = "0.23"
tracing-opentelemetry = "0.27"
opentelemetry = "0.26"

[build-dependencies]
tonic-build = { version = "0.12", optional = true }
32 changes: 17 additions & 15 deletions cloud-proto/build.rs
Original file line number Diff line number Diff line change
Expand Up @@ -16,27 +16,29 @@ fn main() -> Result<(), Box<dyn std::error::Error>> {
#[cfg(feature = "tonic-build")]
{
println!("cargo:rerun-if-changed=protos");
tonic_build::configure().out_dir("src/proto").compile(
&[
"blockchain.proto",
"common.proto",
"consensus.proto",
"network.proto",
"storage.proto",
"crypto.proto",
"health_check.proto",
"status_code.proto",
],
&["protos/protos"],
)?;
tonic_build::configure()
.out_dir("src/proto")
.compile_protos(
&[
"blockchain.proto",
"common.proto",
"consensus.proto",
"network.proto",
"storage.proto",
"crypto.proto",
"health_check.proto",
"status_code.proto",
],
&["protos/protos"],
)?;
tonic_build::configure()
.out_dir("src/proto")
.file_descriptor_set_path("src/reflect/controller.bin")
.compile(&["controller.proto"], &["protos/protos"])?;
.compile_protos(&["controller.proto"], &["protos/protos"])?;
tonic_build::configure()
.out_dir("src/proto")
.file_descriptor_set_path("src/reflect/executor.bin")
.compile(&["executor.proto", "vm/evm.proto"], &["protos/protos"])?;
.compile_protos(&["executor.proto", "vm/evm.proto"], &["protos/protos"])?;
}
Ok(())
}
12 changes: 0 additions & 12 deletions cloud-proto/src/proto/blockchain.rs
Original file line number Diff line number Diff line change
@@ -1,5 +1,4 @@
// This file is @generated by prost-build.
#[allow(clippy::derive_partial_eq_without_eq)]
#[derive(Clone, PartialEq, ::prost::Message)]
pub struct BlockHeader {
/// hash of previous BlockHeader
Expand All @@ -14,7 +13,6 @@ pub struct BlockHeader {
#[prost(bytes = "vec", tag = "5")]
pub proposer: ::prost::alloc::vec::Vec<u8>,
}
#[allow(clippy::derive_partial_eq_without_eq)]
#[derive(Clone, PartialEq, ::prost::Message)]
pub struct Transaction {
#[prost(uint32, tag = "1")]
Expand All @@ -39,7 +37,6 @@ pub struct Transaction {
#[prost(bytes = "vec", tag = "8")]
pub chain_id: ::prost::alloc::vec::Vec<u8>,
}
#[allow(clippy::derive_partial_eq_without_eq)]
#[derive(Clone, PartialEq, ::prost::Message)]
pub struct Witness {
#[prost(bytes = "vec", tag = "1")]
Expand All @@ -48,7 +45,6 @@ pub struct Witness {
#[prost(bytes = "vec", tag = "2")]
pub sender: ::prost::alloc::vec::Vec<u8>,
}
#[allow(clippy::derive_partial_eq_without_eq)]
#[derive(Clone, PartialEq, ::prost::Message)]
pub struct UnverifiedTransaction {
#[prost(message, optional, tag = "1")]
Expand All @@ -59,7 +55,6 @@ pub struct UnverifiedTransaction {
#[prost(message, optional, tag = "3")]
pub witness: ::core::option::Option<Witness>,
}
#[allow(clippy::derive_partial_eq_without_eq)]
#[derive(Clone, PartialEq, ::prost::Message)]
pub struct UtxoTransaction {
#[prost(uint32, tag = "1")]
Expand All @@ -71,7 +66,6 @@ pub struct UtxoTransaction {
#[prost(uint64, tag = "4")]
pub lock_id: u64,
}
#[allow(clippy::derive_partial_eq_without_eq)]
#[derive(Clone, PartialEq, ::prost::Message)]
pub struct UnverifiedUtxoTransaction {
#[prost(message, optional, tag = "1")]
Expand All @@ -82,21 +76,18 @@ pub struct UnverifiedUtxoTransaction {
#[prost(message, repeated, tag = "3")]
pub witnesses: ::prost::alloc::vec::Vec<Witness>,
}
#[allow(clippy::derive_partial_eq_without_eq)]
#[derive(Clone, PartialEq, ::prost::Message)]
pub struct RawTransactions {
#[prost(message, repeated, tag = "1")]
pub body: ::prost::alloc::vec::Vec<RawTransaction>,
}
#[allow(clippy::derive_partial_eq_without_eq)]
#[derive(Clone, PartialEq, ::prost::Message)]
pub struct RawTransaction {
#[prost(oneof = "raw_transaction::Tx", tags = "1, 2")]
pub tx: ::core::option::Option<raw_transaction::Tx>,
}
/// Nested message and enum types in `RawTransaction`.
pub mod raw_transaction {
#[allow(clippy::derive_partial_eq_without_eq)]
#[derive(Clone, PartialEq, ::prost::Oneof)]
pub enum Tx {
#[prost(message, tag = "1")]
Expand All @@ -105,14 +96,12 @@ pub mod raw_transaction {
UtxoTx(super::UnverifiedUtxoTransaction),
}
}
#[allow(clippy::derive_partial_eq_without_eq)]
#[derive(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<u8>>,
}
#[allow(clippy::derive_partial_eq_without_eq)]
#[derive(Clone, PartialEq, ::prost::Message)]
pub struct CompactBlock {
#[prost(uint32, tag = "1")]
Expand All @@ -122,7 +111,6 @@ pub struct CompactBlock {
#[prost(message, optional, tag = "3")]
pub body: ::core::option::Option<CompactBlockBody>,
}
#[allow(clippy::derive_partial_eq_without_eq)]
#[derive(Clone, PartialEq, ::prost::Message)]
pub struct Block {
#[prost(uint32, tag = "1")]
Expand Down
18 changes: 0 additions & 18 deletions cloud-proto/src/proto/common.rs
Original file line number Diff line number Diff line change
@@ -1,62 +1,52 @@
// This file is @generated by prost-build.
#[allow(clippy::derive_partial_eq_without_eq)]
#[derive(Clone, Copy, PartialEq, ::prost::Message)]
pub struct Empty {}
#[allow(clippy::derive_partial_eq_without_eq)]
#[derive(Clone, PartialEq, ::prost::Message)]
pub struct Hash {
#[prost(bytes = "vec", tag = "1")]
pub hash: ::prost::alloc::vec::Vec<u8>,
}
#[allow(clippy::derive_partial_eq_without_eq)]
#[derive(Clone, PartialEq, ::prost::Message)]
pub struct StateRoot {
#[prost(bytes = "vec", tag = "1")]
pub state_root: ::prost::alloc::vec::Vec<u8>,
}
#[allow(clippy::derive_partial_eq_without_eq)]
#[derive(Clone, PartialEq, ::prost::Message)]
pub struct Proof {
#[prost(bytes = "vec", tag = "1")]
pub proof: ::prost::alloc::vec::Vec<u8>,
}
#[allow(clippy::derive_partial_eq_without_eq)]
#[derive(Clone, PartialEq, ::prost::Message)]
pub struct Hashes {
#[prost(message, repeated, tag = "1")]
pub hashes: ::prost::alloc::vec::Vec<Hash>,
}
#[allow(clippy::derive_partial_eq_without_eq)]
#[derive(Clone, PartialEq, ::prost::Message)]
pub struct Address {
#[prost(bytes = "vec", tag = "1")]
pub address: ::prost::alloc::vec::Vec<u8>,
}
#[allow(clippy::derive_partial_eq_without_eq)]
#[derive(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<u8>,
}
#[allow(clippy::derive_partial_eq_without_eq)]
#[derive(Clone, PartialEq, ::prost::Message)]
pub struct ProposalInner {
#[prost(bytes = "vec", tag = "1")]
pub pre_state_root: ::prost::alloc::vec::Vec<u8>,
#[prost(message, optional, tag = "2")]
pub proposal: ::core::option::Option<super::blockchain::CompactBlock>,
}
#[allow(clippy::derive_partial_eq_without_eq)]
#[derive(Clone, PartialEq, ::prost::Message)]
pub struct ProposalWithProof {
#[prost(message, optional, tag = "1")]
pub proposal: ::core::option::Option<Proposal>,
#[prost(bytes = "vec", tag = "2")]
pub proof: ::prost::alloc::vec::Vec<u8>,
}
#[allow(clippy::derive_partial_eq_without_eq)]
#[derive(Clone, PartialEq, ::prost::Message)]
pub struct ConsensusConfiguration {
#[prost(uint64, tag = "1")]
Expand All @@ -66,51 +56,44 @@ pub struct ConsensusConfiguration {
#[prost(bytes = "vec", repeated, tag = "3")]
pub validators: ::prost::alloc::vec::Vec<::prost::alloc::vec::Vec<u8>>,
}
#[allow(clippy::derive_partial_eq_without_eq)]
#[derive(Clone, Copy, PartialEq, ::prost::Message)]
pub struct StatusCode {
#[prost(uint32, tag = "1")]
pub code: u32,
}
#[allow(clippy::derive_partial_eq_without_eq)]
#[derive(Clone, PartialEq, ::prost::Message)]
pub struct HashResponse {
#[prost(message, optional, tag = "1")]
pub status: ::core::option::Option<StatusCode>,
#[prost(message, optional, tag = "2")]
pub hash: ::core::option::Option<Hash>,
}
#[allow(clippy::derive_partial_eq_without_eq)]
#[derive(Clone, PartialEq, ::prost::Message)]
pub struct ProposalResponse {
#[prost(message, optional, tag = "1")]
pub status: ::core::option::Option<StatusCode>,
#[prost(message, optional, tag = "2")]
pub proposal: ::core::option::Option<Proposal>,
}
#[allow(clippy::derive_partial_eq_without_eq)]
#[derive(Clone, PartialEq, ::prost::Message)]
pub struct ConsensusConfigurationResponse {
#[prost(message, optional, tag = "1")]
pub status: ::core::option::Option<StatusCode>,
#[prost(message, optional, tag = "2")]
pub config: ::core::option::Option<ConsensusConfiguration>,
}
#[allow(clippy::derive_partial_eq_without_eq)]
#[derive(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,
}
#[allow(clippy::derive_partial_eq_without_eq)]
#[derive(Clone, PartialEq, ::prost::Message)]
pub struct TotalNodeNetInfo {
#[prost(message, repeated, tag = "1")]
pub nodes: ::prost::alloc::vec::Vec<NodeNetInfo>,
}
#[allow(clippy::derive_partial_eq_without_eq)]
#[derive(Clone, PartialEq, ::prost::Message)]
pub struct PeerStatus {
#[prost(uint64, tag = "1")]
Expand All @@ -120,7 +103,6 @@ pub struct PeerStatus {
#[prost(message, optional, tag = "3")]
pub node_net_info: ::core::option::Option<NodeNetInfo>,
}
#[allow(clippy::derive_partial_eq_without_eq)]
#[derive(Clone, PartialEq, ::prost::Message)]
pub struct NodeStatus {
#[prost(bool, tag = "1")]
Expand Down
Loading
Loading