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
+14 -19
View File
@@ -166,12 +166,11 @@ where
.requests_cache
.cache_key_ownership_proof((relay_parent, validator_id), key_ownership_proof),
SubmitReportDisputeLost(_, _, _, _) => {},
StagingParaBackingState(relay_parent, para_id, constraints) => self
ParaBackingState(relay_parent, para_id, constraints) => self
.requests_cache
.cache_staging_para_backing_state((relay_parent, para_id), constraints),
StagingAsyncBackingParams(relay_parent, params) =>
self.requests_cache.cache_staging_async_backing_params(relay_parent, params),
.cache_para_backing_state((relay_parent, para_id), constraints),
AsyncBackingParams(relay_parent, params) =>
self.requests_cache.cache_async_backing_params(relay_parent, params),
}
}
@@ -297,13 +296,10 @@ where
Request::SubmitReportDisputeLost(dispute_proof, key_ownership_proof, sender)
},
),
Request::StagingParaBackingState(para, sender) =>
query!(staging_para_backing_state(para), sender)
.map(|sender| Request::StagingParaBackingState(para, sender)),
Request::StagingAsyncBackingParams(sender) =>
query!(staging_async_backing_params(), sender)
.map(|sender| Request::StagingAsyncBackingParams(sender)),
Request::ParaBackingState(para, sender) => query!(para_backing_state(para), sender)
.map(|sender| Request::ParaBackingState(para, sender)),
Request::AsyncBackingParams(sender) => query!(async_backing_params(), sender)
.map(|sender| Request::AsyncBackingParams(sender)),
Request::MinimumBackingVotes(index, sender) => {
if let Some(value) = self.requests_cache.minimum_backing_votes(index) {
self.metrics.on_cached_request();
@@ -569,19 +565,18 @@ where
ver = Request::MINIMUM_BACKING_VOTES_RUNTIME_REQUIREMENT,
sender
),
Request::StagingParaBackingState(para, sender) => {
Request::ParaBackingState(para, sender) => {
query!(
StagingParaBackingState,
staging_para_backing_state(para),
ParaBackingState,
para_backing_state(para),
ver = Request::STAGING_BACKING_STATE,
sender
)
},
Request::StagingAsyncBackingParams(sender) => {
Request::AsyncBackingParams(sender) => {
query!(
StagingAsyncBackingParams,
staging_async_backing_params(),
AsyncBackingParams,
async_backing_params(),
ver = Request::STAGING_BACKING_STATE,
sender
)