Skip to content
This repository has been archived by the owner on Oct 31, 2024. It is now read-only.

Commit

Permalink
chore: update workspace dependencies (#104)
Browse files Browse the repository at this point in the history
  • Loading branch information
atanmarko authored Jan 3, 2023
1 parent 6a4b8ea commit f3b8a4e
Show file tree
Hide file tree
Showing 32 changed files with 405 additions and 421 deletions.
467 changes: 199 additions & 268 deletions Cargo.lock

Large diffs are not rendered by default.

21 changes: 18 additions & 3 deletions Cargo.toml
Original file line number Diff line number Diff line change
Expand Up @@ -5,18 +5,33 @@ members = [
]

[workspace.dependencies]

topos-core = { path = "./crates/topos-core", default-features = false }

async-trait = { version = "0.1", default-features = false }
async-stream = { version = "0.3", default-features = false }
futures = { version = "0.3" }
libp2p = { version = "0.49", default-features = false, features = ["noise"]}
rand = { version = "0.8", default-features = false }
rand_core = { version = "0.6", default-features = false }
rand_distr = { version = "0.4", default-features = false }
rstest = "0.15.0"
rstest = { version = "0.16", default-features = false }
serde = { version = "1.0", default-features = false }
thiserror = { version = "1.0", default-features = false }
tokio = { version = "1.20", default-features = false }
tokio-stream = { version = "0.1", default-features = false }
tonic = { version = "0.8.0", default-features = false }
topos-core = { path = "./crates/topos-core", default-features = false }
tonic = { version = "0.8", default-features = false }
tracing = { version = "0.1", default-features = false }
tracing-subscriber = { version = "0.3", default-features = false }
ethereum-types = { version = "0.12.1"}
serde_json = { version = "1.0", default-features = false }
byteorder = { version = "1.4", default-features = false }
uuid = { version = "1.1.2", default-features = false, features = ["v4"] }
bytes = { version = "1.3", default-features = false }
hyper = { version = "0.14", features = ["full"] }
hex = { version = "0.4", default-features = false }
web3 = { version = "0.18", features = ["signing"]}
pretty_env_logger = { version = "0.4", default-features = false }
clap = { version = "4.0", features = ["derive", "env"] }
bincode = { version = "1.3", default-features = false }

15 changes: 8 additions & 7 deletions crates/topos-api/Cargo.toml
Original file line number Diff line number Diff line change
Expand Up @@ -7,24 +7,25 @@ edition = "2021"

[dependencies]
topos-uci = { path = "../topos-uci"}
tonic = { version = "0.8", default-features = false, features = [

tonic = { workspace = true, default-features = false, features = [
"prost",
"codegen",
"transport",
] }
ethereum-types.workspace = true
uuid.workspace = true
prost = "0.11"
prost-types = "0.10"
ethereum-types = "0.12.1"
uuid = { version = "1.1.2", features = ["v4"] }

[build-dependencies]
tonic-build = { version = "0.8", default-features = false, features = [
"prost", "transport"
] }

[dev-dependencies]
async-stream = "0.3.3"
tokio.workspace = true
futures.workspace = true
tokio-stream.workspace = true
async-stream.workspace = true
tower = "0.4.13"
tokio = "1.20.1"
tokio-stream = "0.1.9"
futures = "0.3.24"
3 changes: 3 additions & 0 deletions crates/topos-api/src/generated/topos.shared.v1.rs
Original file line number Diff line number Diff line change
@@ -1,16 +1,19 @@
#[derive(Copy)]
#[allow(clippy::derive_partial_eq_without_eq)]
#[derive(Clone, PartialEq, ::prost::Message)]
pub struct Uuid {
#[prost(uint64, tag = "1")]
pub most_significant_bits: u64,
#[prost(uint64, tag = "2")]
pub least_significant_bits: u64,
}
#[allow(clippy::derive_partial_eq_without_eq)]
#[derive(Clone, PartialEq, ::prost::Message)]
pub struct SubnetId {
#[prost(string, tag = "1")]
pub value: ::prost::alloc::string::String,
}
#[allow(clippy::derive_partial_eq_without_eq)]
#[derive(Clone, PartialEq, ::prost::Message)]
pub struct CertificateId {
#[prost(bytes = "vec", tag = "1")]
Expand Down
18 changes: 18 additions & 0 deletions crates/topos-api/src/generated/topos.tce.v1.rs
Original file line number Diff line number Diff line change
@@ -1,10 +1,13 @@
#[allow(clippy::derive_partial_eq_without_eq)]
#[derive(Clone, PartialEq, ::prost::Message)]
pub struct SubmitCertificateRequest {
#[prost(message, optional, tag = "1")]
pub certificate: ::core::option::Option<super::super::uci::v1::Certificate>,
}
#[allow(clippy::derive_partial_eq_without_eq)]
#[derive(Clone, PartialEq, ::prost::Message)]
pub struct SubmitCertificateResponse {}
#[allow(clippy::derive_partial_eq_without_eq)]
#[derive(Clone, PartialEq, ::prost::Message)]
pub struct WatchCertificatesRequest {
/// Provide a request_id to track response
Expand All @@ -17,6 +20,7 @@ pub struct WatchCertificatesRequest {
/// Nested message and enum types in `WatchCertificatesRequest`.
pub mod watch_certificates_request {
/// Sent once to start receiving events and being able to send further command
#[allow(clippy::derive_partial_eq_without_eq)]
#[derive(Clone, PartialEq, ::prost::Message)]
pub struct OpenStream {
#[prost(message, repeated, tag = "1")]
Expand All @@ -25,12 +29,14 @@ pub mod watch_certificates_request {
>,
}
/// Define which command needs to be performed
#[allow(clippy::derive_partial_eq_without_eq)]
#[derive(Clone, PartialEq, ::prost::Oneof)]
pub enum Command {
#[prost(message, tag = "2")]
OpenStream(OpenStream),
}
}
#[allow(clippy::derive_partial_eq_without_eq)]
#[derive(Clone, PartialEq, ::prost::Message)]
pub struct WatchCertificatesResponse {
/// If the response is directly linked to a request this ID allow one to track it
Expand All @@ -42,6 +48,7 @@ pub struct WatchCertificatesResponse {
/// Nested message and enum types in `WatchCertificatesResponse`.
pub mod watch_certificates_response {
/// Sent by the TCE when the stream is ready to be used and that certificates will start being push
#[allow(clippy::derive_partial_eq_without_eq)]
#[derive(Clone, PartialEq, ::prost::Message)]
pub struct StreamOpened {
#[prost(message, repeated, tag = "1")]
Expand All @@ -50,13 +57,15 @@ pub mod watch_certificates_response {
>,
}
/// Main message pushed to the stream
#[allow(clippy::derive_partial_eq_without_eq)]
#[derive(Clone, PartialEq, ::prost::Message)]
pub struct CertificatePushed {
#[prost(message, optional, tag = "1")]
pub certificate: ::core::option::Option<
super::super::super::uci::v1::Certificate,
>,
}
#[allow(clippy::derive_partial_eq_without_eq)]
#[derive(Clone, PartialEq, ::prost::Oneof)]
pub enum Event {
#[prost(message, tag = "2")]
Expand Down Expand Up @@ -384,13 +393,15 @@ pub mod api_service_server {
const NAME: &'static str = "topos.tce.v1.APIService";
}
}
#[allow(clippy::derive_partial_eq_without_eq)]
#[derive(Clone, PartialEq, ::prost::Message)]
pub struct PushPeerListRequest {
#[prost(message, optional, tag = "1")]
pub request_id: ::core::option::Option<super::super::shared::v1::Uuid>,
#[prost(string, repeated, tag = "2")]
pub peers: ::prost::alloc::vec::Vec<::prost::alloc::string::String>,
}
#[allow(clippy::derive_partial_eq_without_eq)]
#[derive(Clone, PartialEq, ::prost::Message)]
pub struct PushPeerListResponse {}
/// Generated client implementations.
Expand Down Expand Up @@ -633,6 +644,7 @@ pub mod console_service_server {
const NAME: &'static str = "topos.tce.v1.ConsoleService";
}
}
#[allow(clippy::derive_partial_eq_without_eq)]
#[derive(Clone, PartialEq, ::prost::Message)]
pub struct CheckpointRequest {
/// Provide a request_id to track response
Expand All @@ -645,6 +657,7 @@ pub struct CheckpointRequest {
/// Nested message and enum types in `CheckpointRequest`.
pub mod checkpoint_request {
/// Heads defines a request for every head positions for the listed subnets
#[allow(clippy::derive_partial_eq_without_eq)]
#[derive(Clone, PartialEq, ::prost::Message)]
pub struct Heads {
#[prost(message, repeated, tag = "1")]
Expand All @@ -653,6 +666,7 @@ pub mod checkpoint_request {
>,
}
/// SamePosition defines a request for the same position for the listed subnets
#[allow(clippy::derive_partial_eq_without_eq)]
#[derive(Clone, PartialEq, ::prost::Message)]
pub struct SamePosition {
#[prost(message, repeated, tag = "1")]
Expand All @@ -663,6 +677,7 @@ pub mod checkpoint_request {
pub position: u64,
}
/// Zero defines a request for the zero position for the listed subnets
#[allow(clippy::derive_partial_eq_without_eq)]
#[derive(Clone, PartialEq, ::prost::Message)]
pub struct Zero {
#[prost(message, repeated, tag = "1")]
Expand All @@ -671,6 +686,7 @@ pub mod checkpoint_request {
>,
}
/// The type of request
#[allow(clippy::derive_partial_eq_without_eq)]
#[derive(Clone, PartialEq, ::prost::Oneof)]
pub enum RequestType {
/// This type of request will ask for heads of subnets
Expand All @@ -684,6 +700,7 @@ pub mod checkpoint_request {
Zero(Zero),
}
}
#[allow(clippy::derive_partial_eq_without_eq)]
#[derive(Clone, PartialEq, ::prost::Message)]
pub struct CheckpointResponse {
/// If the response is directly linked to a request this ID allow one to track it
Expand All @@ -696,6 +713,7 @@ pub struct CheckpointResponse {
}
/// Type that represents a SourceStreamPosition, or position, it represents a
/// particular position in the stream of a subnet in a peer context.
#[allow(clippy::derive_partial_eq_without_eq)]
#[derive(Clone, PartialEq, ::prost::Message)]
pub struct SourceStreamPosition {
#[prost(message, optional, tag = "1")]
Expand Down
6 changes: 6 additions & 0 deletions crates/topos-api/src/generated/topos.uci.v1.rs
Original file line number Diff line number Diff line change
@@ -1,6 +1,7 @@
/// Two types of transactions available:
/// Asset transfer
/// Smart contract function call
#[allow(clippy::derive_partial_eq_without_eq)]
#[derive(Clone, PartialEq, ::prost::Message)]
pub struct CrossChainTransactionData {
#[prost(oneof = "cross_chain_transaction_data::Data", tags = "1, 2")]
Expand All @@ -9,6 +10,7 @@ pub struct CrossChainTransactionData {
/// Nested message and enum types in `CrossChainTransactionData`.
pub mod cross_chain_transaction_data {
/// Cross chain transaction data for asset transfer
#[allow(clippy::derive_partial_eq_without_eq)]
#[derive(Clone, PartialEq, ::prost::Message)]
pub struct AssetTransfer {
#[prost(string, tag = "1")]
Expand All @@ -17,11 +19,13 @@ pub mod cross_chain_transaction_data {
pub amount: ::prost::alloc::vec::Vec<u8>,
}
/// Data describing cross chain function call
#[allow(clippy::derive_partial_eq_without_eq)]
#[derive(Clone, PartialEq, ::prost::Message)]
pub struct FunctionCall {
#[prost(bytes = "vec", tag = "1")]
pub data: ::prost::alloc::vec::Vec<u8>,
}
#[allow(clippy::derive_partial_eq_without_eq)]
#[derive(Clone, PartialEq, ::prost::Oneof)]
pub enum Data {
#[prost(message, tag = "1")]
Expand All @@ -31,6 +35,7 @@ pub mod cross_chain_transaction_data {
}
}
/// Cross chain transaction exchanged between subnets
#[allow(clippy::derive_partial_eq_without_eq)]
#[derive(Clone, PartialEq, ::prost::Message)]
pub struct CrossChainTransaction {
#[prost(string, tag = "1")]
Expand All @@ -43,6 +48,7 @@ pub struct CrossChainTransaction {
pub transaction_data: ::core::option::Option<CrossChainTransactionData>,
}
/// Certificate - main exchange item
#[allow(clippy::derive_partial_eq_without_eq)]
#[derive(Clone, PartialEq, ::prost::Message)]
pub struct Certificate {
#[prost(string, tag = "1")]
Expand Down
2 changes: 1 addition & 1 deletion crates/topos-p2p/Cargo.toml
Original file line number Diff line number Diff line change
Expand Up @@ -16,7 +16,7 @@ tracing.workspace = true
libp2p = { workspace = true, features = ["tcp-tokio", "dns-tokio", "request-response", "identify", "mplex", "mdns-tokio", "mdns", "kad", "serde"] }

[dev-dependencies]
bincode = "1.3"
bincode.workspace = true
env_logger = "0.9.1"
test-log = { version = "0.2", features = ["trace"] }
tracing-subscriber = { workspace = true, features = ["env-filter", "fmt"] }
18 changes: 9 additions & 9 deletions crates/topos-sequencer-api/Cargo.toml
Original file line number Diff line number Diff line change
Expand Up @@ -5,11 +5,10 @@ edition = "2021"
license = "MIT"

[dependencies]
hyper = { version = "0.14", features = ["full"] }
log = "0.4.14"
serde = { version = "1.0.136", features = ["derive"] }
serde_json = "1.0.78"
tokio = { version = "1.15.0", features = [
topos-core = { workspace = true, features = ["uci"] }

serde = { workspace = true, features = ["derive"] }
tokio = { workspace = true, features = [
"io-util",
"io-std",
"macros",
Expand All @@ -19,7 +18,8 @@ tokio = { version = "1.15.0", features = [
"time",
"sync",
] }

topos-core = { workspace = true, features = ["uci"] }

bytes = "1.1.0"
serde_json.workspace = true
tracing.workspace = true
tracing-subscriber.workspace = true
bytes.workspace = true
hyper.workspace = true
5 changes: 3 additions & 2 deletions crates/topos-sequencer-api/src/web_api.rs
Original file line number Diff line number Diff line change
Expand Up @@ -13,6 +13,7 @@ use hyper::{header, Body, Method, Request, Response, Server, StatusCode};
use serde::{de::DeserializeOwned, Serialize};
use std::convert::Infallible;
use tokio::sync::mpsc;
use tracing::{debug, warn};

/// Handler of [get]/health_check
async fn health_check() -> Result<Response<Body>, Infallible> {
Expand Down Expand Up @@ -46,7 +47,7 @@ async fn dispatch_req(
req: Request<Body>,
_tx: mpsc::Sender<ApiRequests>,
) -> Result<Response<Body>, Infallible> {
log::debug!("dispatch_req: {:?}", req);
debug!("dispatch_req: {:?}", req);
match (req.method(), req.uri().path()) {
// matches
(&Method::GET, "/health_check") => health_check().await,
Expand All @@ -71,7 +72,7 @@ where
return Ok(deser_req);
}
Err(e) => {
log::warn!("from_post_params failed due to: {:?}", &e);
warn!("from_post_params failed due to: {:?}", &e);
}
}
}
Expand Down
21 changes: 10 additions & 11 deletions crates/topos-sequencer-certification/Cargo.toml
Original file line number Diff line number Diff line change
Expand Up @@ -4,10 +4,12 @@ version = "0.1.0"
edition = "2021"

[dependencies]
serde = { version = "1.0.136", features = ["derive"] }
byteorder = "1.4.3"
log = "0.4.14"
tokio = { version = "1.15.0", features = [
serde = { workspace = true, features = ["derive"] }
rand = { workspace = true, features = ["default"] }
rand_core.workspace = true
rand_distr.workspace = true
thiserror.workspace = true
tokio = { workspace = true, features = [
"io-util",
"io-std",
"macros",
Expand All @@ -17,15 +19,12 @@ tokio = { version = "1.15.0", features = [
"time",
"sync",
] }
rand_distr = "0.4.1"
rand_core = "0.6.0"
rand = "0.8.5"
thiserror = "1.0"
hex = "0.4.3"
byteorder.workspace = true
tracing.workspace = true
tracing-subscriber.workspace = true
hex.workspace = true

topos-sequencer-types = { package = "topos-sequencer-types", path = "../topos-sequencer-types" }
topos-core = { workspace = true, features = ["uci"] }

[dev-dependencies]
pretty_env_logger = "0.4.0"

Loading

0 comments on commit f3b8a4e

Please sign in to comment.