Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

chore: bump jsonrpsee #244

Merged
merged 1 commit into from
Oct 17, 2024
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 @@ -12,7 +12,7 @@ repository = "https://github.com/semiotic-ai/timeline-aggregation-protocol"
alloy = { version = "0.4.2", features = ["full"] }
serde = { version = "1.0.163", features = ["derive"] }
rstest = "0.22.0"
anyhow = { version = "1.0.70", default-features = false }
anyhow = { version = "1.0.89" }
tokio = { version = "1.40.0", features = ["macros", "signal"] }
rand = "0.8.5"
jsonrpsee = { version = "0.18.0", features = ["macros", "server"] }
jsonrpsee = { version = "0.24.7", features = ["macros", "server"] }
13 changes: 7 additions & 6 deletions tap_aggregator/Cargo.toml
Original file line number Diff line number Diff line change
Expand Up @@ -25,16 +25,17 @@ tracing-subscriber = "0.3.17"
log = "0.4.19"
prometheus = "0.13.3"
axum = { version = "0.7.5", features = [
"http1",
"json",
"matched-path",
"original-uri",
"query",
"tokio",
"http1",
"json",
"matched-path",
"original-uri",
"query",
"tokio",
], default-features = false }
futures-util = "0.3.28"
lazy_static = "1.4.0"
ruint = "1.10.1"
tower = { version = "0.4", features = ["util"] }

[dev-dependencies]
jsonrpsee = { workspace = true, features = ["http-client", "jsonrpsee-core"] }
Expand Down
10 changes: 5 additions & 5 deletions tap_aggregator/src/server.rs
Original file line number Diff line number Diff line change
Expand Up @@ -233,7 +233,7 @@ pub async fn run_server(
accepted_addresses,
domain_separator,
};
let handle = server.start(rpc_impl.into_rpc())?;
let handle = server.start(rpc_impl.into_rpc());
Ok((handle, addr))
}

Expand Down Expand Up @@ -547,7 +547,7 @@ mod tests {
// Create RAV through the JSON-RPC server.
let res: Result<
server::JsonRpcResponse<EIP712SignedMessage<ReceiptAggregateVoucher>>,
jsonrpsee::core::Error,
jsonrpsee::core::ClientError,
> = client
.request(
"aggregate_receipts",
Expand All @@ -566,7 +566,7 @@ mod tests {

// Check the API versions returned by the server
match res.expect_err("Expected an error") {
jsonrpsee::core::Error::Call(err) => {
jsonrpsee::core::ClientError::Call(err) => {
let versions: server::TapRpcApiVersionsInfo =
serde_json::from_str(err.data().unwrap().get()).unwrap();
assert!(versions
Expand Down Expand Up @@ -645,7 +645,7 @@ mod tests {
// Test with a number of receipts that stays within request size limit
let res: Result<
server::JsonRpcResponse<EIP712SignedMessage<ReceiptAggregateVoucher>>,
jsonrpsee::core::Error,
jsonrpsee::core::ClientError,
> = client
.request(
"aggregate_receipts",
Expand All @@ -662,7 +662,7 @@ mod tests {
// Test with all receipts to exceed request size limit
let res: Result<
server::JsonRpcResponse<EIP712SignedMessage<ReceiptAggregateVoucher>>,
jsonrpsee::core::Error,
jsonrpsee::core::ClientError,
> = client
.request(
"aggregate_receipts",
Expand Down
2 changes: 1 addition & 1 deletion tap_integration_tests/tests/indexer_mock.rs
Original file line number Diff line number Diff line change
Expand Up @@ -167,7 +167,7 @@ where
aggregate_server_api_version,
)?;

let handle = server.start(rpc_manager.into_rpc())?;
let handle = server.start(rpc_manager.into_rpc());
Ok((handle, addr))
}

Expand Down
8 changes: 4 additions & 4 deletions tap_integration_tests/tests/showcase.rs
Original file line number Diff line number Diff line change
Expand Up @@ -572,7 +572,7 @@ async fn test_manager_wrong_aggregator_keys(

let mut counter = 1;
for receipt_1 in requests_1 {
let result: Result<(), jsonrpsee::core::Error> =
let result: Result<(), jsonrpsee::core::ClientError> =
client_1.request("request", (receipt_1,)).await;
// The rav request is being made with messages that have been signed with a key that differs from the sender aggregator's.
// So the Sender Aggregator should send an error to the requesting Indexer.
Expand Down Expand Up @@ -612,7 +612,7 @@ async fn test_manager_wrong_requestor_keys(
let client_1 = HttpClientBuilder::default().build(indexer_1_address)?;

for receipt_1 in wrong_requests {
let result: Result<(), jsonrpsee::core::Error> =
let result: Result<(), jsonrpsee::core::ClientError> =
client_1.request("request", (receipt_1,)).await;
// The receipts have been signed with a key that the Indexer is not expecting.
// This is one of the initial tests, so it should fail to receive the receipt
Expand Down Expand Up @@ -657,7 +657,7 @@ async fn test_tap_manager_rav_timestamp_cuttoff(

let mut counter = 1;
for receipt_1 in repeated_timestamp_request {
let result: Result<(), jsonrpsee::core::Error> =
let result: Result<(), jsonrpsee::core::ClientError> =
client_1.request("request", (receipt_1,)).await;

// The first receipt in the second batch has the same timestamp as the last receipt in the first batch.
Expand Down Expand Up @@ -732,7 +732,7 @@ async fn test_tap_aggregator_rav_timestamp_cuttoff(
);
let second_rav_response: Result<
jsonrpsee_helpers::JsonRpcResponse<SignedRAV>,
jsonrpsee::core::Error,
jsonrpsee::core::ClientError,
> = client.request("aggregate_receipts", params).await;
assert!(
second_rav_response.is_err(),
Expand Down
Loading