mirror of
https://github.com/pezkuwichain/pezkuwi-subxt.git
synced 2026-04-29 12:37:57 +00:00
collator protocol changes for elastic scaling (validator side) (#3302)
Fixes #3128. This introduces a new variant for the collation response from the collator that includes the parent head data. For now, collators won't send this new variant. We'll need to change the collator side of the collator protocol to detect all the cores assigned to a para and send the parent head data in the case when it's more than 1 core. - [x] validate approach - [x] check head data hash
This commit is contained in:
@@ -31,7 +31,7 @@
|
||||
//! data, like what is the corresponding response type.
|
||||
//!
|
||||
//! ## Versioning
|
||||
//!
|
||||
//!
|
||||
//! Versioning for request-response protocols can be done in multiple ways.
|
||||
//!
|
||||
//! If you're just changing the protocol name but the binary payloads are the same, just add a new
|
||||
|
||||
@@ -22,7 +22,8 @@ use polkadot_node_primitives::{
|
||||
AvailableData, DisputeMessage, ErasureChunk, PoV, Proof, UncheckedDisputeMessage,
|
||||
};
|
||||
use polkadot_primitives::{
|
||||
CandidateHash, CandidateReceipt, CommittedCandidateReceipt, Hash, Id as ParaId, ValidatorIndex,
|
||||
CandidateHash, CandidateReceipt, CommittedCandidateReceipt, Hash, HeadData, Id as ParaId,
|
||||
ValidatorIndex,
|
||||
};
|
||||
|
||||
use super::{IsRequest, Protocol};
|
||||
@@ -103,6 +104,18 @@ pub enum CollationFetchingResponse {
|
||||
/// Deliver requested collation.
|
||||
#[codec(index = 0)]
|
||||
Collation(CandidateReceipt, PoV),
|
||||
|
||||
/// Deliver requested collation along with parent head data.
|
||||
#[codec(index = 1)]
|
||||
CollationWithParentHeadData {
|
||||
/// The receipt of the candidate.
|
||||
receipt: CandidateReceipt,
|
||||
/// Candidate's proof of validity.
|
||||
pov: PoV,
|
||||
/// The head data of the candidate's parent.
|
||||
/// This is needed for elastic scaling to work.
|
||||
parent_head_data: HeadData,
|
||||
},
|
||||
}
|
||||
|
||||
impl IsRequest for CollationFetchingRequest {
|
||||
|
||||
Reference in New Issue
Block a user