mirror of
https://github.com/pezkuwichain/pezkuwi-subxt.git
synced 2026-06-21 22:41: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 futures::{Stream, StreamExt};
|
||||||
use polkadot_core_primitives::{Block, BlockNumber, Hash, Header};
|
use polkadot_core_primitives::{Block, BlockNumber, Hash, Header};
|
||||||
use polkadot_overseer::RuntimeApiSubsystemClient;
|
use polkadot_overseer::RuntimeApiSubsystemClient;
|
||||||
use polkadot_primitives::vstaging;
|
use polkadot_primitives::slashing;
|
||||||
use sc_authority_discovery::{AuthorityDiscovery, Error as AuthorityDiscoveryError};
|
use sc_authority_discovery::{AuthorityDiscovery, Error as AuthorityDiscoveryError};
|
||||||
use sp_api::{ApiError, RuntimeApiInfo};
|
use sp_api::{ApiError, RuntimeApiInfo};
|
||||||
|
|
||||||
@@ -308,7 +308,7 @@ impl RuntimeApiSubsystemClient for BlockChainRpcClient {
|
|||||||
Vec<(
|
Vec<(
|
||||||
polkadot_primitives::SessionIndex,
|
polkadot_primitives::SessionIndex,
|
||||||
polkadot_primitives::CandidateHash,
|
polkadot_primitives::CandidateHash,
|
||||||
vstaging::slashing::PendingSlashes,
|
slashing::PendingSlashes,
|
||||||
)>,
|
)>,
|
||||||
ApiError,
|
ApiError,
|
||||||
> {
|
> {
|
||||||
@@ -319,15 +319,15 @@ impl RuntimeApiSubsystemClient for BlockChainRpcClient {
|
|||||||
&self,
|
&self,
|
||||||
at: Hash,
|
at: Hash,
|
||||||
validator_id: polkadot_primitives::ValidatorId,
|
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?)
|
Ok(self.rpc_client.parachain_host_key_ownership_proof(at, validator_id).await?)
|
||||||
}
|
}
|
||||||
|
|
||||||
async fn submit_report_dispute_lost(
|
async fn submit_report_dispute_lost(
|
||||||
&self,
|
&self,
|
||||||
at: Hash,
|
at: Hash,
|
||||||
dispute_proof: vstaging::slashing::DisputeProof,
|
dispute_proof: slashing::DisputeProof,
|
||||||
key_ownership_proof: vstaging::slashing::OpaqueKeyOwnershipProof,
|
key_ownership_proof: slashing::OpaqueKeyOwnershipProof,
|
||||||
) -> Result<Option<()>, ApiError> {
|
) -> Result<Option<()>, ApiError> {
|
||||||
Ok(self
|
Ok(self
|
||||||
.rpc_client
|
.rpc_client
|
||||||
|
|||||||
@@ -30,7 +30,7 @@ use sp_storage::StorageKey;
|
|||||||
|
|
||||||
use cumulus_primitives_core::{
|
use cumulus_primitives_core::{
|
||||||
relay_chain::{
|
relay_chain::{
|
||||||
vstaging, BlockNumber, CandidateCommitments, CandidateEvent, CandidateHash,
|
slashing, BlockNumber, CandidateCommitments, CandidateEvent, CandidateHash,
|
||||||
CommittedCandidateReceipt, CoreState, DisputeState, ExecutorParams, GroupRotationInfo,
|
CommittedCandidateReceipt, CoreState, DisputeState, ExecutorParams, GroupRotationInfo,
|
||||||
Hash as RelayHash, Header as RelayHeader, InboundHrmpMessage, OccupiedCoreAssumption,
|
Hash as RelayHash, Header as RelayHeader, InboundHrmpMessage, OccupiedCoreAssumption,
|
||||||
PvfCheckStatement, ScrapedOnChainVotes, SessionIndex, SessionInfo, ValidationCode,
|
PvfCheckStatement, ScrapedOnChainVotes, SessionIndex, SessionInfo, ValidationCode,
|
||||||
@@ -334,10 +334,7 @@ impl RelayChainRpcClient {
|
|||||||
pub async fn parachain_host_unapplied_slashes(
|
pub async fn parachain_host_unapplied_slashes(
|
||||||
&self,
|
&self,
|
||||||
at: RelayHash,
|
at: RelayHash,
|
||||||
) -> Result<
|
) -> Result<Vec<(SessionIndex, CandidateHash, slashing::PendingSlashes)>, RelayChainError> {
|
||||||
Vec<(SessionIndex, CandidateHash, vstaging::slashing::PendingSlashes)>,
|
|
||||||
RelayChainError,
|
|
||||||
> {
|
|
||||||
self.call_remote_runtime_function("ParachainHost_unapplied_slashes", at, None::<()>)
|
self.call_remote_runtime_function("ParachainHost_unapplied_slashes", at, None::<()>)
|
||||||
.await
|
.await
|
||||||
}
|
}
|
||||||
@@ -349,7 +346,7 @@ impl RelayChainRpcClient {
|
|||||||
&self,
|
&self,
|
||||||
at: RelayHash,
|
at: RelayHash,
|
||||||
validator_id: ValidatorId,
|
validator_id: ValidatorId,
|
||||||
) -> Result<Option<vstaging::slashing::OpaqueKeyOwnershipProof>, RelayChainError> {
|
) -> Result<Option<slashing::OpaqueKeyOwnershipProof>, RelayChainError> {
|
||||||
self.call_remote_runtime_function(
|
self.call_remote_runtime_function(
|
||||||
"ParachainHost_key_ownership_proof",
|
"ParachainHost_key_ownership_proof",
|
||||||
at,
|
at,
|
||||||
@@ -365,8 +362,8 @@ impl RelayChainRpcClient {
|
|||||||
pub async fn parachain_host_submit_report_dispute_lost(
|
pub async fn parachain_host_submit_report_dispute_lost(
|
||||||
&self,
|
&self,
|
||||||
at: RelayHash,
|
at: RelayHash,
|
||||||
dispute_proof: vstaging::slashing::DisputeProof,
|
dispute_proof: slashing::DisputeProof,
|
||||||
key_ownership_proof: vstaging::slashing::OpaqueKeyOwnershipProof,
|
key_ownership_proof: slashing::OpaqueKeyOwnershipProof,
|
||||||
) -> Result<Option<()>, RelayChainError> {
|
) -> Result<Option<()>, RelayChainError> {
|
||||||
self.call_remote_runtime_function(
|
self.call_remote_runtime_function(
|
||||||
"ParachainHost_submit_report_dispute_lost",
|
"ParachainHost_submit_report_dispute_lost",
|
||||||
|
|||||||
@@ -36,7 +36,7 @@ decl_test_relay_chains! {
|
|||||||
Sudo: westend_runtime::Sudo,
|
Sudo: westend_runtime::Sudo,
|
||||||
}
|
}
|
||||||
},
|
},
|
||||||
#[api_version(4)]
|
#[api_version(5)]
|
||||||
pub struct Polkadot {
|
pub struct Polkadot {
|
||||||
genesis = polkadot::genesis(),
|
genesis = polkadot::genesis(),
|
||||||
on_init = (),
|
on_init = (),
|
||||||
@@ -55,7 +55,7 @@ decl_test_relay_chains! {
|
|||||||
XcmPallet: polkadot_runtime::XcmPallet,
|
XcmPallet: polkadot_runtime::XcmPallet,
|
||||||
}
|
}
|
||||||
},
|
},
|
||||||
#[api_version(4)]
|
#[api_version(5)]
|
||||||
pub struct Kusama {
|
pub struct Kusama {
|
||||||
genesis = kusama::genesis(),
|
genesis = kusama::genesis(),
|
||||||
on_init = (),
|
on_init = (),
|
||||||
|
|||||||
Reference in New Issue
Block a user