Skip to content

Commit

Permalink
Update jsonrpsee to forked version to fix the tracing span bug in jso…
Browse files Browse the repository at this point in the history
…nrpsee codebase (MystenLabs#3597)

* update jsonrpsee to forked version to fix the tracing span bug in jsonrpsee codebase

* fix hakari
  • Loading branch information
patrickkuo authored Jul 29, 2022
1 parent bf990b6 commit af2c5ee
Show file tree
Hide file tree
Showing 10 changed files with 48 additions and 57 deletions.
32 changes: 10 additions & 22 deletions Cargo.lock

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

10 changes: 5 additions & 5 deletions crates/sui-json-rpc/Cargo.toml
Original file line number Diff line number Diff line change
Expand Up @@ -7,9 +7,9 @@ publish = false
edition = "2021"

[dependencies]
jsonrpsee = { version = "0.15.0", features = ["full"] }
jsonrpsee-core = "0.15.0"
jsonrpsee-proc-macros = "0.15.0"
jsonrpsee = { git = "https://github.com/patrickkuo/jsonrpsee", features = ["full"] , rev = "76ce4e09537cb58b56e668121c95ea0a760db5fa"}
jsonrpsee-core = { git = "https://github.com/patrickkuo/jsonrpsee" , rev = "76ce4e09537cb58b56e668121c95ea0a760db5fa"}
jsonrpsee-proc-macros = { git = "https://github.com/patrickkuo/jsonrpsee" , rev = "76ce4e09537cb58b56e668121c95ea0a760db5fa"}
prometheus = "0.13.1"
anyhow = "1.0.58"
tracing = "0.1.35"
Expand All @@ -24,5 +24,5 @@ sui-types = { path = "../sui-types" }
sui-json = { path = "../sui-json" }
sui-open-rpc = { path = "../sui-open-rpc" }
sui-open-rpc-macros = { path = "../sui-open-rpc-macros" }
sui-json-rpc-types= { path = "../sui-json-rpc-types" }
workspace-hack = { path = "../workspace-hack"}
sui-json-rpc-types = { path = "../sui-json-rpc-types" }
workspace-hack = { path = "../workspace-hack" }
9 changes: 7 additions & 2 deletions crates/sui-json-rpc/src/lib.rs
Original file line number Diff line number Diff line change
@@ -1,10 +1,12 @@
// Copyright (c) 2022, Mysten Labs, Inc.
// SPDX-License-Identifier: Apache-2.0

use jsonrpsee::http_server::{AccessControlBuilder, HttpServerBuilder, HttpServerHandle};
use jsonrpsee::ws_server::{WsServerBuilder, WsServerHandle};
use jsonrpsee_core::server::access_control::AccessControlBuilder;
use jsonrpsee_core::server::rpc_module::RpcModule;

use crate::http_server::{HttpServerBuilder, HttpServerHandle};
use crate::ws_server::{WsServerBuilder, WsServerHandle};

use jsonrpsee::types::Params;
use jsonrpsee_core::middleware::{Headers, HttpMiddleware, MethodKind, WsMiddleware};
use prometheus::{
Expand All @@ -17,6 +19,9 @@ use std::time::Instant;
use sui_open_rpc::{Module, Project};
use tracing::info;

pub use jsonrpsee::http_server;
pub use jsonrpsee::ws_server;

pub mod api;
pub mod bcs_api;
pub mod event_api;
Expand Down
1 change: 0 additions & 1 deletion crates/sui-node/Cargo.toml
Original file line number Diff line number Diff line change
Expand Up @@ -16,7 +16,6 @@ tokio = { version = "1.20.1", features = ["full"] }
tracing = "0.1.35"
parking_lot = "0.12.1"
futures = "0.3.21"
jsonrpsee = { version = "0.15.0", features = ["full"] }

sui-config = { path = "../sui-config" }
sui-core = { path = "../sui-core" }
Expand Down
6 changes: 3 additions & 3 deletions crates/sui-node/src/lib.rs
Original file line number Diff line number Diff line change
Expand Up @@ -3,8 +3,6 @@

use anyhow::Result;
use futures::TryFutureExt;
use jsonrpsee::http_server::HttpServerHandle;
use jsonrpsee::ws_server::WsServerHandle;
use multiaddr::Multiaddr;
use parking_lot::Mutex;
use prometheus::Registry;
Expand All @@ -23,7 +21,6 @@ use sui_core::{
checkpoints::CheckpointStore,
};
use sui_json_rpc::bcs_api::BcsApiImpl;
use sui_json_rpc::JsonRpcServerBuilder;
use sui_network::api::ValidatorServer;
use sui_storage::{
event_store::{EventStoreType, SqlEventStore},
Expand All @@ -35,8 +32,11 @@ use sui_types::crypto::ToFromBytes;

use sui_json_rpc::event_api::EventReadApiImpl;
use sui_json_rpc::event_api::EventStreamingApiImpl;
use sui_json_rpc::http_server::HttpServerHandle;
use sui_json_rpc::read_api::FullNodeApi;
use sui_json_rpc::read_api::ReadApi;
use sui_json_rpc::ws_server::WsServerHandle;
use sui_json_rpc::JsonRpcServerBuilder;
use sui_types::crypto::{AuthorityPublicKeyBytes, KeypairTraits};

pub mod admin;
Expand Down
2 changes: 1 addition & 1 deletion crates/sui-sdk/Cargo.toml
Original file line number Diff line number Diff line change
Expand Up @@ -9,7 +9,7 @@ edition = "2021"
[dependencies]
anyhow = "1.0.58"
async-trait = "0.1.56"
jsonrpsee = { version = "0.15.0", features = ["full"] }
jsonrpsee = { git = "https://github.com/patrickkuo/jsonrpsee", features = ["full"] , rev = "76ce4e09537cb58b56e668121c95ea0a760db5fa"}
serde = { version = "1.0.140", features = ["derive"] }
serde_json = "1.0.80"
futures-core = "0.3.21"
Expand Down
2 changes: 1 addition & 1 deletion crates/sui/Cargo.toml
Original file line number Diff line number Diff line change
Expand Up @@ -58,7 +58,7 @@ jemalloc-ctl = "^0.5"
[dev-dependencies]
tempfile = "3.3.0"
futures = "0.3.21"
jsonrpsee = { version = "0.15.0", features = ["full"] }
jsonrpsee = { git = "https://github.com/patrickkuo/jsonrpsee", features = ["full"] , rev = "76ce4e09537cb58b56e668121c95ea0a760db5fa"}
typed-store = { git = "https://github.com/MystenLabs/mysten-infra", rev = "123c9e40b529315e1c1d91a54fb717111c3e349c"}
test-utils = { path = "../test-utils" }
sui-quorum-driver = { path = "../sui-quorum-driver" }
Expand Down
3 changes: 1 addition & 2 deletions crates/test-utils/Cargo.toml
Original file line number Diff line number Diff line change
Expand Up @@ -13,8 +13,7 @@ rand = "0.7.3"
tempfile = "3.3.0"
tracing = "0.1.35"
bcs = "0.1.3"
jsonrpsee-http-server = "0.15.0"
jsonrpsee-http-client = "0.15.0"
jsonrpsee-http-client = { git = "https://github.com/patrickkuo/jsonrpsee", rev = "76ce4e09537cb58b56e668121c95ea0a760db5fa"}
prometheus = "0.13.1"
tokio = { version = "1.20.1", features = ["full", "tracing", "test-util"] }
serde_json = "1.0.80"
Expand Down
2 changes: 1 addition & 1 deletion crates/test-utils/src/network.rs
Original file line number Diff line number Diff line change
Expand Up @@ -2,7 +2,6 @@
// SPDX-License-Identifier: Apache-2.0

use jsonrpsee_http_client::{HttpClient, HttpClientBuilder};
use jsonrpsee_http_server::{HttpServerBuilder, HttpServerHandle, RpcModule};
use std::net::SocketAddr;
use std::num::NonZeroUsize;
use std::path::Path;
Expand All @@ -24,6 +23,7 @@ use sui_json_rpc::api::WalletSyncApiServer;
use sui_json_rpc::gateway_api::{
GatewayReadApiImpl, GatewayWalletSyncApiImpl, RpcGatewayImpl, TransactionBuilderImpl,
};
use sui_json_rpc::http_server::{HttpServerBuilder, HttpServerHandle, RpcModule};
use sui_sdk::crypto::{KeystoreType, SuiKeystore};
use sui_swarm::memory::{Swarm, SwarmBuilder};
use sui_types::base_types::SuiAddress;
Expand Down
38 changes: 19 additions & 19 deletions crates/workspace-hack/Cargo.toml
Original file line number Diff line number Diff line change
Expand Up @@ -233,15 +233,15 @@ itoa-9fbad63c4bcf4a8f = { package = "itoa", version = "0.4", features = ["std"]
itoa-dff4ba8e3ae991db = { package = "itoa", version = "1", default-features = false }
js-sys = { version = "0.3", default-features = false }
json = { version = "0.12", default-features = false }
jsonrpsee = { version = "0.15", default-features = false, features = ["async-client", "client", "client-ws-transport", "full", "http-client", "http-server", "jsonrpsee-client-transport", "jsonrpsee-core", "jsonrpsee-http-client", "jsonrpsee-http-server", "jsonrpsee-proc-macros", "jsonrpsee-types", "jsonrpsee-wasm-client", "jsonrpsee-ws-client", "jsonrpsee-ws-server", "macros", "server", "tracing", "wasm-client", "ws-client", "ws-server"] }
jsonrpsee-client-transport = { version = "0.15", default-features = false, features = ["anyhow", "futures-channel", "futures-timer", "futures-util", "gloo-net", "http", "jsonrpsee-types", "pin-project", "rustls-native-certs", "soketto", "thiserror", "tls", "tokio", "tokio-rustls", "tokio-util", "web", "webpki-roots", "ws"] }
jsonrpsee-core = { version = "0.15", features = ["arrayvec", "async-client", "async-lock", "async-wasm-client", "client", "futures-timer", "futures-util", "globset", "http", "http-helpers", "hyper", "lazy_static", "parking_lot", "rand", "rustc-hash", "server", "soketto", "tokio", "tracing-futures", "unicase", "wasm-bindgen-futures"] }
jsonrpsee-http-client = { version = "0.15", features = ["hyper-rustls", "tls"] }
jsonrpsee-http-server = { version = "0.15", default-features = false }
jsonrpsee-types = { version = "0.15", default-features = false }
jsonrpsee-wasm-client = { version = "0.15", default-features = false }
jsonrpsee-ws-client = { version = "0.15", features = ["tls"] }
jsonrpsee-ws-server = { version = "0.15", default-features = false }
jsonrpsee = { git = "https://github.com/patrickkuo/jsonrpsee", rev = "76ce4e09537cb58b56e668121c95ea0a760db5fa", default-features = false, features = ["async-client", "client", "client-ws-transport", "full", "http-client", "http-server", "jsonrpsee-client-transport", "jsonrpsee-core", "jsonrpsee-http-client", "jsonrpsee-http-server", "jsonrpsee-proc-macros", "jsonrpsee-types", "jsonrpsee-wasm-client", "jsonrpsee-ws-client", "jsonrpsee-ws-server", "macros", "server", "tracing", "wasm-client", "ws-client", "ws-server"] }
jsonrpsee-client-transport = { git = "https://github.com/patrickkuo/jsonrpsee", rev = "76ce4e09537cb58b56e668121c95ea0a760db5fa", default-features = false, features = ["anyhow", "futures-channel", "futures-timer", "futures-util", "gloo-net", "http", "jsonrpsee-types", "pin-project", "rustls-native-certs", "soketto", "thiserror", "tls", "tokio", "tokio-rustls", "tokio-util", "web", "webpki-roots", "ws"] }
jsonrpsee-core = { git = "https://github.com/patrickkuo/jsonrpsee", rev = "76ce4e09537cb58b56e668121c95ea0a760db5fa", features = ["arrayvec", "async-client", "async-lock", "async-wasm-client", "client", "futures-timer", "futures-util", "globset", "http", "http-helpers", "hyper", "lazy_static", "parking_lot", "rand", "rustc-hash", "server", "soketto", "tokio", "tracing-futures", "unicase", "wasm-bindgen-futures"] }
jsonrpsee-http-client = { git = "https://github.com/patrickkuo/jsonrpsee", rev = "76ce4e09537cb58b56e668121c95ea0a760db5fa", features = ["hyper-rustls", "tls"] }
jsonrpsee-http-server = { git = "https://github.com/patrickkuo/jsonrpsee", rev = "76ce4e09537cb58b56e668121c95ea0a760db5fa", default-features = false }
jsonrpsee-types = { git = "https://github.com/patrickkuo/jsonrpsee", rev = "76ce4e09537cb58b56e668121c95ea0a760db5fa", default-features = false }
jsonrpsee-wasm-client = { git = "https://github.com/patrickkuo/jsonrpsee", rev = "76ce4e09537cb58b56e668121c95ea0a760db5fa", default-features = false }
jsonrpsee-ws-client = { git = "https://github.com/patrickkuo/jsonrpsee", rev = "76ce4e09537cb58b56e668121c95ea0a760db5fa", features = ["tls"] }
jsonrpsee-ws-server = { git = "https://github.com/patrickkuo/jsonrpsee", rev = "76ce4e09537cb58b56e668121c95ea0a760db5fa", default-features = false }
k256 = { version = "0.11", features = ["arithmetic", "digest", "ecdsa", "ecdsa-core", "keccak256", "pkcs8", "schnorr", "sha2", "sha256", "sha3", "std"] }
keccak = { version = "0.1", default-features = false }
kstring = { version = "1", features = ["max_inline", "serde"] }
Expand Down Expand Up @@ -831,16 +831,16 @@ itoa-dff4ba8e3ae991db = { package = "itoa", version = "1", default-features = fa
jobserver = { version = "0.1", default-features = false }
js-sys = { version = "0.3", default-features = false }
json = { version = "0.12", default-features = false }
jsonrpsee = { version = "0.15", default-features = false, features = ["async-client", "client", "client-ws-transport", "full", "http-client", "http-server", "jsonrpsee-client-transport", "jsonrpsee-core", "jsonrpsee-http-client", "jsonrpsee-http-server", "jsonrpsee-proc-macros", "jsonrpsee-types", "jsonrpsee-wasm-client", "jsonrpsee-ws-client", "jsonrpsee-ws-server", "macros", "server", "tracing", "wasm-client", "ws-client", "ws-server"] }
jsonrpsee-client-transport = { version = "0.15", default-features = false, features = ["anyhow", "futures-channel", "futures-timer", "futures-util", "gloo-net", "http", "jsonrpsee-types", "pin-project", "rustls-native-certs", "soketto", "thiserror", "tls", "tokio", "tokio-rustls", "tokio-util", "web", "webpki-roots", "ws"] }
jsonrpsee-core = { version = "0.15", features = ["arrayvec", "async-client", "async-lock", "async-wasm-client", "client", "futures-timer", "futures-util", "globset", "http", "http-helpers", "hyper", "lazy_static", "parking_lot", "rand", "rustc-hash", "server", "soketto", "tokio", "tracing-futures", "unicase", "wasm-bindgen-futures"] }
jsonrpsee-http-client = { version = "0.15", features = ["hyper-rustls", "tls"] }
jsonrpsee-http-server = { version = "0.15", default-features = false }
jsonrpsee-proc-macros = { version = "0.15", default-features = false }
jsonrpsee-types = { version = "0.15", default-features = false }
jsonrpsee-wasm-client = { version = "0.15", default-features = false }
jsonrpsee-ws-client = { version = "0.15", features = ["tls"] }
jsonrpsee-ws-server = { version = "0.15", default-features = false }
jsonrpsee = { git = "https://github.com/patrickkuo/jsonrpsee", rev = "76ce4e09537cb58b56e668121c95ea0a760db5fa", default-features = false, features = ["async-client", "client", "client-ws-transport", "full", "http-client", "http-server", "jsonrpsee-client-transport", "jsonrpsee-core", "jsonrpsee-http-client", "jsonrpsee-http-server", "jsonrpsee-proc-macros", "jsonrpsee-types", "jsonrpsee-wasm-client", "jsonrpsee-ws-client", "jsonrpsee-ws-server", "macros", "server", "tracing", "wasm-client", "ws-client", "ws-server"] }
jsonrpsee-client-transport = { git = "https://github.com/patrickkuo/jsonrpsee", rev = "76ce4e09537cb58b56e668121c95ea0a760db5fa", default-features = false, features = ["anyhow", "futures-channel", "futures-timer", "futures-util", "gloo-net", "http", "jsonrpsee-types", "pin-project", "rustls-native-certs", "soketto", "thiserror", "tls", "tokio", "tokio-rustls", "tokio-util", "web", "webpki-roots", "ws"] }
jsonrpsee-core = { git = "https://github.com/patrickkuo/jsonrpsee", rev = "76ce4e09537cb58b56e668121c95ea0a760db5fa", features = ["arrayvec", "async-client", "async-lock", "async-wasm-client", "client", "futures-timer", "futures-util", "globset", "http", "http-helpers", "hyper", "lazy_static", "parking_lot", "rand", "rustc-hash", "server", "soketto", "tokio", "tracing-futures", "unicase", "wasm-bindgen-futures"] }
jsonrpsee-http-client = { git = "https://github.com/patrickkuo/jsonrpsee", rev = "76ce4e09537cb58b56e668121c95ea0a760db5fa", features = ["hyper-rustls", "tls"] }
jsonrpsee-http-server = { git = "https://github.com/patrickkuo/jsonrpsee", rev = "76ce4e09537cb58b56e668121c95ea0a760db5fa", default-features = false }
jsonrpsee-proc-macros = { git = "https://github.com/patrickkuo/jsonrpsee", rev = "76ce4e09537cb58b56e668121c95ea0a760db5fa", default-features = false }
jsonrpsee-types = { git = "https://github.com/patrickkuo/jsonrpsee", rev = "76ce4e09537cb58b56e668121c95ea0a760db5fa", default-features = false }
jsonrpsee-wasm-client = { git = "https://github.com/patrickkuo/jsonrpsee", rev = "76ce4e09537cb58b56e668121c95ea0a760db5fa", default-features = false }
jsonrpsee-ws-client = { git = "https://github.com/patrickkuo/jsonrpsee", rev = "76ce4e09537cb58b56e668121c95ea0a760db5fa", features = ["tls"] }
jsonrpsee-ws-server = { git = "https://github.com/patrickkuo/jsonrpsee", rev = "76ce4e09537cb58b56e668121c95ea0a760db5fa", default-features = false }
k256 = { version = "0.11", features = ["arithmetic", "digest", "ecdsa", "ecdsa-core", "keccak256", "pkcs8", "schnorr", "sha2", "sha256", "sha3", "std"] }
keccak = { version = "0.1", default-features = false }
kstring = { version = "1", features = ["max_inline", "serde"] }
Expand Down

0 comments on commit af2c5ee

Please sign in to comment.