referrerpolicy=no-referrer-when-downgrade

Module dmp

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_FACTOR

Based 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§

inbound_downward_queue
Inbound downward message queue types.
migration
Storage migrations for the dmp pallet.
pallet
The pallet module in each FRAME pallet hosts the most important items needed to construct this pallet.
weights
Autogenerated weights for polkadot_runtime_parachains::dmp

Structs§

Pallet
The Pallet struct, the main type that implements traits and standalone functions within the pallet.

Enums§

Call
Contains a variant per dispatchable extrinsic that this pallet has.
Event
The Event enum of this pallet
QueueDownwardMessageError
An error sending a downward message.

Traits§

Config
Configuration trait of this pallet.
WeightInfo
Weight functions needed for polkadot_runtime_parachains::dmp.

Type Aliases§

DownwardMessageQueueLazyDelete
Queue with ParaIds and the [first, last) page range to be deleted.
DownwardMessageQueueMeta
Metadata for managing DownwardMessageQueuePages.
DownwardMessageQueuePages
Linked message data list to hold inbound downward message pages.
ModuleDeprecated
Type alias to Pallet, to be used by construct_runtime.