Migrate polkadot-primitives to v6 (#1543)

- Async-backing related primitives are stable `primitives::v6`
- Async-backing API is now part of `api_version(7)`
- It's enabled on Rococo and Westend runtimes

---------

Signed-off-by: Andrei Sandu <andrei-mihail@parity.io>
Co-authored-by: Andrei Sandu <54316454+sandreim@users.noreply.github.com>
This commit is contained in:
Chris Sosnin
2023-09-27 13:32:02 +03:00
committed by GitHub
parent 5a2833cceb
commit 7cbe0c76ef
107 changed files with 2410 additions and 2792 deletions
+11 -11
View File
@@ -20,9 +20,9 @@ use polkadot_node_primitives::{BabeAllowedSlots, BabeEpoch, BabeEpochConfigurati
use polkadot_node_subsystem::SpawnGlue;
use polkadot_node_subsystem_test_helpers::make_subsystem_context;
use polkadot_primitives::{
vstaging, AuthorityDiscoveryId, BlockNumber, CandidateCommitments, CandidateEvent,
CandidateHash, CommittedCandidateReceipt, CoreState, DisputeState, ExecutorParams,
GroupRotationInfo, Id as ParaId, InboundDownwardMessage, InboundHrmpMessage,
async_backing, slashing, AuthorityDiscoveryId, BlockNumber, CandidateCommitments,
CandidateEvent, CandidateHash, CommittedCandidateReceipt, CoreState, DisputeState,
ExecutorParams, GroupRotationInfo, Id as ParaId, InboundDownwardMessage, InboundHrmpMessage,
OccupiedCoreAssumption, PersistedValidationData, PvfCheckStatement, ScrapedOnChainVotes,
SessionIndex, SessionInfo, Slot, ValidationCode, ValidationCodeHash, ValidatorId,
ValidatorIndex, ValidatorSignature,
@@ -213,7 +213,7 @@ impl RuntimeApiSubsystemClient for MockSubsystemClient {
async fn unapplied_slashes(
&self,
_: Hash,
) -> Result<Vec<(SessionIndex, CandidateHash, vstaging::slashing::PendingSlashes)>, ApiError> {
) -> Result<Vec<(SessionIndex, CandidateHash, slashing::PendingSlashes)>, ApiError> {
todo!("Not required for tests")
}
@@ -221,15 +221,15 @@ impl RuntimeApiSubsystemClient for MockSubsystemClient {
&self,
_: Hash,
_: ValidatorId,
) -> Result<Option<vstaging::slashing::OpaqueKeyOwnershipProof>, ApiError> {
) -> Result<Option<slashing::OpaqueKeyOwnershipProof>, ApiError> {
todo!("Not required for tests")
}
async fn submit_report_dispute_lost(
&self,
_: Hash,
_: vstaging::slashing::DisputeProof,
_: vstaging::slashing::OpaqueKeyOwnershipProof,
_: slashing::DisputeProof,
_: slashing::OpaqueKeyOwnershipProof,
) -> Result<Option<()>, ApiError> {
todo!("Not required for tests")
}
@@ -250,18 +250,18 @@ impl RuntimeApiSubsystemClient for MockSubsystemClient {
Ok(self.authorities.clone())
}
async fn staging_async_backing_params(
async fn async_backing_params(
&self,
_: Hash,
) -> Result<vstaging::AsyncBackingParams, ApiError> {
) -> Result<async_backing::AsyncBackingParams, ApiError> {
todo!("Not required for tests")
}
async fn staging_para_backing_state(
async fn para_backing_state(
&self,
_: Hash,
_: ParaId,
) -> Result<Option<vstaging::BackingState>, ApiError> {
) -> Result<Option<async_backing::BackingState>, ApiError> {
todo!("Not required for tests")
}