Skip to content
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
4 changes: 2 additions & 2 deletions Cargo.toml
Original file line number Diff line number Diff line change
Expand Up @@ -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"
Expand Down
8 changes: 5 additions & 3 deletions tap_aggregator/src/server.rs
Original file line number Diff line number Diff line change
Expand Up @@ -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};
Expand Down Expand Up @@ -459,12 +459,14 @@ fn create_json_rpc_service(
max_response_body_size: u32,
max_concurrent_connections: u32,
) -> Result<(TowerService<Identity, Identity>, 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);
Expand Down
1 change: 0 additions & 1 deletion tap_core/Cargo.toml
Original file line number Diff line number Diff line change
Expand Up @@ -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"]
Expand Down
5 changes: 3 additions & 2 deletions tap_integration_tests/tests/indexer_mock.rs
Original file line number Diff line number Diff line change
Expand Up @@ -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;
Expand Down Expand Up @@ -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()?;
Expand Down