Minimal collation work-flow and necessary traits (#25)

* collator crate skeleton and description

* parachain primitives: proof -> witness and egress format

* collation of ingress queues through trait

* add ingress collation test

* structure for collated ingress

* add collated ingress to proposal

* witness -> proof

* ingress collation and candidate creation + code cleanup

* update collator lib to new definitions

* address formatting grumble
This commit is contained in:
Robert Habermeier
2017-12-13 15:04:58 +01:00
committed by GitHub
parent 55e74cd426
commit 9612e1d7c1
6 changed files with 268 additions and 1 deletions
+8 -1
View File
@@ -44,7 +44,7 @@ pub struct Candidate {
/// Unprocessed ingress queue.
///
/// Ordered by parachain ID and block number.
pub unprocessed_ingress: Vec<(u64, Vec<Message>)>,
pub unprocessed_ingress: ConsolidatedIngress,
/// Block data
pub block: BlockData,
}
@@ -53,6 +53,13 @@ pub struct Candidate {
#[derive(Debug, PartialEq, Eq, Clone, Serialize, Deserialize)]
pub struct Message(#[serde(with="bytes")] pub Vec<u8>);
/// Consolidated ingress queue data.
///
/// This is just an ordered vector of other parachains' egress queues,
/// obtained according to the routing rules.
#[derive(Debug, PartialEq, Eq, Clone, Serialize, Deserialize)]
pub struct ConsolidatedIngress(pub Vec<(Id, Vec<Message>)>);
/// Parachain block data.
///
/// contains everything required to validate para-block, may contain block and witness data