companion for paritytech/polkadot#6161 (#2151)

* Add an RPC call to request `ExecutorParams`

* update lockfile for {"substrate", "polkadot"}

---------

Co-authored-by: parity-processbot <>
This commit is contained in:
s0me0ne-unkn0wnandparity-processbot authored and GitHub committed 2023-02-15 12:10:00 +00:00
1 parent d12a8a8c69
commit f2deedfa00
3 files changed
+288 -259

No files matched your search

Generated
+258 -254
View File
File diff suppressed because it is too large. Load diff
@@ -261,6 +261,17 @@ impl RuntimeApiSubsystemClient for BlockChainRpcClient {
Ok(self.rpc_client.parachain_host_session_info_before_version_2(at, index).await?) Ok(self.rpc_client.parachain_host_session_info_before_version_2(at, index).await?)
} }
async fn session_executor_params(
&self,
at: Hash,
session_index: polkadot_primitives::SessionIndex,
) -> Result<Option<polkadot_primitives::vstaging::ExecutorParams>, sp_api::ApiError> {
Ok(self
.rpc_client
.parachain_host_session_executor_params(at, session_index)
.await?)
}
async fn submit_pvf_check_statement( async fn submit_pvf_check_statement(
&self, &self,
at: Hash, at: Hash,
@@ -17,11 +17,11 @@
use crate::reconnecting_ws_client::ReconnectingWsClient; use crate::reconnecting_ws_client::ReconnectingWsClient;
use cumulus_primitives_core::{ use cumulus_primitives_core::{
relay_chain::{ relay_chain::{
CandidateCommitments, CandidateEvent, CandidateHash, CommittedCandidateReceipt, CoreState, vstaging::ExecutorParams, CandidateCommitments, CandidateEvent, CandidateHash,
DisputeState, GroupRotationInfo, Hash as RelayHash, Header as RelayHeader, CommittedCandidateReceipt, CoreState, DisputeState, GroupRotationInfo, Hash as RelayHash,
InboundHrmpMessage, OccupiedCoreAssumption, OldV1SessionInfo, PvfCheckStatement, Header as RelayHeader, InboundHrmpMessage, OccupiedCoreAssumption, OldV1SessionInfo,
ScrapedOnChainVotes, SessionIndex, SessionInfo, ValidationCode, ValidationCodeHash, PvfCheckStatement, ScrapedOnChainVotes, SessionIndex, SessionInfo, ValidationCode,
ValidatorId, ValidatorIndex, ValidatorSignature, ValidationCodeHash, ValidatorId, ValidatorIndex, ValidatorSignature,
}, },
InboundDownwardMessage, ParaId, PersistedValidationData, InboundDownwardMessage, ParaId, PersistedValidationData,
}; };
@@ -388,6 +388,20 @@ impl RelayChainRpcClient {
.await .await
} }
/// Get the executor parameters for the given session, if stored
pub async fn parachain_host_session_executor_params(
&self,
at: RelayHash,
session_index: SessionIndex,
) -> Result<Option<ExecutorParams>, RelayChainError> {
self.call_remote_runtime_function(
"ParachainHost_session_executor_params",
at,
Some(session_index),
)
.await
}
/// Get header at specified hash /// Get header at specified hash
pub async fn chain_get_header( pub async fn chain_get_header(
&self, &self,