mirror of
https://github.com/pezkuwichain/pezkuwi-subxt.git
synced 2026-05-31 04:01:02 +00:00
[ci] Update ci image with rust 1.77 and 2024-04-10 (#4077)
cc https://github.com/paritytech/ci_cd/issues/974 --------- Co-authored-by: command-bot <> Co-authored-by: Bastian Köcher <info@kchr.de>
This commit is contained in:
committed by
GitHub
parent
b6fab8046e
commit
76719da221
@@ -24,8 +24,8 @@ use polkadot_primitives::{
|
||||
CandidateCommitments, CandidateEvent, CandidateHash, CommittedCandidateReceipt, CoreIndex,
|
||||
CoreState, DisputeState, ExecutorParams, GroupRotationInfo, Hash, Id as ParaId,
|
||||
InboundDownwardMessage, InboundHrmpMessage, NodeFeatures, OccupiedCoreAssumption,
|
||||
PersistedValidationData, PvfCheckStatement, ScrapedOnChainVotes, SessionIndex, SessionInfo,
|
||||
ValidationCode, ValidationCodeHash, ValidatorId, ValidatorIndex, ValidatorSignature,
|
||||
PersistedValidationData, ScrapedOnChainVotes, SessionIndex, SessionInfo, ValidationCode,
|
||||
ValidationCodeHash, ValidatorId, ValidatorIndex,
|
||||
};
|
||||
|
||||
/// For consistency we have the same capacity for all caches. We use 128 as we'll only need that
|
||||
@@ -561,7 +561,7 @@ pub(crate) enum RequestResult {
|
||||
// The structure of each variant is (relay_parent, [params,]*, result)
|
||||
Authorities(Hash, Vec<AuthorityDiscoveryId>),
|
||||
Validators(Hash, Vec<ValidatorId>),
|
||||
MinimumBackingVotes(Hash, SessionIndex, u32),
|
||||
MinimumBackingVotes(SessionIndex, u32),
|
||||
ValidatorGroups(Hash, (Vec<Vec<ValidatorIndex>>, GroupRotationInfo)),
|
||||
AvailabilityCores(Hash, Vec<CoreState>),
|
||||
PersistedValidationData(Hash, ParaId, OccupiedCoreAssumption, Option<PersistedValidationData>),
|
||||
@@ -589,19 +589,16 @@ pub(crate) enum RequestResult {
|
||||
FetchOnChainVotes(Hash, Option<ScrapedOnChainVotes>),
|
||||
PvfsRequirePrecheck(Hash, Vec<ValidationCodeHash>),
|
||||
// This is a request with side-effects and no result, hence ().
|
||||
SubmitPvfCheckStatement(Hash, PvfCheckStatement, ValidatorSignature, ()),
|
||||
#[allow(dead_code)]
|
||||
SubmitPvfCheckStatement(()),
|
||||
ValidationCodeHash(Hash, ParaId, OccupiedCoreAssumption, Option<ValidationCodeHash>),
|
||||
Version(Hash, u32),
|
||||
Disputes(Hash, Vec<(SessionIndex, CandidateHash, DisputeState<BlockNumber>)>),
|
||||
UnappliedSlashes(Hash, Vec<(SessionIndex, CandidateHash, slashing::PendingSlashes)>),
|
||||
KeyOwnershipProof(Hash, ValidatorId, Option<slashing::OpaqueKeyOwnershipProof>),
|
||||
// This is a request with side-effects.
|
||||
SubmitReportDisputeLost(
|
||||
Hash,
|
||||
slashing::DisputeProof,
|
||||
slashing::OpaqueKeyOwnershipProof,
|
||||
Option<()>,
|
||||
),
|
||||
#[allow(dead_code)]
|
||||
SubmitReportDisputeLost(Option<()>),
|
||||
ApprovalVotingParams(Hash, SessionIndex, ApprovalVotingParams),
|
||||
DisabledValidators(Hash, Vec<ValidatorIndex>),
|
||||
ParaBackingState(Hash, ParaId, Option<async_backing::BackingState>),
|
||||
|
||||
@@ -101,7 +101,7 @@ where
|
||||
self.requests_cache.cache_authorities(relay_parent, authorities),
|
||||
Validators(relay_parent, validators) =>
|
||||
self.requests_cache.cache_validators(relay_parent, validators),
|
||||
MinimumBackingVotes(_, session_index, minimum_backing_votes) => self
|
||||
MinimumBackingVotes(session_index, minimum_backing_votes) => self
|
||||
.requests_cache
|
||||
.cache_minimum_backing_votes(session_index, minimum_backing_votes),
|
||||
ValidatorGroups(relay_parent, groups) =>
|
||||
@@ -155,7 +155,7 @@ where
|
||||
self.requests_cache.cache_on_chain_votes(relay_parent, scraped),
|
||||
PvfsRequirePrecheck(relay_parent, pvfs) =>
|
||||
self.requests_cache.cache_pvfs_require_precheck(relay_parent, pvfs),
|
||||
SubmitPvfCheckStatement(_, _, _, ()) => {},
|
||||
SubmitPvfCheckStatement(()) => {},
|
||||
ValidationCodeHash(relay_parent, para_id, assumption, hash) => self
|
||||
.requests_cache
|
||||
.cache_validation_code_hash((relay_parent, para_id, assumption), hash),
|
||||
@@ -170,7 +170,7 @@ where
|
||||
.cache_key_ownership_proof((relay_parent, validator_id), key_ownership_proof),
|
||||
RequestResult::ApprovalVotingParams(_relay_parent, session_index, params) =>
|
||||
self.requests_cache.cache_approval_voting_params(session_index, params),
|
||||
SubmitReportDisputeLost(_, _, _, _) => {},
|
||||
SubmitReportDisputeLost(_) => {},
|
||||
DisabledValidators(relay_parent, disabled_validators) =>
|
||||
self.requests_cache.cache_disabled_validators(relay_parent, disabled_validators),
|
||||
ParaBackingState(relay_parent, para_id, constraints) => self
|
||||
@@ -370,7 +370,7 @@ where
|
||||
async fn poll_requests(&mut self) {
|
||||
// If there are no active requests, this future should be pending forever.
|
||||
if self.active_requests.len() == 0 {
|
||||
return futures::pending!()
|
||||
return futures::pending!();
|
||||
}
|
||||
|
||||
// If there are active requests, this will always resolve to `Some(_)` when a request is
|
||||
@@ -439,7 +439,7 @@ where
|
||||
}};
|
||||
($req_variant:ident, $api_name:ident ($($param:expr),*), ver = $version:expr, $sender:expr, result = ( $($results:expr),* ) ) => {{
|
||||
let sender = $sender;
|
||||
let version: u32 = $version; // enforce type for the version expression
|
||||
let version: u32 = $version; // enforce type for the version expression
|
||||
let runtime_version = client.api_version_parachain_host(relay_parent).await
|
||||
.unwrap_or_else(|e| {
|
||||
gum::warn!(
|
||||
@@ -570,7 +570,8 @@ where
|
||||
SubmitPvfCheckStatement,
|
||||
submit_pvf_check_statement(stmt, signature),
|
||||
ver = 2,
|
||||
sender
|
||||
sender,
|
||||
result = ()
|
||||
)
|
||||
},
|
||||
Request::PvfsRequirePrecheck(sender) => {
|
||||
@@ -606,13 +607,15 @@ where
|
||||
SubmitReportDisputeLost,
|
||||
submit_report_dispute_lost(dispute_proof, key_ownership_proof),
|
||||
ver = Request::SUBMIT_REPORT_DISPUTE_LOST_RUNTIME_REQUIREMENT,
|
||||
sender
|
||||
sender,
|
||||
result = ()
|
||||
),
|
||||
Request::MinimumBackingVotes(index, sender) => query!(
|
||||
MinimumBackingVotes,
|
||||
minimum_backing_votes(index),
|
||||
ver = Request::MINIMUM_BACKING_VOTES_RUNTIME_REQUIREMENT,
|
||||
sender
|
||||
sender,
|
||||
result = (index)
|
||||
),
|
||||
Request::DisabledValidators(sender) => query!(
|
||||
DisabledValidators,
|
||||
|
||||
@@ -148,6 +148,7 @@ enum ApprovalEntryError {
|
||||
InvalidCandidateIndex,
|
||||
DuplicateApproval,
|
||||
UnknownAssignment,
|
||||
#[allow(dead_code)]
|
||||
AssignmentsFollowedDifferentPaths(RequiredRouting, RequiredRouting),
|
||||
}
|
||||
|
||||
|
||||
@@ -953,6 +953,7 @@ enum AdvertisementError {
|
||||
/// parent.
|
||||
ProtocolMisuse,
|
||||
/// Advertisement is invalid.
|
||||
#[allow(dead_code)]
|
||||
Invalid(InsertAdvertisementError),
|
||||
}
|
||||
|
||||
|
||||
@@ -16,7 +16,7 @@
|
||||
|
||||
use std::collections::{HashMap, HashSet};
|
||||
|
||||
use futures::{future::RemoteHandle, Future, FutureExt};
|
||||
use futures::{Future, FutureExt};
|
||||
|
||||
use polkadot_node_network_protocol::{
|
||||
request_response::{
|
||||
@@ -64,7 +64,7 @@ pub struct SendTask<M> {
|
||||
/// Status of a particular vote/statement delivery to a particular validator.
|
||||
enum DeliveryStatus {
|
||||
/// Request is still in flight.
|
||||
Pending(RemoteHandle<()>),
|
||||
Pending,
|
||||
/// Succeeded - no need to send request to this peer anymore.
|
||||
Succeeded,
|
||||
}
|
||||
@@ -297,9 +297,8 @@ async fn send_requests<Context, M: 'static + Send + Sync>(
|
||||
metrics.time_dispute_request(),
|
||||
);
|
||||
|
||||
let (remote, remote_handle) = fut.remote_handle();
|
||||
ctx.spawn("dispute-sender", remote.boxed()).map_err(FatalError::SpawnTask)?;
|
||||
statuses.insert(receiver, DeliveryStatus::Pending(remote_handle));
|
||||
ctx.spawn("dispute-sender", fut.boxed()).map_err(FatalError::SpawnTask)?;
|
||||
statuses.insert(receiver, DeliveryStatus::Pending);
|
||||
}
|
||||
|
||||
let msg = NetworkBridgeTxMessage::SendRequests(reqs, IfDisconnected::ImmediateError);
|
||||
|
||||
@@ -377,22 +377,45 @@ pub mod pallet {
|
||||
const LOG_TARGET: &str = "runtime::inclusion";
|
||||
|
||||
/// The reason that a candidate's outputs were rejected for.
|
||||
#[derive(derive_more::From)]
|
||||
#[cfg_attr(feature = "std", derive(Debug))]
|
||||
enum AcceptanceCheckErr<BlockNumber> {
|
||||
enum AcceptanceCheckErr {
|
||||
HeadDataTooLarge,
|
||||
/// Code upgrades are not permitted at the current time.
|
||||
PrematureCodeUpgrade,
|
||||
/// The new runtime blob is too large.
|
||||
NewCodeTooLarge,
|
||||
/// The candidate violated this DMP acceptance criteria.
|
||||
ProcessedDownwardMessages(dmp::ProcessedDownwardMessagesAcceptanceErr),
|
||||
ProcessedDownwardMessages,
|
||||
/// The candidate violated this UMP acceptance criteria.
|
||||
UpwardMessages(UmpAcceptanceCheckErr),
|
||||
UpwardMessages,
|
||||
/// The candidate violated this HRMP watermark acceptance criteria.
|
||||
HrmpWatermark(hrmp::HrmpWatermarkAcceptanceErr<BlockNumber>),
|
||||
HrmpWatermark,
|
||||
/// The candidate violated this outbound HRMP acceptance criteria.
|
||||
OutboundHrmp(hrmp::OutboundHrmpAcceptanceErr),
|
||||
OutboundHrmp,
|
||||
}
|
||||
|
||||
impl From<dmp::ProcessedDownwardMessagesAcceptanceErr> for AcceptanceCheckErr {
|
||||
fn from(_: dmp::ProcessedDownwardMessagesAcceptanceErr) -> Self {
|
||||
Self::ProcessedDownwardMessages
|
||||
}
|
||||
}
|
||||
|
||||
impl From<UmpAcceptanceCheckErr> for AcceptanceCheckErr {
|
||||
fn from(_: UmpAcceptanceCheckErr) -> Self {
|
||||
Self::UpwardMessages
|
||||
}
|
||||
}
|
||||
|
||||
impl<BlockNumber> From<hrmp::HrmpWatermarkAcceptanceErr<BlockNumber>> for AcceptanceCheckErr {
|
||||
fn from(_: hrmp::HrmpWatermarkAcceptanceErr<BlockNumber>) -> Self {
|
||||
Self::HrmpWatermark
|
||||
}
|
||||
}
|
||||
|
||||
impl From<hrmp::OutboundHrmpAcceptanceErr> for AcceptanceCheckErr {
|
||||
fn from(_: hrmp::OutboundHrmpAcceptanceErr) -> Self {
|
||||
Self::OutboundHrmp
|
||||
}
|
||||
}
|
||||
|
||||
/// An error returned by [`Pallet::check_upward_messages`] that indicates a violation of one of
|
||||
@@ -1145,7 +1168,7 @@ const fn availability_threshold(n_validators: usize) -> usize {
|
||||
supermajority_threshold(n_validators)
|
||||
}
|
||||
|
||||
impl<BlockNumber> AcceptanceCheckErr<BlockNumber> {
|
||||
impl AcceptanceCheckErr {
|
||||
/// Returns the same error so that it can be threaded through a needle of `DispatchError` and
|
||||
/// ultimately returned from a `Dispatchable`.
|
||||
fn strip_into_dispatch_err<T: Config>(self) -> Error<T> {
|
||||
@@ -1154,10 +1177,10 @@ impl<BlockNumber> AcceptanceCheckErr<BlockNumber> {
|
||||
HeadDataTooLarge => Error::<T>::HeadDataTooLarge,
|
||||
PrematureCodeUpgrade => Error::<T>::PrematureCodeUpgrade,
|
||||
NewCodeTooLarge => Error::<T>::NewCodeTooLarge,
|
||||
ProcessedDownwardMessages(_) => Error::<T>::IncorrectDownwardMessageHandling,
|
||||
UpwardMessages(_) => Error::<T>::InvalidUpwardMessages,
|
||||
HrmpWatermark(_) => Error::<T>::HrmpWatermarkMishandling,
|
||||
OutboundHrmp(_) => Error::<T>::InvalidOutboundHrmp,
|
||||
ProcessedDownwardMessages => Error::<T>::IncorrectDownwardMessageHandling,
|
||||
UpwardMessages => Error::<T>::InvalidUpwardMessages,
|
||||
HrmpWatermark => Error::<T>::HrmpWatermarkMishandling,
|
||||
OutboundHrmp => Error::<T>::InvalidOutboundHrmp,
|
||||
}
|
||||
}
|
||||
}
|
||||
@@ -1300,7 +1323,7 @@ impl<T: Config> CandidateCheckContext<T> {
|
||||
upward_messages: &[primitives::UpwardMessage],
|
||||
hrmp_watermark: BlockNumberFor<T>,
|
||||
horizontal_messages: &[primitives::OutboundHrmpMessage<ParaId>],
|
||||
) -> Result<(), AcceptanceCheckErr<BlockNumberFor<T>>> {
|
||||
) -> Result<(), AcceptanceCheckErr> {
|
||||
ensure!(
|
||||
head_data.0.len() <= self.config.max_head_data_size as _,
|
||||
AcceptanceCheckErr::HeadDataTooLarge,
|
||||
|
||||
Reference in New Issue
Block a user