diff --git a/Cargo.toml b/Cargo.toml index d9771990..ac9c129e 100644 --- a/Cargo.toml +++ b/Cargo.toml @@ -32,8 +32,8 @@ criterion = { version = "0.5.1", features = ["async_std"] } futures-util = "0.3.31" hyper = { version = "1.6.0", features = ["full"] } insta = { version = "1.42.2", features = ["json"] } -jsonrpsee = { version = "0.24.9", features = ["macros", "server"] } -jsonrpsee-core = "0.24.9" +jsonrpsee = { version = "0.25.1", features = ["macros", "server"] } +jsonrpsee-core = "0.25.1" lazy_static = "1.5.0" log = "0.4.27" prometheus = "0.14.0" diff --git a/tap_aggregator/src/server.rs b/tap_aggregator/src/server.rs index ae3e15c3..c210560e 100644 --- a/tap_aggregator/src/server.rs +++ b/tap_aggregator/src/server.rs @@ -8,7 +8,7 @@ use axum::{error_handling::HandleError, routing::post_service, BoxError, Router} use hyper::StatusCode; use jsonrpsee::{ proc_macros::rpc, - server::{ServerBuilder, ServerHandle, TowerService}, + server::{ServerBuilder, ServerConfig, ServerHandle, TowerService}, }; use lazy_static::lazy_static; use log::{error, info}; @@ -459,12 +459,14 @@ fn create_json_rpc_service( max_response_body_size: u32, max_concurrent_connections: u32, ) -> Result<(TowerService, ServerHandle)> { - let service_builder = ServerBuilder::new() + let config = ServerConfig::builder() .max_request_body_size(max_request_body_size) .max_response_body_size(max_response_body_size) .max_connections(max_concurrent_connections) .http_only() - .to_service_builder(); + .build(); + + let service_builder = ServerBuilder::new().set_config(config).to_service_builder(); use jsonrpsee::server::stop_channel; let (stop_handle, server_handle) = stop_channel(); let handle = service_builder.build(rpc_impl.into_rpc(), stop_handle); diff --git a/tap_core/Cargo.toml b/tap_core/Cargo.toml index e62a7fb8..f2cd5ba5 100644 --- a/tap_core/Cargo.toml +++ b/tap_core/Cargo.toml @@ -23,7 +23,6 @@ criterion.workspace = true insta.workspace = true rstest.workspace = true serde_json.workspace = true -thegraph-core = { workspace = true, features = ["alloy-signer-mnemonic"] } [features] default = ["in_memory"] diff --git a/tap_integration_tests/tests/indexer_mock.rs b/tap_integration_tests/tests/indexer_mock.rs index 4edc737d..7baa6e27 100644 --- a/tap_integration_tests/tests/indexer_mock.rs +++ b/tap_integration_tests/tests/indexer_mock.rs @@ -11,7 +11,7 @@ use jsonrpsee::{ http_client::{HttpClient, HttpClientBuilder}, proc_macros::rpc, rpc_params, - server::{ServerBuilder, ServerHandle}, + server::{ServerBuilder, ServerConfig, ServerHandle}, }; use jsonrpsee_core::client::ClientT; use tap_aggregator::jsonrpsee_helpers; @@ -163,8 +163,9 @@ where { // Setting up the JSON RPC server println!("Starting server..."); + let server_config = ServerConfig::builder().http_only().build(); let server = ServerBuilder::new() - .http_only() + .set_config(server_config) .build(format!("127.0.0.1:{}", port)) .await?; let addr = server.local_addr()?;