mirror of
https://github.com/pezkuwichain/pezkuwi-subxt.git
synced 2026-05-30 18:41:03 +00:00
A more comprehensive model for PoV-Blocks and Candidate receipts (#843)
* encode the candidate statement as only the hash * refactor CandidateReceipt and CollationInfo * introduce an abridged candidate receipt type * erasure coding stores candidate receipt * store omitted data instead and introduce AvailableData type * refactor availability-store schema * tweak schema and APIs a bit more * get availability-store tests passing * accept AbridgedCandidateReceipt in `set_heads` * change statement type in primitives to be hash-only * fix parachains runtime tests * fix bad merge * rewrite validation pipeline * remove evaluation module * use abridged candidate hash as canonical * statement table uses abridged candidate receipts * kill availability_store::Data struct * port shared table to new validation pipelines * extract full validation pipeline to helper * remove old validation pipeline from collation module * polkadot-validation compiles * polkadot-validation tests compile * make local collation available in validation service * port legacy network code * polkadot-network fully ported * network: ensure fresh statement is propagated * remove pov_block_hash from LocalValidationData * remove candidate_hash field from AttestedCandidate and update runtime * port runtimes to new ParachainHost definition * port over polkadot-collator * fix test compilation * better fix * remove unrelated validation work dispatch fix * address grumbles * fix equality check
This commit is contained in:
committed by
GitHub
parent
1f9d2af08e
commit
b7d30aa379
@@ -25,7 +25,7 @@ use sp_core::u32_trait::{_1, _2, _3, _4, _5};
|
||||
use codec::{Encode, Decode};
|
||||
use primitives::{
|
||||
AccountId, AccountIndex, Balance, BlockNumber, Hash, Nonce, Signature, Moment,
|
||||
parachain::{self, ActiveParas, CandidateReceipt}, ValidityError,
|
||||
parachain::{self, ActiveParas, AbridgedCandidateReceipt}, ValidityError,
|
||||
};
|
||||
use runtime_common::{attestations, claims, parachains, registrar, slots,
|
||||
impls::{CurrencyToVoteHandler, TargetedFeeAdjustment, ToAuthor},
|
||||
@@ -766,13 +766,18 @@ sp_api::impl_runtime_apis! {
|
||||
fn active_parachains() -> Vec<(parachain::Id, Option<(parachain::CollatorId, parachain::Retriable)>)> {
|
||||
Registrar::active_paras()
|
||||
}
|
||||
fn parachain_status(id: parachain::Id) -> Option<parachain::Status> {
|
||||
Parachains::parachain_status(&id)
|
||||
fn global_validation_schedule() -> parachain::GlobalValidationSchedule {
|
||||
Parachains::global_validation_schedule()
|
||||
}
|
||||
fn local_validation_data(id: parachain::Id) -> Option<parachain::LocalValidationData> {
|
||||
Parachains::local_validation_data(&id)
|
||||
}
|
||||
fn parachain_code(id: parachain::Id) -> Option<Vec<u8>> {
|
||||
Parachains::parachain_code(&id)
|
||||
}
|
||||
fn get_heads(extrinsics: Vec<<Block as BlockT>::Extrinsic>) -> Option<Vec<CandidateReceipt>> {
|
||||
fn get_heads(extrinsics: Vec<<Block as BlockT>::Extrinsic>)
|
||||
-> Option<Vec<AbridgedCandidateReceipt>>
|
||||
{
|
||||
extrinsics
|
||||
.into_iter()
|
||||
.find_map(|ex| match UncheckedExtrinsic::decode(&mut ex.encode().as_slice()) {
|
||||
|
||||
Reference in New Issue
Block a user