Skip to content

Commit 7678dab

Browse files
committed
build: update protobuf crates to 0.14.1
Signed-off-by: Joseph Livesey <[email protected]>
1 parent a371a94 commit 7678dab

File tree

6 files changed

+96
-94
lines changed

6 files changed

+96
-94
lines changed

Cargo.lock

Lines changed: 21 additions & 50 deletions
Some generated files are not rendered by default. Learn more about customizing how changed files appear on GitHub.

Cargo.toml

Lines changed: 7 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -52,8 +52,8 @@ insta = "1.42.2"
5252
itertools = "0.14.0"
5353
jsonrpsee = { version = "0.24.0", features = ["http-client", "tracing"] }
5454
prometheus = "0.13.3"
55-
prost = "0.13.4"
56-
prost-types = "0.13.3"
55+
prost = "0.14.1"
56+
prost-types = "0.14.1"
5757
ractor = { version = "0.15.7", features = [
5858
"async-trait",
5959
"tokio_runtime",
@@ -107,8 +107,10 @@ thegraph-graphql-http = { version = "0.3.2", features = ["reqwest"] }
107107
thiserror = "2.0.12"
108108
tokio = "1.40"
109109
tokio-test = "0.4.4"
110-
tonic = { version = "0.13.0", features = ["tls-native-roots", "gzip"] }
111-
tonic-build = "0.13.0"
110+
tonic = { version = "0.14.1", features = ["tls-native-roots", "gzip"] }
111+
tonic-build = "0.14.1"
112+
tonic-prost = "0.14.1"
113+
tonic-prost-build = "0.14.1"
112114
tower-service = "0.3.3"
113115
tower-test = "0.4.0"
114116
tracing = { version = "0.1.40", default-features = false }
@@ -119,7 +121,7 @@ tracing-subscriber = { version = "0.3", features = [
119121
], default-features = false }
120122
uuid = { version = "1.11.0", features = ["v7"] }
121123
wiremock = "0.6.1"
122-
wiremock-grpc = "0.1.0"
124+
wiremock-grpc = { git = "https://github.com/suchapalaver/wiremock-grpc-rs.git", branch = "main" }
123125

124126
# Insta benefits from being compiled in release mode, even as dev dependency
125127
# see https://insta.rs/docs/quickstart

crates/dips/Cargo.toml

Lines changed: 10 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -5,7 +5,14 @@ edition = "2021"
55

66
[features]
77
default = ["rpc", "db"]
8-
rpc = ["dep:prost", "dep:tonic", "dep:tonic-build", "dep:bytes"]
8+
rpc = [
9+
"dep:prost",
10+
"dep:tonic",
11+
"dep:tonic-build",
12+
"dep:tonic-prost",
13+
"dep:tonic-prost-build",
14+
"dep:bytes",
15+
]
916
db = ["dep:sqlx"]
1017

1118
[dependencies]
@@ -34,6 +41,7 @@ serde_yaml.workspace = true
3441
serde.workspace = true
3542
sqlx = { workspace = true, optional = true }
3643
tonic = { workspace = true, optional = true }
44+
tonic-prost = { workspace = true, optional = true }
3745
serde_json.workspace = true
3846

3947
[dev-dependencies]
@@ -44,3 +52,4 @@ test-assets = { path = "../test-assets" }
4452

4553
[build-dependencies]
4654
tonic-build = { workspace = true, optional = true }
55+
tonic-prost-build = { workspace = true, optional = true }

crates/dips/build.rs

Lines changed: 4 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -6,14 +6,16 @@ fn main() {
66
{
77
println!("cargo:rerun-if-changed=proto");
88

9-
tonic_build::configure()
9+
tonic_prost_build::configure()
10+
.build_server(true)
1011
.out_dir("src/proto")
1112
.include_file("indexer.rs")
1213
.protoc_arg("--experimental_allow_proto3_optional")
1314
.compile_protos(&["proto/indexer.proto"], &["proto/"])
1415
.expect("Failed to compile DIPs indexer RPC proto(s)");
1516

16-
tonic_build::configure()
17+
tonic_prost_build::configure()
18+
.build_server(true)
1719
.out_dir("src/proto")
1820
.include_file("gateway.rs")
1921
.protoc_arg("--experimental_allow_proto3_optional")

crates/dips/src/proto/graphprotocol.gateway.dips.rs

Lines changed: 26 additions & 17 deletions
Original file line numberDiff line numberDiff line change
@@ -1,9 +1,10 @@
11
// This file is @generated by prost-build.
22
/// *
3-
/// A request to cancel an _indexing agreement_.
3+
///
4+
/// A request to cancel an *indexing agreement*.
45
///
56
/// See the `DipsService.CancelAgreement` method.
6-
#[derive(Clone, PartialEq, ::prost::Message)]
7+
#[derive(Clone, PartialEq, Eq, Hash, ::prost::Message)]
78
pub struct CancelAgreementRequest {
89
#[prost(uint64, tag = "1")]
910
pub version: u64,
@@ -12,29 +13,32 @@ pub struct CancelAgreementRequest {
1213
pub signed_cancellation: ::prost::alloc::vec::Vec<u8>,
1314
}
1415
/// *
15-
/// A response to a request to cancel an _indexing agreement_.
16+
///
17+
/// A response to a request to cancel an *indexing agreement*.
1618
///
1719
/// See the `DipsService.CancelAgreement` method.
1820
///
1921
/// / Empty response, eventually we may add custom status codes
20-
#[derive(Clone, Copy, PartialEq, ::prost::Message)]
22+
#[derive(Clone, Copy, PartialEq, Eq, Hash, ::prost::Message)]
2123
pub struct CancelAgreementResponse {}
2224
/// *
23-
/// A request to collect payment _indexing agreement_.
25+
///
26+
/// A request to collect payment *indexing agreement*.
2427
///
2528
/// See the `DipsService.CollectPayment` method.
26-
#[derive(Clone, PartialEq, ::prost::Message)]
29+
#[derive(Clone, PartialEq, Eq, Hash, ::prost::Message)]
2730
pub struct CollectPaymentRequest {
2831
#[prost(uint64, tag = "1")]
2932
pub version: u64,
3033
#[prost(bytes = "vec", tag = "2")]
3134
pub signed_collection: ::prost::alloc::vec::Vec<u8>,
3235
}
3336
/// *
34-
/// A response to a request to collect payment for an _indexing agreement_.
37+
///
38+
/// A response to a request to collect payment for an *indexing agreement*.
3539
///
3640
/// See the `DipsService.CollectAgreement` method.
37-
#[derive(Clone, PartialEq, ::prost::Message)]
41+
#[derive(Clone, PartialEq, Eq, Hash, ::prost::Message)]
3842
pub struct CollectPaymentResponse {
3943
#[prost(uint64, tag = "1")]
4044
pub version: u64,
@@ -44,7 +48,8 @@ pub struct CollectPaymentResponse {
4448
pub tap_receipt: ::prost::alloc::vec::Vec<u8>,
4549
}
4650
/// *
47-
/// The status on response to collect an _indexing agreement_.
51+
///
52+
/// The status on response to collect an *indexing agreement*.
4853
#[derive(Clone, Copy, Debug, PartialEq, Eq, Hash, PartialOrd, Ord, ::prost::Enumeration)]
4954
#[repr(i32)]
5055
pub enum CollectPaymentStatus {
@@ -177,7 +182,8 @@ pub mod gateway_dips_service_client {
177182
self
178183
}
179184
/// *
180-
/// Cancel an _indexing agreement_.
185+
///
186+
/// Cancel an *indexing agreement*.
181187
///
182188
/// This method allows the indexer to notify the DIPs gateway that the agreement
183189
/// should be canceled.
@@ -196,7 +202,7 @@ pub mod gateway_dips_service_client {
196202
format!("Service was not ready: {}", e.into()),
197203
)
198204
})?;
199-
let codec = tonic::codec::ProstCodec::default();
205+
let codec = tonic_prost::ProstCodec::default();
200206
let path = http::uri::PathAndQuery::from_static(
201207
"/graphprotocol.gateway.dips.GatewayDipsService/CancelAgreement",
202208
);
@@ -211,7 +217,8 @@ pub mod gateway_dips_service_client {
211217
self.inner.unary(req, path, codec).await
212218
}
213219
/// *
214-
/// Collect payment for an _indexing agreement_.
220+
///
221+
/// Collect payment for an *indexing agreement*.
215222
///
216223
/// This method allows the indexer to report the work completed to the DIPs gateway
217224
/// and receive payment for the indexing work done.
@@ -230,7 +237,7 @@ pub mod gateway_dips_service_client {
230237
format!("Service was not ready: {}", e.into()),
231238
)
232239
})?;
233-
let codec = tonic::codec::ProstCodec::default();
240+
let codec = tonic_prost::ProstCodec::default();
234241
let path = http::uri::PathAndQuery::from_static(
235242
"/graphprotocol.gateway.dips.GatewayDipsService/CollectPayment",
236243
);
@@ -260,7 +267,8 @@ pub mod gateway_dips_service_server {
260267
#[async_trait]
261268
pub trait GatewayDipsService: std::marker::Send + std::marker::Sync + 'static {
262269
/// *
263-
/// Cancel an _indexing agreement_.
270+
///
271+
/// Cancel an *indexing agreement*.
264272
///
265273
/// This method allows the indexer to notify the DIPs gateway that the agreement
266274
/// should be canceled.
@@ -272,7 +280,8 @@ pub mod gateway_dips_service_server {
272280
tonic::Status,
273281
>;
274282
/// *
275-
/// Collect payment for an _indexing agreement_.
283+
///
284+
/// Collect payment for an *indexing agreement*.
276285
///
277286
/// This method allows the indexer to report the work completed to the DIPs gateway
278287
/// and receive payment for the indexing work done.
@@ -391,7 +400,7 @@ pub mod gateway_dips_service_server {
391400
let inner = self.inner.clone();
392401
let fut = async move {
393402
let method = CancelAgreementSvc(inner);
394-
let codec = tonic::codec::ProstCodec::default();
403+
let codec = tonic_prost::ProstCodec::default();
395404
let mut grpc = tonic::server::Grpc::new(codec)
396405
.apply_compression_config(
397406
accept_compression_encodings,
@@ -437,7 +446,7 @@ pub mod gateway_dips_service_server {
437446
let inner = self.inner.clone();
438447
let fut = async move {
439448
let method = CollectPaymentSvc(inner);
440-
let codec = tonic::codec::ProstCodec::default();
449+
let codec = tonic_prost::ProstCodec::default();
441450
let mut grpc = tonic::server::Grpc::new(codec)
442451
.apply_compression_config(
443452
accept_compression_encodings,

0 commit comments

Comments
 (0)