mirror of
https://github.com/pezkuwichain/pezkuwi-subxt.git
synced 2026-04-26 20:27:58 +00:00
Implement validation data refactor (#1585)
* update primitives * correct parent_head field * make hrmp field pub * refactor validation data: runtime * refactor validation data: messages * add arguments to full_validation_data runtime API * port runtime API * mostly port over candidate validation * remove some parameters from ValidationParams * guide: update candidate validation * update candidate outputs * update ValidationOutputs in primitives * port over candidate validation * add a new test for no-transient behavior * update util runtime API wrappers * candidate backing * fix missing imports * change some fields of validation data around * runtime API impl * update candidate validation * fix backing tests * grumbles from review * fix av-store tests * fix some more crates * fix provisioner tests * fix availability distribution tests * port collation-generation to new validation data * fix overseer tests * Update roadmap/implementers-guide/src/node/utility/candidate-validation.md Co-authored-by: Peter Goodspeed-Niklaus <coriolinus@users.noreply.github.com> Co-authored-by: Peter Goodspeed-Niklaus <coriolinus@users.noreply.github.com>
This commit is contained in:
committed by
GitHub
parent
3395044402
commit
262574fc49
@@ -25,7 +25,7 @@ use parity_scale_codec::{Decode, Encode};
|
||||
use polkadot_primitives::v1::{
|
||||
Hash, CommittedCandidateReceipt, CandidateReceipt, CompactStatement,
|
||||
EncodeAs, Signed, SigningContext, ValidatorIndex, ValidatorId,
|
||||
UpwardMessage, Balance, ValidationCode, GlobalValidationData, LocalValidationData,
|
||||
UpwardMessage, Balance, ValidationCode, PersistedValidationData, ValidationData,
|
||||
HeadData, PoV, CollatorPair, Id as ParaId,
|
||||
};
|
||||
use polkadot_statement_table::{
|
||||
@@ -118,10 +118,8 @@ pub struct FromTableMisbehavior {
|
||||
pub struct ValidationOutputs {
|
||||
/// The head-data produced by validation.
|
||||
pub head_data: HeadData,
|
||||
/// The global validation schedule.
|
||||
pub global_validation_data: GlobalValidationData,
|
||||
/// The local validation data.
|
||||
pub local_validation_data: LocalValidationData,
|
||||
/// The persisted validation data.
|
||||
pub validation_data: PersistedValidationData,
|
||||
/// Upward messages to the relay chain.
|
||||
pub upward_messages: Vec<UpwardMessage>,
|
||||
/// Fees paid to the validators of the relay-chain.
|
||||
@@ -153,6 +151,8 @@ pub enum InvalidCandidate {
|
||||
NewCodeTooLarge(u64),
|
||||
/// Head-data is over the limit.
|
||||
HeadDataTooLarge(u64),
|
||||
/// Code upgrade triggered but not allowed.
|
||||
CodeUpgradeNotAllowed,
|
||||
}
|
||||
|
||||
/// Result of the validation of the candidate.
|
||||
@@ -285,7 +285,7 @@ pub struct CollationGenerationConfig {
|
||||
/// Collator's authentication key, so it can sign things.
|
||||
pub key: CollatorPair,
|
||||
/// Collation function.
|
||||
pub collator: Box<dyn Fn(&GlobalValidationData, &LocalValidationData) -> Box<dyn Future<Output = Collation> + Unpin + Send> + Send + Sync>,
|
||||
pub collator: Box<dyn Fn(&ValidationData) -> Box<dyn Future<Output = Collation> + Unpin + Send> + Send + Sync>,
|
||||
/// The parachain that this collator collates for
|
||||
pub para_id: ParaId,
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user