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

feat(p2p/grpc): creating gRPC behaviour #331

Merged
merged 3 commits into from
Oct 17, 2023
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
404 changes: 332 additions & 72 deletions Cargo.lock

Large diffs are not rendered by default.

7 changes: 5 additions & 2 deletions Cargo.toml
Original file line number Diff line number Diff line change
Expand Up @@ -53,8 +53,11 @@ tracing-opentelemetry = "0.19"
tracing-subscriber = { version = "0.3", default-features = false }

# gRPC
prost = {version = "0.11"}
tonic = { version = "0.9", default-features = false }
prost = {version = "0.12"}
tonic = { version = "0.10", default-features = false }
tonic-build = { version = "0.10", default-features = false, features = [
"prost", "transport"
] }

# Axum server (GraphQL + Metrics)
axum = "0.6"
Expand Down
2 changes: 1 addition & 1 deletion crates/topos-api/Cargo.toml
Original file line number Diff line number Diff line change
Expand Up @@ -33,7 +33,7 @@ async-trait.workspace = true
tracing.workspace = true

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

Expand Down
241 changes: 203 additions & 38 deletions crates/topos-api/src/grpc/generated/topos.tce.v1.rs

Large diffs are not rendered by default.

15 changes: 15 additions & 0 deletions crates/topos-p2p/Cargo.toml
Original file line number Diff line number Diff line change
Expand Up @@ -15,15 +15,30 @@ prometheus-client.workspace = true
serde = { workspace = true, features = ["derive"] }
thiserror.workspace = true
tokio = { workspace = true, features = ["full"] }
tokio-util = { workspace = true }
tokio-stream.workspace = true
tracing = { workspace = true, features = ["attributes"] }
libp2p = { workspace = true, features = ["macros", "gossipsub", "tcp", "dns", "tokio", "request-response", "identify", "kad", "serde", "yamux", "secp256k1"] }
hex.workspace = true
unsigned-varint = { version = "0.7.1", features = ["futures", "asynchronous_codec"] }
void = "1"
tonic = {workspace = true, features = ["tls", "tls-roots"]}
tower.workspace = true

topos-api = {path = "../topos-api/", features = ["grpc"]}
topos-metrics = { path = "../topos-metrics/" }
topos-crypto = { path = "../topos-crypto" }
smallvec = "1.11.1"
Freyskeyd marked this conversation as resolved.
Show resolved Hide resolved
bytes.workspace = true
h2 = "0.3.21"
prost.workspace = true
http.workspace = true
http-body = "0.4.5"
http-body-util = "0.1.0-rc.3"
hyper.workspace = true
uuid.workspace = true
pin-project = "1.1.3"
libp2p-swarm-test = "0.2.0"

[dev-dependencies]
test-log.workspace = true
Expand Down
1 change: 1 addition & 0 deletions crates/topos-p2p/src/behaviour.rs
Original file line number Diff line number Diff line change
Expand Up @@ -13,6 +13,7 @@ use libp2p::{

pub(crate) mod discovery;
pub(crate) mod gossip;
pub(crate) mod grpc;
pub(crate) mod peer_info;
pub(crate) mod topos;
pub(crate) mod transmission;
Expand Down
Loading
Loading