mirror of
https://github.com/pezkuwichain/pezkuwi-subxt.git
synced 2026-05-30 18:41:03 +00:00
do not store backed candidates in the provisioner (#1909)
* guide: non-semantic changes * guide: update per the issue description * GetBackedCandidates operates on multiple hashes now * GetBackedCandidates still needs a relay parent * implement changes specified in guide * distinguish between various occasions for canceled oneshots * add tracing info to getbackedcandidates * REVERT ME: add tracing messages for GetBackedCandidates Note that these messages are only sometimes actually passed on to the candidate backing subsystem, with the consequence that it is unexpectedly frequent that the provisioner fails to create its provisionable data. * REVERT ME: more tracing logging * REVERT ME: log when CandidateBackingJob receives any message at all * REVERT ME: log when send_msg sends a message to a job * fix candidate-backing tests * streamline GetBackedCandidates This uses table.attested_candidate instead of table.get_candidate, because it's not obvious how to get a BackedCandidate from just a CommittedCandidateReceipt. * REVERT ME: more logging tracing job lifespans * promote warning about job premature demise * don't terminate CandiateBackingJob::run_loop in event of failure to process message * Revert "REVERT ME: more logging tracing job lifespans" This reverts commit 7365f2fb3dec988d95cfcd317eba75587fe7fd16. * Revert "REVERT ME: log when send_msg sends a message to a job" This reverts commit 58e46aad038e6517d6d56390c8be65b046a21884. * Revert "REVERT ME: log when CandidateBackingJob receives any message at all" This reverts commit 0d6f38413c7c66b5e9e81dabc587906fa9f82656. * Revert "REVERT ME: more tracing logging" This reverts commit 675fd2628e84d1596965280e7314155ef21b28e6. * Revert "REVERT ME: add tracing messages for GetBackedCandidates" This reverts commit e09e156493430b33b6c8ab4b5cedb3f2f91afd51. * formatting * add logging message to CandidateBackingJob::run_loop start * REVERT ME: add tracing to candidate-backing job creation * run candidatebacking loop even if no assignment * use unique error variants for each canceled oneshot * Revert "REVERT ME: add tracing to candidate-backing job creation" This reverts commit 8ce5f4f0bd7186dade134b118751480f72ea1fd6. * try_runtime_api more to reduce silent exits * add sanity check that returned backed candidates preserve ordering * remove redundant err attribute
This commit is contained in:
committed by
GitHub
parent
16a43d9e93
commit
e7e9605f87
@@ -47,10 +47,6 @@ pub trait BoundToRelayParent {
|
||||
fn relay_parent(&self) -> Hash;
|
||||
}
|
||||
|
||||
/// A notification of a new backed candidate.
|
||||
#[derive(Debug)]
|
||||
pub struct NewBackedCandidate(pub BackedCandidate);
|
||||
|
||||
/// Messages received by the Candidate Selection subsystem.
|
||||
#[derive(Debug)]
|
||||
pub enum CandidateSelectionMessage {
|
||||
@@ -81,7 +77,7 @@ impl Default for CandidateSelectionMessage {
|
||||
pub enum CandidateBackingMessage {
|
||||
/// Requests a set of backable candidates that could be backed in a child of the given
|
||||
/// relay-parent, referenced by its hash.
|
||||
GetBackedCandidates(Hash, oneshot::Sender<Vec<NewBackedCandidate>>),
|
||||
GetBackedCandidates(Hash, Vec<CandidateHash>, oneshot::Sender<Vec<BackedCandidate>>),
|
||||
/// Note that the Candidate Backing subsystem should second the given candidate in the context of the
|
||||
/// given relay-parent (ref. by hash). This candidate must be validated.
|
||||
Second(Hash, CandidateReceipt, PoV),
|
||||
@@ -93,7 +89,7 @@ pub enum CandidateBackingMessage {
|
||||
impl BoundToRelayParent for CandidateBackingMessage {
|
||||
fn relay_parent(&self) -> Hash {
|
||||
match self {
|
||||
Self::GetBackedCandidates(hash, _) => *hash,
|
||||
Self::GetBackedCandidates(hash, _, _) => *hash,
|
||||
Self::Second(hash, _, _) => *hash,
|
||||
Self::Statement(hash, _) => *hash,
|
||||
}
|
||||
@@ -497,7 +493,7 @@ pub enum ProvisionableData {
|
||||
/// This bitfield indicates the availability of various candidate blocks.
|
||||
Bitfield(Hash, SignedAvailabilityBitfield),
|
||||
/// The Candidate Backing subsystem believes that this candidate is valid, pending availability.
|
||||
BackedCandidate(BackedCandidate),
|
||||
BackedCandidate(CandidateReceipt),
|
||||
/// Misbehavior reports are self-contained proofs of validator misbehavior.
|
||||
MisbehaviorReport(Hash, MisbehaviorReport),
|
||||
/// Disputes trigger a broad dispute resolution process.
|
||||
|
||||
Reference in New Issue
Block a user