mirror of
https://github.com/pezkuwichain/pezkuwi-subxt.git
synced 2026-05-30 08:11:03 +00:00
Proposal creation and evaluation to plug into BFT (#77)
* reshuffle consensus libraries * polkadot-useful type definitions for statement table * begin BftService * primary selection logic * bft service implementation without I/O * extract out `BlockImport` trait * allow bft primitives to compile on wasm * Block builder (substrate) * take polkadot-consensus down to the core. * test for preemption * fix test build * Fix wasm build * Bulid on any block * Test for block builder. * Block import tests for client. * Tidy ups * clean up block builder instantiation * justification verification logic * JustifiedHeader and import * Propert block generation for tests * network and tablerouter trait * use statement import to drive creation of further statements * Fixed rpc tests * custom error type for consensus * create proposer * asynchronous proposal evaluation * inherent transactions in polkadot runtime * fix tests to match real polkadot block constraints * implicitly generate inherent functions * add inherent transaction functionality to block body * block builder logic for polkadot * some tests for the polkadot API
This commit is contained in:
committed by
Gav Wood
parent
5f9be58d04
commit
1e6cad908e
@@ -61,7 +61,7 @@ pub trait ParachainContext {
|
||||
fn produce_candidate<I: IntoIterator<Item=(ParaId, Message)>>(
|
||||
&self,
|
||||
ingress: I,
|
||||
) -> (parachain::BlockData, polkadot_primitives::Signature);
|
||||
) -> (parachain::BlockData, polkadot_primitives::AccountId, polkadot_primitives::Signature);
|
||||
}
|
||||
|
||||
/// Relay chain context needed to collate.
|
||||
@@ -131,7 +131,7 @@ pub fn collate<'a, R, P>(local_id: ParaId, relay_context: R, para_context: P)
|
||||
P: ParachainContext + 'a,
|
||||
{
|
||||
Box::new(collate_ingress(relay_context).map(move |ingress| {
|
||||
let (block_data, signature) = para_context.produce_candidate(
|
||||
let (block_data, _, signature) = para_context.produce_candidate(
|
||||
ingress.0.iter().flat_map(|&(id, ref msgs)| msgs.iter().cloned().map(move |msg| (id, msg)))
|
||||
);
|
||||
|
||||
|
||||
Reference in New Issue
Block a user