Obtain Coretime¶
Introduction¶
Securing coretime is essential for operating a parachain on Polkadot. It provides your parachain with guaranteed computational resources and access to Polkadot's shared security model, ensuring your blockchain can process transactions, maintain its state, and interact securely with other parachains in the network. Without coretime, a parachain cannot participate in the ecosystem or leverage the relay chain's validator set for security.
Coretime represents the computational resources allocated to your parachain on the Polkadot network. It determines when and how often your parachain can produce blocks and have them validated by the relay chain.
There are two primary methods to obtain coretime:
- Bulk coretime - purchase computational resources in advance for a full month
- On-demand coretime - buy computational resources as needed for individual block production
This guide explains the different methods of obtaining coretime and walks through the necessary steps to get your parachain running.
Prerequisites¶
Before obtaining coretime, ensure you have:
- Developed your parachain runtime using the Polkadot SDK
- Set up and configured a parachain collator for your target relay chain
- Successfully compiled your parachain collator node
- Generated and exported your parachain's genesis state
- Generated and exported your parachain's validation code (Wasm)
Initial Setup Steps¶
-
Reserve a unique identifier,
ParaID
, for your parachain:- Connect to the relay chain
- Submit the
registrar.reserve
extrinsic
Upon success, you'll receive a registered
ParaID
-
Register your parachain's essential information by submitting the
registrar.register
extrinsic with the following parameters:id
- your reservedParaID
genesisHead
- your exported genesis statevalidationCode
- your exported Wasm validation code
-
Start your parachain collator and begin synchronization with the relay chain
Obtaining Coretime¶
Bulk Coretime¶
Bulk coretime provides several advantages:
- Monthly allocation of resources
- Guaranteed block production slots (every 12 seconds, or 6 seconds with Asynchronous Backing)
- Priority renewal rights
- Protection against price fluctuations
- Ability to split and resell unused coretime
To purchase bulk coretime:
- Access the Coretime system parachain
- Interact with the Broker pallet
- Purchase your desired amount of coretime
- Assign the purchased core to your registered
ParaID
After successfully obtaining coretime, your parachain will automatically start producing blocks at regular intervals.
For current marketplaces and pricing, consult the Coretime Marketplaces page on the Polkadot Wiki.
On-demand Coretime¶
On-demand coretime allows for flexible, as-needed block production. To purchase:
- Ensure your collator node is fully synchronized with the relay chain
-
From the account that registered the
ParaID
, submit theonDemand.placeOrderAllowDeath
extrinsic with:maxAmountFor
- sufficient funds for the transactionparaId
- your registeredParaID
After succesfully executing the extrinsic, your parachain will produce a block.
| Created: October 18, 2024