Module dmp
Expand description
To prevent Out of Memory errors on the DownwardMessageQueue, an
exponential fee factor (DeliveryFeeFactor) is set. The fee factor
increments exponentially after the number of messages in the
DownwardMessageQueue passes a threshold. This threshold is set as:
// Maximum max sized messages that can be send to
// the DownwardMessageQueue before it runs out of memory
max_messages = MAX_POSSIBLE_ALLOCATION / max_downward_message_size
threshold = max_messages / THRESHOLD_FACTORBased on the THRESHOLD_FACTOR, the threshold is set as a fraction of the
total messages. The DeliveryFeeFactor increases for a message over the
threshold by:
DeliveryFeeFactor = DeliveryFeeFactor * (EXPONENTIAL_FEE_BASE + MESSAGE_SIZE_FEE_BASE * encoded_message_size_in_KB)
And decreases when the number of messages in the DownwardMessageQueue fall
below the threshold by:
DeliveryFeeFactor = DeliveryFeeFactor / EXPONENTIAL_FEE_BASE
As an extra defensive measure, a max_messages hard
limit is set to the number of messages in the DownwardMessageQueue. Messages
that would increase the number of messages in the queue above this hard
limit are dropped.
Modules§
- pallet
- The
palletmodule in each FRAME pallet hosts the most important items needed to construct this pallet.
Structs§
- Pallet
- The
Palletstruct, the main type that implements traits and standalone functions within the pallet.
Enums§
- Call
- Contains a variant per dispatchable extrinsic that this pallet has.
- Queue
Downward Message Error - An error sending a downward message.
Traits§
- Config
- Configuration trait of this pallet.
Type Aliases§
- Downward
Message Queues - The downward messages addressed for a certain para.
- Module
Deprecated - Type alias to
Pallet, to be used byconstruct_runtime.