mirror of
https://github.com/pezkuwichain/pezkuwi-subxt.git
synced 2026-07-16 02:35:44 +00:00
424d61818e
* rejig candidate types a bit * adjust doc * describe basic PoV distribution * replace some straggling html links * address grumbles from review and fix links
1.3 KiB
1.3 KiB
Router Module
The Router module is responsible for storing and dispatching Upward and Downward messages from and to parachains respectively. It is intended to later handle the XCMP logic as well.
For each enacted block the queue_upward_messages entry-point is called.
Storage
Storage layout:
/// Messages ready to be dispatched onto the relay chain.
/// This is subject to `max_upward_queue_count` and
/// `watermark_queue_size` from `HostConfiguration`.
RelayDispatchQueues: map ParaId => Vec<UpwardMessage>;
/// Size of the dispatch queues. Caches sizes of the queues in `RelayDispatchQueue`.
/// First item in the tuple is the count of messages and second
/// is the total length (in bytes) of the message payloads.
RelayDispatchQueueSize: map ParaId => (u32, u32);
/// The ordered list of `ParaId`s that have a `RelayDispatchQueue` entry.
NeedsDispatch: Vec<ParaId>;
Initialization
No initialization routine runs for this module.
Routines
queue_upward_messages(ParaId, Vec<UpwardMessage>):- Updates
NeedsDispatch, and enqueues upward messages intoRelayDispatchQueueand modifies the respective entry inRelayDispatchQueueSize.
- Updates
Finalization
- Dispatch queued upward messages from
RelayDispatchQueuesin a FIFO order applying theconfig.watermark_upward_queue_sizeandconfig.max_upward_queue_countlimits.