Skip to content
This repository was archived by the owner on Nov 15, 2023. It is now read-only.
Merged
Show file tree
Hide file tree
Changes from 1 commit
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
11 changes: 11 additions & 0 deletions client/relay-chain-minimal-node/src/blockchain_rpc_client.rs
Original file line number Diff line number Diff line change
Expand Up @@ -261,6 +261,17 @@ impl RuntimeApiSubsystemClient for BlockChainRpcClient {
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(
&self,
at: Hash,
Expand Down
24 changes: 19 additions & 5 deletions client/relay-chain-rpc-interface/src/rpc_client.rs
Original file line number Diff line number Diff line change
Expand Up @@ -17,11 +17,11 @@
use crate::reconnecting_ws_client::ReconnectingWsClient;
use cumulus_primitives_core::{
relay_chain::{
CandidateCommitments, CandidateEvent, CandidateHash, CommittedCandidateReceipt, CoreState,
DisputeState, GroupRotationInfo, Hash as RelayHash, Header as RelayHeader,
InboundHrmpMessage, OccupiedCoreAssumption, OldV1SessionInfo, PvfCheckStatement,
ScrapedOnChainVotes, SessionIndex, SessionInfo, ValidationCode, ValidationCodeHash,
ValidatorId, ValidatorIndex, ValidatorSignature,
vstaging::ExecutorParams, CandidateCommitments, CandidateEvent, CandidateHash,
CommittedCandidateReceipt, CoreState, DisputeState, GroupRotationInfo, Hash as RelayHash,
Header as RelayHeader, InboundHrmpMessage, OccupiedCoreAssumption, OldV1SessionInfo,
PvfCheckStatement, ScrapedOnChainVotes, SessionIndex, SessionInfo, ValidationCode,
ValidationCodeHash, ValidatorId, ValidatorIndex, ValidatorSignature,
},
InboundDownwardMessage, ParaId, PersistedValidationData,
};
Expand Down Expand Up @@ -388,6 +388,20 @@ impl RelayChainRpcClient {
.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
pub async fn chain_get_header(
&self,
Expand Down