diff --git a/bridges/bin/rialto/runtime/src/lib.rs b/bridges/bin/rialto/runtime/src/lib.rs index aeb0a3a7c5749..b325332acba5c 100644 --- a/bridges/bin/rialto/runtime/src/lib.rs +++ b/bridges/bin/rialto/runtime/src/lib.rs @@ -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, Config}, SessionInfo: polkadot_runtime_parachains::session_info::{Pallet, Storage}, diff --git a/bridges/relays/client-substrate/Cargo.toml b/bridges/relays/client-substrate/Cargo.toml index 2a79832bf9d64..90904ab9be11f 100644 --- a/bridges/relays/client-substrate/Cargo.toml +++ b/bridges/relays/client-substrate/Cargo.toml @@ -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" diff --git a/bridges/relays/client-substrate/src/client.rs b/bridges/relays/client-substrate/src/client.rs index 27af7d7d77f74..91ff7b9a214d4 100644 --- a/bridges/relays/client-substrate/src/client.rs +++ b/bridges/relays/client-substrate/src/client.rs @@ -231,7 +231,7 @@ impl Client { 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 }) diff --git a/bridges/relays/client-substrate/src/error.rs b/bridges/relays/client-substrate/src/error.rs index 54247c5dc1768..40015c122bbe9 100644 --- a/bridges/relays/client-substrate/src/error.rs +++ b/bridges/relays/client-substrate/src/error.rs @@ -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(), diff --git a/bridges/relays/client-substrate/src/rpc.rs b/bridges/relays/client-substrate/src/rpc.rs index 083b1dea761a1..94726e49187ab 100644 --- a/bridges/relays/client-substrate/src/rpc.rs +++ b/bridges/relays/client-substrate/src/rpc.rs @@ -73,7 +73,7 @@ pub(crate) trait SubstrateAuthor { async fn pending_extrinsics(&self) -> RpcResult>; /// Submit and watch for extrinsic state. #[subscription(name = "submitAndWatchExtrinsic", unsubscribe = "unwatchExtrinsic", item = TransactionStatusOf)] - 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. @@ -118,7 +118,7 @@ pub trait SubstrateFinalityClient { pub(crate) trait SubstrateGrandpa { /// 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. @@ -136,7 +136,7 @@ impl SubstrateFinalityClient for SubstrateGrandpaFinalit pub(crate) trait SubstrateBeefy { /// 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.