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_orderhere 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 usingPriceParameters. -
Orders accepted within a block are accumulated in
PendingBatchand forwarded to the Relay chain in one go on finalization, viaQueueOnDemandOrders.NOTE: It is important to make sure that this pallet is ordered before
ParachainSystemin 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
palletmodule in each FRAME pallet hosts the most important items needed to construct this pallet. - weights
- Autogenerated weights for
pallet_on_demand_para
Structs§
- Default
Pricing Provider - A type implementing the default algorithm for determining the order price.
- Enqueued
Order - Data about a placed on-demand order.
- Price
Parameters - The parameters used for pricing on-demand orders.
- Queue
Tracker - The locally tracked, estimated state of the Relay chain’s on-demand order queue.
Traits§
- Pool
Capacity Provider - Type for getting information about the on-demand pool capacity.
- Pricing
Provider - Type for determining the prices of on-demand orders
- Queue
OnDemand Orders - Instructs the Relay chain to enqueue a batch of on-demand orders.
- Weight
Info Ext
Type Aliases§
- Balance
Of - Price
Parameters Of - Queue
Tracker Of - Relay
Block Number Of - The Relay-chain block number, as seen by this pallet.