referrerpolicy=no-referrer-when-downgrade

Crate pallet_on_demand_para

Crate pallet_on_demand_para 

Source
Expand description

§On-demand Coretime pallet

Sale of on-demand Coretime from the Coretime chain.

The Relay chain owns the actual on-demand order queue; this pallet is a front-end for it which lives alongside pallet-broker on the Coretime chain:

  • Users call Pallet::place_order here and pay the spot price in the local currency.

  • Because the real queue is one hop away, the spot price cannot be read directly. Instead the pallet keeps a local estimate of the queue’s depth (QueueState) which grows with every order placed and shrinks by an assumed drain rate per Relay-chain block. The spot price is derived from that estimate using PriceParameters.

  • Orders accepted within a block are accumulated in PendingBatch and forwarded to the Relay chain in one go on finalization, via QueueOnDemandOrders.

    NOTE: It is important to make sure that this pallet is ordered before ParachainSystem in the runtime - otherwise the messages will not be sent in the block in which they are created, introducing additional latency.

Re-exports§

pub use weights::WeightInfo;
pub use pallet::*;

Modules§

pallet
The pallet module in each FRAME pallet hosts the most important items needed to construct this pallet.
weights
Autogenerated weights for pallet_on_demand_para

Structs§

DefaultPricingProvider
A type implementing the default algorithm for determining the order price.
EnqueuedOrder
Data about a placed on-demand order.
PriceParameters
The parameters used for pricing on-demand orders.
QueueTracker
The locally tracked, estimated state of the Relay chain’s on-demand order queue.

Traits§

PoolCapacityProvider
Type for getting information about the on-demand pool capacity.
PricingProvider
Type for determining the prices of on-demand orders
QueueOnDemandOrders
Instructs the Relay chain to enqueue a batch of on-demand orders.
WeightInfoExt

Type Aliases§

BalanceOf
PriceParametersOf
QueueTrackerOf
RelayBlockNumberOf
The Relay-chain block number, as seen by this pallet.