mirror of
https://github.com/pezkuwichain/pezkuwi-subxt.git
synced 2026-05-30 10:31:03 +00:00
Downward Message Processing implementation (#1859)
* DMP: data structures and plumbing * DMP: Implement DMP logic in the router module DMP: Integrate DMP parts into the inclusion module * DMP: Introduce the max size limit for the size of a downward message * DMP: Runtime API for accessing inbound messages * OCD Small clean ups * DMP: fix the naming of the error * DMP: add caution about a non-existent recipient
This commit is contained in:
@@ -248,6 +248,11 @@ pub struct ValidationParams {
|
||||
pub block_data: BlockData,
|
||||
/// The current relay-chain block number.
|
||||
pub relay_chain_height: RelayChainBlockNumber,
|
||||
/// The MQC head for the DMQ.
|
||||
///
|
||||
/// The DMQ MQC head will be used by the validation function to authorize the downward messages
|
||||
/// passed by the collator.
|
||||
pub dmq_mqc_head: Hash,
|
||||
/// The list of MQC heads for the inbound HRMP channels paired with the sender para ids. This
|
||||
/// vector is sorted ascending by the para id and doesn't contain multiple entries with the same
|
||||
/// sender.
|
||||
|
||||
@@ -97,6 +97,7 @@ fn execute_good_on_parent(execution_mode: ExecutionMode) {
|
||||
block_data: GenericBlockData(block_data.encode()),
|
||||
relay_chain_height: 1,
|
||||
hrmp_mqc_heads: Vec::new(),
|
||||
dmq_mqc_head: Default::default(),
|
||||
},
|
||||
&execution_mode,
|
||||
sp_core::testing::TaskExecutor::new(),
|
||||
@@ -135,6 +136,7 @@ fn execute_good_chain_on_parent() {
|
||||
block_data: GenericBlockData(block_data.encode()),
|
||||
relay_chain_height: number as RelayChainBlockNumber + 1,
|
||||
hrmp_mqc_heads: Vec::new(),
|
||||
dmq_mqc_head: Default::default(),
|
||||
},
|
||||
&execution_mode,
|
||||
sp_core::testing::TaskExecutor::new(),
|
||||
@@ -174,6 +176,7 @@ fn execute_bad_on_parent() {
|
||||
block_data: GenericBlockData(block_data.encode()),
|
||||
relay_chain_height: 1,
|
||||
hrmp_mqc_heads: Vec::new(),
|
||||
dmq_mqc_head: Default::default(),
|
||||
},
|
||||
&execution_mode,
|
||||
sp_core::testing::TaskExecutor::new(),
|
||||
|
||||
@@ -43,6 +43,7 @@ fn terminates_on_timeout() {
|
||||
parent_head: Default::default(),
|
||||
relay_chain_height: 1,
|
||||
hrmp_mqc_heads: Vec::new(),
|
||||
dmq_mqc_head: Default::default(),
|
||||
},
|
||||
&execution_mode,
|
||||
sp_core::testing::TaskExecutor::new(),
|
||||
@@ -71,6 +72,7 @@ fn parallel_execution() {
|
||||
parent_head: Default::default(),
|
||||
relay_chain_height: 1,
|
||||
hrmp_mqc_heads: Vec::new(),
|
||||
dmq_mqc_head: Default::default(),
|
||||
},
|
||||
&execution_mode,
|
||||
sp_core::testing::TaskExecutor::new(),
|
||||
@@ -82,6 +84,7 @@ fn parallel_execution() {
|
||||
parent_head: Default::default(),
|
||||
relay_chain_height: 1,
|
||||
hrmp_mqc_heads: Vec::new(),
|
||||
dmq_mqc_head: Default::default(),
|
||||
},
|
||||
&execution_mode2,
|
||||
sp_core::testing::TaskExecutor::new(),
|
||||
|
||||
Reference in New Issue
Block a user