mirror of
https://github.com/pezkuwichain/pezkuwi-subxt.git
synced 2026-05-08 15:58:02 +00:00
Companion for https://github.com/paritytech/polkadot/pull/7341 (#2726)
* Companion to enabling past session slashing on production.
* update lockfile for {"substrate", "polkadot"}
---------
Co-authored-by: eskimor <eskimor@no-such-url.com>
Co-authored-by: parity-processbot <>
This commit is contained in:
Generated
+262
-262
File diff suppressed because it is too large
Load Diff
@@ -21,7 +21,7 @@ use cumulus_relay_chain_rpc_interface::RelayChainRpcClient;
|
||||
use futures::{Stream, StreamExt};
|
||||
use polkadot_core_primitives::{Block, BlockNumber, Hash, Header};
|
||||
use polkadot_overseer::RuntimeApiSubsystemClient;
|
||||
use polkadot_primitives::vstaging;
|
||||
use polkadot_primitives::slashing;
|
||||
use sc_authority_discovery::{AuthorityDiscovery, Error as AuthorityDiscoveryError};
|
||||
use sp_api::{ApiError, RuntimeApiInfo};
|
||||
|
||||
@@ -308,7 +308,7 @@ impl RuntimeApiSubsystemClient for BlockChainRpcClient {
|
||||
Vec<(
|
||||
polkadot_primitives::SessionIndex,
|
||||
polkadot_primitives::CandidateHash,
|
||||
vstaging::slashing::PendingSlashes,
|
||||
slashing::PendingSlashes,
|
||||
)>,
|
||||
ApiError,
|
||||
> {
|
||||
@@ -319,15 +319,15 @@ impl RuntimeApiSubsystemClient for BlockChainRpcClient {
|
||||
&self,
|
||||
at: Hash,
|
||||
validator_id: polkadot_primitives::ValidatorId,
|
||||
) -> Result<Option<vstaging::slashing::OpaqueKeyOwnershipProof>, ApiError> {
|
||||
) -> Result<Option<slashing::OpaqueKeyOwnershipProof>, ApiError> {
|
||||
Ok(self.rpc_client.parachain_host_key_ownership_proof(at, validator_id).await?)
|
||||
}
|
||||
|
||||
async fn submit_report_dispute_lost(
|
||||
&self,
|
||||
at: Hash,
|
||||
dispute_proof: vstaging::slashing::DisputeProof,
|
||||
key_ownership_proof: vstaging::slashing::OpaqueKeyOwnershipProof,
|
||||
dispute_proof: slashing::DisputeProof,
|
||||
key_ownership_proof: slashing::OpaqueKeyOwnershipProof,
|
||||
) -> Result<Option<()>, ApiError> {
|
||||
Ok(self
|
||||
.rpc_client
|
||||
|
||||
@@ -30,7 +30,7 @@ use sp_storage::StorageKey;
|
||||
|
||||
use cumulus_primitives_core::{
|
||||
relay_chain::{
|
||||
vstaging, BlockNumber, CandidateCommitments, CandidateEvent, CandidateHash,
|
||||
slashing, BlockNumber, CandidateCommitments, CandidateEvent, CandidateHash,
|
||||
CommittedCandidateReceipt, CoreState, DisputeState, ExecutorParams, GroupRotationInfo,
|
||||
Hash as RelayHash, Header as RelayHeader, InboundHrmpMessage, OccupiedCoreAssumption,
|
||||
PvfCheckStatement, ScrapedOnChainVotes, SessionIndex, SessionInfo, ValidationCode,
|
||||
@@ -334,10 +334,7 @@ impl RelayChainRpcClient {
|
||||
pub async fn parachain_host_unapplied_slashes(
|
||||
&self,
|
||||
at: RelayHash,
|
||||
) -> Result<
|
||||
Vec<(SessionIndex, CandidateHash, vstaging::slashing::PendingSlashes)>,
|
||||
RelayChainError,
|
||||
> {
|
||||
) -> Result<Vec<(SessionIndex, CandidateHash, slashing::PendingSlashes)>, RelayChainError> {
|
||||
self.call_remote_runtime_function("ParachainHost_unapplied_slashes", at, None::<()>)
|
||||
.await
|
||||
}
|
||||
@@ -349,7 +346,7 @@ impl RelayChainRpcClient {
|
||||
&self,
|
||||
at: RelayHash,
|
||||
validator_id: ValidatorId,
|
||||
) -> Result<Option<vstaging::slashing::OpaqueKeyOwnershipProof>, RelayChainError> {
|
||||
) -> Result<Option<slashing::OpaqueKeyOwnershipProof>, RelayChainError> {
|
||||
self.call_remote_runtime_function(
|
||||
"ParachainHost_key_ownership_proof",
|
||||
at,
|
||||
@@ -365,8 +362,8 @@ impl RelayChainRpcClient {
|
||||
pub async fn parachain_host_submit_report_dispute_lost(
|
||||
&self,
|
||||
at: RelayHash,
|
||||
dispute_proof: vstaging::slashing::DisputeProof,
|
||||
key_ownership_proof: vstaging::slashing::OpaqueKeyOwnershipProof,
|
||||
dispute_proof: slashing::DisputeProof,
|
||||
key_ownership_proof: slashing::OpaqueKeyOwnershipProof,
|
||||
) -> Result<Option<()>, RelayChainError> {
|
||||
self.call_remote_runtime_function(
|
||||
"ParachainHost_submit_report_dispute_lost",
|
||||
|
||||
@@ -36,7 +36,7 @@ decl_test_relay_chains! {
|
||||
Sudo: westend_runtime::Sudo,
|
||||
}
|
||||
},
|
||||
#[api_version(4)]
|
||||
#[api_version(5)]
|
||||
pub struct Polkadot {
|
||||
genesis = polkadot::genesis(),
|
||||
on_init = (),
|
||||
@@ -55,7 +55,7 @@ decl_test_relay_chains! {
|
||||
XcmPallet: polkadot_runtime::XcmPallet,
|
||||
}
|
||||
},
|
||||
#[api_version(4)]
|
||||
#[api_version(5)]
|
||||
pub struct Kusama {
|
||||
genesis = kusama::genesis(),
|
||||
on_init = (),
|
||||
|
||||
Reference in New Issue
Block a user