Skip to content

Commit 9b40688

Browse files
committed
feat: update tap, axum, tonic, alloy dependencies:
1 parent 6c82693 commit 9b40688

File tree

8 files changed

+1174
-1066
lines changed

8 files changed

+1174
-1066
lines changed

Cargo.lock

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

Cargo.toml

Lines changed: 8 additions & 20 deletions
Original file line numberDiff line numberDiff line change
@@ -21,7 +21,7 @@ opt-level = 3
2121
[workspace.dependencies]
2222
anyhow = { version = "1.0.72" }
2323
async-trait = "0.1.83"
24-
axum = { version = "0.7.9", default-features = false, features = [
24+
axum = { version = "0.8.3", default-features = false, features = [
2525
"tokio",
2626
"http1",
2727
"http2",
@@ -74,13 +74,13 @@ sqlx = { version = "0.8.2", features = [
7474
"uuid",
7575
], default-features = false }
7676
stdext = "0.3.3"
77-
tap_aggregator = { version = "0.4.0", default-features = false }
78-
tap_core = { version = "3.0.0", default-features = false }
79-
tap_graph = { version = "0.2.0", features = ["v2"] }
77+
tap_aggregator = { version = "0.5.1", default-features = false }
78+
tap_core = { version = "4.1.0", default-features = false }
79+
tap_graph = { version = "0.3.0", features = ["v2"] }
8080
tempfile = "3.8.0"
8181
test-log = { version = "0.2.12", default-features = false }
8282
test-with = "0.14.6"
83-
thegraph-core = { version = "0.11.0", features = [
83+
thegraph-core = { version = "0.14.0", features = [
8484
"attestation",
8585
"alloy-eip712",
8686
"alloy-sol-types",
@@ -94,8 +94,8 @@ thegraph-graphql-http = { version = "0.3.2", features = ["reqwest"] }
9494
thiserror = "1.0.49"
9595
tokio = "1.40"
9696
tokio-test = "0.4.4"
97-
tonic = { version = "0.12.3", features = ["tls-roots", "gzip"] }
98-
tonic-build = "0.12.3"
97+
tonic = { version = "0.13.0", features = ["tls-native-roots", "gzip"] }
98+
tonic-build = "0.13.0"
9999
tower-service = "0.3.3"
100100
tower-test = "0.4.0"
101101
tracing = { version = "0.1.40", default-features = false }
@@ -106,19 +106,7 @@ tracing-subscriber = { version = "0.3", features = [
106106
], default-features = false }
107107
uuid = { version = "1.11.0", features = ["v7"] }
108108
wiremock = "0.6.1"
109-
wiremock-grpc = "0.0.3-alpha3"
110-
111-
[patch.crates-io.tap_core]
112-
git = "https://github.com/semiotic-ai/timeline-aggregation-protocol"
113-
rev = "9fd4beb"
114-
115-
[patch.crates-io.tap_aggregator]
116-
git = "https://github.com/semiotic-ai/timeline-aggregation-protocol"
117-
rev = "9fd4beb"
118-
119-
[patch.crates-io.tap_graph]
120-
git = "https://github.com/semiotic-ai/timeline-aggregation-protocol"
121-
rev = "9fd4beb"
109+
wiremock-grpc = { git = "https://github.com/semiotic-ai/wiremock-grpc-rs.git", branch = "main" }
122110

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

crates/dips/src/database.rs

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -38,10 +38,10 @@ impl AgreementStore for PsqlAgreementStore {
3838
Err(err) => return Err(DipsError::UnknownError(err.into())),
3939
};
4040

41-
let signed = SignedIndexingAgreementVoucher::abi_decode(item.signed_payload.as_ref(), true)
41+
let signed = SignedIndexingAgreementVoucher::abi_decode(item.signed_payload.as_ref())
4242
.map_err(|e| DipsError::AbiDecoding(e.to_string()))?;
4343
let metadata =
44-
SubgraphIndexingVoucherMetadata::abi_decode(signed.voucher.metadata.as_ref(), true)
44+
SubgraphIndexingVoucherMetadata::abi_decode(signed.voucher.metadata.as_ref())
4545
.map_err(|e| DipsError::AbiDecoding(e.to_string()))?;
4646
let cancelled = item.cancelled_at.is_some();
4747
Ok(Some(StoredIndexingAgreement {

crates/dips/src/lib.rs

Lines changed: 7 additions & 12 deletions
Original file line numberDiff line numberDiff line change
@@ -6,9 +6,7 @@ use std::{str::FromStr, sync::Arc};
66
use server::DipsServerContext;
77
use thegraph_core::alloy::{
88
core::primitives::Address,
9-
primitives::{
10-
b256, ruint::aliases::U256, ChainId, PrimitiveSignature as Signature, Uint, B256,
11-
},
9+
primitives::{b256, ruint::aliases::U256, ChainId, Signature, Uint, B256},
1210
signers::SignerSync,
1311
sol,
1412
sol_types::{eip712_domain, Eip712Domain, SolStruct, SolValue},
@@ -315,13 +313,11 @@ pub async fn validate_and_create_agreement(
315313
registry,
316314
additional_networks,
317315
} = ctx.as_ref();
318-
let decoded_voucher = SignedIndexingAgreementVoucher::abi_decode(voucher.as_ref(), true)
316+
let decoded_voucher = SignedIndexingAgreementVoucher::abi_decode(voucher.as_ref())
319317
.map_err(|e| DipsError::AbiDecoding(e.to_string()))?;
320-
let metadata = SubgraphIndexingVoucherMetadata::abi_decode(
321-
decoded_voucher.voucher.metadata.as_ref(),
322-
true,
323-
)
324-
.map_err(|e| DipsError::AbiDecoding(e.to_string()))?;
318+
let metadata =
319+
SubgraphIndexingVoucherMetadata::abi_decode(decoded_voucher.voucher.metadata.as_ref())
320+
.map_err(|e| DipsError::AbiDecoding(e.to_string()))?;
325321

326322
decoded_voucher.validate(signer_validator, domain, expected_payee, allowed_payers)?;
327323

@@ -426,9 +422,8 @@ pub async fn validate_and_cancel_agreement(
426422
domain: &Eip712Domain,
427423
cancellation_request: Vec<u8>,
428424
) -> Result<Uuid, DipsError> {
429-
let decoded_request =
430-
SignedCancellationRequest::abi_decode(cancellation_request.as_ref(), true)
431-
.map_err(|e| DipsError::AbiDecoding(e.to_string()))?;
425+
let decoded_request = SignedCancellationRequest::abi_decode(cancellation_request.as_ref())
426+
.map_err(|e| DipsError::AbiDecoding(e.to_string()))?;
432427

433428
// Get the agreement ID from the cancellation request
434429
let agreement_id = Uuid::from_bytes(decoded_request.request.agreement_id.into());

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

Lines changed: 8 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -113,7 +113,7 @@ pub mod gateway_dips_service_client {
113113
}
114114
impl<T> GatewayDipsServiceClient<T>
115115
where
116-
T: tonic::client::GrpcService<tonic::body::BoxBody>,
116+
T: tonic::client::GrpcService<tonic::body::Body>,
117117
T::Error: Into<StdError>,
118118
T::ResponseBody: Body<Data = Bytes> + std::marker::Send + 'static,
119119
<T::ResponseBody as Body>::Error: Into<StdError> + std::marker::Send,
@@ -134,13 +134,13 @@ pub mod gateway_dips_service_client {
134134
F: tonic::service::Interceptor,
135135
T::ResponseBody: Default,
136136
T: tonic::codegen::Service<
137-
http::Request<tonic::body::BoxBody>,
137+
http::Request<tonic::body::Body>,
138138
Response = http::Response<
139-
<T as tonic::client::GrpcService<tonic::body::BoxBody>>::ResponseBody,
139+
<T as tonic::client::GrpcService<tonic::body::Body>>::ResponseBody,
140140
>,
141141
>,
142142
<T as tonic::codegen::Service<
143-
http::Request<tonic::body::BoxBody>,
143+
http::Request<tonic::body::Body>,
144144
>>::Error: Into<StdError> + std::marker::Send + std::marker::Sync,
145145
{
146146
GatewayDipsServiceClient::new(InterceptedService::new(inner, interceptor))
@@ -349,7 +349,7 @@ pub mod gateway_dips_service_server {
349349
B: Body + std::marker::Send + 'static,
350350
B::Error: Into<StdError> + std::marker::Send + 'static,
351351
{
352-
type Response = http::Response<tonic::body::BoxBody>;
352+
type Response = http::Response<tonic::body::Body>;
353353
type Error = std::convert::Infallible;
354354
type Future = BoxFuture<Self::Response, Self::Error>;
355355
fn poll_ready(
@@ -454,7 +454,9 @@ pub mod gateway_dips_service_server {
454454
}
455455
_ => {
456456
Box::pin(async move {
457-
let mut response = http::Response::new(empty_body());
457+
let mut response = http::Response::new(
458+
tonic::body::Body::default(),
459+
);
458460
let headers = response.headers_mut();
459461
headers
460462
.insert(

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

Lines changed: 8 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -99,7 +99,7 @@ pub mod indexer_dips_service_client {
9999
}
100100
impl<T> IndexerDipsServiceClient<T>
101101
where
102-
T: tonic::client::GrpcService<tonic::body::BoxBody>,
102+
T: tonic::client::GrpcService<tonic::body::Body>,
103103
T::Error: Into<StdError>,
104104
T::ResponseBody: Body<Data = Bytes> + std::marker::Send + 'static,
105105
<T::ResponseBody as Body>::Error: Into<StdError> + std::marker::Send,
@@ -120,13 +120,13 @@ pub mod indexer_dips_service_client {
120120
F: tonic::service::Interceptor,
121121
T::ResponseBody: Default,
122122
T: tonic::codegen::Service<
123-
http::Request<tonic::body::BoxBody>,
123+
http::Request<tonic::body::Body>,
124124
Response = http::Response<
125-
<T as tonic::client::GrpcService<tonic::body::BoxBody>>::ResponseBody,
125+
<T as tonic::client::GrpcService<tonic::body::Body>>::ResponseBody,
126126
>,
127127
>,
128128
<T as tonic::codegen::Service<
129-
http::Request<tonic::body::BoxBody>,
129+
http::Request<tonic::body::Body>,
130130
>>::Error: Into<StdError> + std::marker::Send + std::marker::Sync,
131131
{
132132
IndexerDipsServiceClient::new(InterceptedService::new(inner, interceptor))
@@ -327,7 +327,7 @@ pub mod indexer_dips_service_server {
327327
B: Body + std::marker::Send + 'static,
328328
B::Error: Into<StdError> + std::marker::Send + 'static,
329329
{
330-
type Response = http::Response<tonic::body::BoxBody>;
330+
type Response = http::Response<tonic::body::Body>;
331331
type Error = std::convert::Infallible;
332332
type Future = BoxFuture<Self::Response, Self::Error>;
333333
fn poll_ready(
@@ -437,7 +437,9 @@ pub mod indexer_dips_service_server {
437437
}
438438
_ => {
439439
Box::pin(async move {
440-
let mut response = http::Response::new(empty_body());
440+
let mut response = http::Response::new(
441+
tonic::body::Body::default(),
442+
);
441443
let headers = response.headers_mut();
442444
headers
443445
.insert(

crates/service/Cargo.toml

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -42,7 +42,7 @@ tap_graph.workspace = true
4242
tap_aggregator.workspace = true
4343
uuid.workspace = true
4444
bon.workspace = true
45-
tower_governor = { version = "0.5.0", features = ["axum"] }
45+
tower_governor = { version = "0.7.0", features = ["axum"] }
4646
governor = "0.8.0"
4747
tower-http = { version = "0.6.2", features = [
4848
"auth",
@@ -51,7 +51,7 @@ tower-http = { version = "0.6.2", features = [
5151
"trace",
5252
] }
5353
autometrics = { version = "1.0.1", features = ["prometheus-exporter"] }
54-
axum-extra = { version = "0.9.3", features = [
54+
axum-extra = { version = "0.10.1", features = [
5555
"typed-header",
5656
], default-features = false }
5757
tokio-util = "0.7.10"

crates/tap-agent/src/test.rs

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -660,6 +660,7 @@ async fn create_grpc_aggregator() -> (JoinHandle<()>, SocketAddr) {
660660
max_request_body_size,
661661
max_response_body_size,
662662
max_concurrent_connections,
663+
None,
663664
)
664665
.await
665666
.unwrap()

0 commit comments

Comments
 (0)