mirror of
https://github.com/pezkuwichain/pezkuwi-subxt.git
synced 2026-05-30 10:31:03 +00:00
Interchain message-passing (#117)
* compute ingress and routing in polkadot runtime * extract parent candidates from block when beginning consensus * fetch incoming messages when validating * fix consensus tests * parachain wasm execution uses messages * update parachain tests to check if messages are executed * abstract out network service to make room for network tests * skeleton for incoming data fetch * collate ingress from consensus-gossip * keep track of validated candidates in the shared-table * add some shared_table tests for new behavior * broadcast egress messages on gossip * test compute_ingress * move network tests to module folder * dummy network for consensus-network tests * make consensus network generic over executor * test egress broadcast and ingress fetch * fix test compilation * address some grumbles * address grumbles and fix parachain shuffle * remove broadcast parameter from consensus network trait
This commit is contained in:
committed by
GitHub
parent
da409f6c9e
commit
f8af277006
@@ -72,7 +72,7 @@ pub mod wasm_executor;
|
||||
pub mod wasm_api;
|
||||
|
||||
/// Validation parameters for evaluating the parachain validity function.
|
||||
// TODO: consolidated ingress and balance downloads
|
||||
// TODO: balance downloads
|
||||
#[derive(PartialEq, Eq, Decode)]
|
||||
#[cfg_attr(feature = "std", derive(Debug, Encode))]
|
||||
pub struct ValidationParams {
|
||||
@@ -80,6 +80,8 @@ pub struct ValidationParams {
|
||||
pub block_data: Vec<u8>,
|
||||
/// Previous head-data.
|
||||
pub parent_head: Vec<u8>,
|
||||
/// Incoming messages.
|
||||
pub ingress: Vec<IncomingMessage>,
|
||||
}
|
||||
|
||||
/// The result of parachain validation.
|
||||
@@ -91,8 +93,17 @@ pub struct ValidationResult {
|
||||
pub head_data: Vec<u8>,
|
||||
}
|
||||
|
||||
/// An incoming message.
|
||||
#[derive(PartialEq, Eq, Decode)]
|
||||
#[cfg_attr(feature = "std", derive(Debug, Encode))]
|
||||
pub struct IncomingMessage {
|
||||
/// The source parachain.
|
||||
pub source: u32,
|
||||
/// The data of the message.
|
||||
pub data: Vec<u8>,
|
||||
}
|
||||
|
||||
/// A reference to a message.
|
||||
#[cfg(feature = "std")]
|
||||
pub struct MessageRef<'a> {
|
||||
/// The target parachain.
|
||||
pub target: u32,
|
||||
|
||||
Reference in New Issue
Block a user