Skip to content

Commit

Permalink
[relay-substrate-client] Bump jsonrpsee (paritytech#2066)
Browse files Browse the repository at this point in the history
  • Loading branch information
serban300 committed Apr 10, 2024
1 parent 6d27a11 commit 5ad098d
Show file tree
Hide file tree
Showing 5 changed files with 11 additions and 13 deletions.
2 changes: 1 addition & 1 deletion bridges/bin/rialto/runtime/src/lib.rs
Original file line number Diff line number Diff line change
Expand Up @@ -495,7 +495,7 @@ construct_runtime!(
Scheduler: polkadot_runtime_parachains::scheduler::{Pallet, Storage},
Paras: polkadot_runtime_parachains::paras::{Pallet, Call, Storage, Event, Config},
Initializer: polkadot_runtime_parachains::initializer::{Pallet, Call, Storage},
Dmp: polkadot_runtime_parachains::dmp::{Pallet, Call, Storage},
Dmp: polkadot_runtime_parachains::dmp::{Pallet, Storage},
Ump: polkadot_runtime_parachains::ump::{Pallet, Call, Storage, Event},
Hrmp: polkadot_runtime_parachains::hrmp::{Pallet, Call, Storage, Event<T>, Config},
SessionInfo: polkadot_runtime_parachains::session_info::{Pallet, Storage},
Expand Down
2 changes: 1 addition & 1 deletion bridges/relays/client-substrate/Cargo.toml
Original file line number Diff line number Diff line change
Expand Up @@ -10,7 +10,7 @@ async-std = { version = "1.6.5", features = ["attributes"] }
async-trait = "0.1"
codec = { package = "parity-scale-codec", version = "3.1.5" }
futures = "0.3.28"
jsonrpsee = { version = "0.16", features = ["macros", "ws-client"] }
jsonrpsee = { version = "0.17", features = ["macros", "ws-client"] }
log = "0.4.17"
num-traits = "0.2"
rand = "0.8"
Expand Down
2 changes: 1 addition & 1 deletion bridges/relays/client-substrate/src/client.rs
Original file line number Diff line number Diff line change
Expand Up @@ -231,7 +231,7 @@ impl<C: Chain> Client<C> {
let client = tokio
.spawn(async move {
RpcClientBuilder::default()
.max_notifs_per_subscription(MAX_SUBSCRIPTION_CAPACITY)
.max_buffer_capacity_per_subscription(MAX_SUBSCRIPTION_CAPACITY)
.build(&uri)
.await
})
Expand Down
12 changes: 5 additions & 7 deletions bridges/relays/client-substrate/src/error.rs
Original file line number Diff line number Diff line change
Expand Up @@ -138,13 +138,11 @@ impl Error {
impl MaybeConnectionError for Error {
fn is_connection_error(&self) -> bool {
match *self {
Error::RpcError(RpcError::Transport(_))
// right now if connection to the ws server is dropped (after it is already established),
// we're getting this error
| Error::RpcError(RpcError::Internal(_))
| Error::RpcError(RpcError::RestartNeeded(_))
| Error::ClientNotSynced(_) => true,
Error::FailedToReadBestFinalizedHeaderHash { ref error, .. } => error.is_connection_error(),
Error::RpcError(RpcError::Transport(_)) |
Error::RpcError(RpcError::RestartNeeded(_)) |
Error::ClientNotSynced(_) => true,
Error::FailedToReadBestFinalizedHeaderHash { ref error, .. } =>
error.is_connection_error(),
Error::FailedToReadBestHeader { ref error, .. } => error.is_connection_error(),
Error::FailedToReadHeaderByHash { ref error, .. } => error.is_connection_error(),
Error::ErrorExecutingRuntimeCall { ref error, .. } => error.is_connection_error(),
Expand Down
6 changes: 3 additions & 3 deletions bridges/relays/client-substrate/src/rpc.rs
Original file line number Diff line number Diff line change
Expand Up @@ -73,7 +73,7 @@ pub(crate) trait SubstrateAuthor<C> {
async fn pending_extrinsics(&self) -> RpcResult<Vec<Bytes>>;
/// Submit and watch for extrinsic state.
#[subscription(name = "submitAndWatchExtrinsic", unsubscribe = "unwatchExtrinsic", item = TransactionStatusOf<C>)]
fn submit_and_watch_extrinsic(&self, extrinsic: Bytes);
async fn submit_and_watch_extrinsic(&self, extrinsic: Bytes);
}

/// RPC methods of Substrate `state` namespace, that we are using.
Expand Down Expand Up @@ -118,7 +118,7 @@ pub trait SubstrateFinalityClient<C: Chain> {
pub(crate) trait SubstrateGrandpa<C> {
/// Subscribe to GRANDPA justifications.
#[subscription(name = "subscribeJustifications", unsubscribe = "unsubscribeJustifications", item = Bytes)]
fn subscribe_justifications(&self);
async fn subscribe_justifications(&self);
}

/// RPC finality methods of Substrate `grandpa` namespace, that we are using.
Expand All @@ -136,7 +136,7 @@ impl<C: ChainWithGrandpa> SubstrateFinalityClient<C> for SubstrateGrandpaFinalit
pub(crate) trait SubstrateBeefy<C> {
/// Subscribe to BEEFY justifications.
#[subscription(name = "subscribeJustifications", unsubscribe = "unsubscribeJustifications", item = Bytes)]
fn subscribe_justifications(&self);
async fn subscribe_justifications(&self);
}

/// RPC finality methods of Substrate `beefy` namespace, that we are using.
Expand Down

0 comments on commit 5ad098d

Please sign in to comment.