-
Notifications
You must be signed in to change notification settings - Fork 220
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
feat: add sync rpc client pool to wallet connectivity #3199
feat: add sync rpc client pool to wallet connectivity #3199
Conversation
2dac222
to
4cd68f2
Compare
- add sync pool and `obtain_base_node_sync_rpc_client` - add `get_header` to base node rpc
4cd68f2
to
d7e7be0
Compare
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Hi there, looks good, but I have one concern, noted below.
self.base_node_wallet_rpc_client_pool = Some(pool); | ||
self.pools = Some(ClientPoolContainer { | ||
base_node_sync_rpc_client: conn.create_rpc_client_pool(self.config.base_node_rpc_pool_size), | ||
base_node_wallet_rpc_client: conn.create_rpc_client_pool(self.config.base_node_rpc_pool_size), |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
The base_node_wallet_rpc_client
should have its own pool size configuration setting and not reuse the one from base_node_sync_rpc_client
. Both pool size values should be present in the config.toml
configuration file for case by case tuning. A busy console wallet needs to carry out much more than base_node_rpc_pool_size: 10,
conversations in parallel, specifically where the base_node_wallet_rpc_client
is concerned, if it is going to be used for the transaction monitoring protocols.
@@ -68,7 +69,7 @@ impl WalletConnectivityHandle { | |||
/// node/nodes. It will be block until this is happens. The ONLY other time it will return is if the node is |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
/// node/nodes. It will be block until this is happens. The ONLY other time it will return is if the node is | |
/// node/nodes. It will be blocked until this is happening. The ONLY other time it will return is if the node is |
/// Obtain a BaseNodeSyncRpcClient. | ||
/// | ||
/// This can be relied on to obtain a pooled BaseNodeSyncRpcClient rpc session from a currently selected base | ||
/// node/nodes. It will be block until this is happens. The ONLY other time it will return is if the node is |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
/// node/nodes. It will be block until this is happens. The ONLY other time it will return is if the node is | |
/// node/nodes. It will be blocked until this is happening. The ONLY other time it will return is if the node is |
/// node/nodes. It will be block until this is happens. The ONLY other time it will return is if the node is | ||
/// shutting down, where it will return None. Use this function whenever no work can be done without a | ||
/// BaseNodeSyncRpcClient RPC session. | ||
pub async fn obtain_base_node_sync_rpc_client(&mut self) -> Option<RpcClientLease<BaseNodeSyncRpcClient>> { |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Where will this be used in the wallet? Is it for get_chain_metadata
?
Description
obtain_base_node_sync_rpc_client
get_header
to base node rpcMotivation and Context
Useful in #3191
How Has This Been Tested?
Existing unit tests
Checklist:
development
branch.