Skip to content

Commit c6f9562

Browse files
brunopgalvaoeshabennhussein11
authored
Add Obtain Coretime page (#1104)
* add parachains/launch-a-parachain/obtain-coretime.md * Update parachains/launch-a-parachain/obtain-coretime.md Co-authored-by: Nicolás Hussein <[email protected]> * Update content * grammar and formatting * update image names and fix links * minor edits * fix --------- Co-authored-by: Erin Shaben <[email protected]> Co-authored-by: Nicolás Hussein <[email protected]>
1 parent c6f8625 commit c6f9562

File tree

9 files changed

+900
-489
lines changed

9 files changed

+900
-489
lines changed

.ai/categories/parachains.md

Lines changed: 138 additions & 45 deletions
Original file line numberDiff line numberDiff line change
@@ -16537,84 +16537,177 @@ Page Title: Obtain Coretime
1653716537

1653816538
- Source (raw): https://raw.githubusercontent.com/polkadot-developers/polkadot-docs/master/.ai/pages/parachains-launch-a-parachain-obtain-coretime.md
1653916539
- Canonical (HTML): https://docs.polkadot.com/parachains/launch-a-parachain/obtain-coretime/
16540-
- Summary: Learn how to obtain and manage coretime for your Polkadot parachain. Explore bulk and on-demand options, prerequisites, and initial setup.
16540+
- Summary: Learn how to obtain coretime for block production with this guide, covering both on-demand and bulk options for smooth operations.
1654116541

1654216542
# Obtain Coretime
1654316543

1654416544
## Introduction
1654516545

16546-
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.
16546+
After deploying a parachain to Paseo in the [Deploy on Polkadot](/parachains/launch-a-parachain/deploy-to-polkadot/){target=\_blank} tutorial, the next critical step is obtaining coretime. Coretime is the mechanism through which validation resources are allocated from the relay chain to your parachain. Your parachain can only produce and finalize blocks on the relay chain by obtaining coretime.
1654716547

16548-
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.
16548+
There are two primary ways to obtain coretime:
1654916549

16550-
There are two primary methods to obtain coretime:
16550+
- **[On-demand coretime](#order-on-demand-coretime)**: Purchase coretime on a block-by-block basis, ideal for variable or unpredictable workloads.
16551+
- **[Bulk coretime](#purchase-bulk-coretime)**: Obtain a core or portion of a core for an extended period (up to 28 days), requiring renewal upon lease expiration.
1655116552

16552-
- **Bulk coretime**: Purchase computational resources in advance for a full month.
16553-
- **On-demand coretime**: Buy computational resources as needed for individual block production.
16553+
In this tutorial, you will:
1655416554

16555-
This guide explains the different methods of obtaining coretime and walks through the necessary steps to get your parachain running.
16555+
- Understand the different coretime options available.
16556+
- Learn how to purchase a core via bulk coretime.
16557+
- Assign your parachain to a core for block production.
16558+
- Explore on-demand coretime as an alternative approach.
1655616559

1655716560
## Prerequisites
1655816561

16559-
Before obtaining coretime, ensure you have:
16562+
Before proceeding, ensure you have the following:
1656016563

16561-
- Developed your parachain runtime using the Polkadot SDK.
16562-
- Set up and configured a parachain collator for your target relay chain.
16563-
- Successfully compiled your parachain collator node.
16564-
- Generated and exported your parachain's genesis state.
16565-
- Generated and exported your parachain's validation code (Wasm).
16564+
- A parachain ID reserved on Paseo.
16565+
- A properly configured chain specification file (both plain and raw versions).
16566+
- A registered parathread with the correct genesis state and runtime.
16567+
- A synced collator node running and connected to the Paseo relay chain.
16568+
- [PAS tokens](https://faucet.polkadot.io/?parachain=1005){target=\_blank} in your account on the Coretime Chain for transaction fees.
1656616569

16567-
## Initial Setup Steps
16570+
If you haven't completed these prerequisites, start by referring to the [Deploy on Polkadot](/parachains/launch-a-parachain/deploy-to-polkadot/){target=\_blank} tutorial.
1656816571

16569-
1. Reserve a unique identifier, `ParaID`, for your parachain:
16572+
## Order On-Demand Coretime
1657016573

16571-
1. Connect to the relay chain.
16572-
2. Submit the [`registrar.reserve`](https://paritytech.github.io/polkadot-sdk/master/polkadot_runtime_common/paras_registrar/pallet/dispatchables/fn.reserve.html){target=\_blank} extrinsic.
16574+
On-demand coretime allows you to purchase validation resources on a per-block basis. This approach is useful when you don't need continuous block production or want to test your parachain before committing to bulk coretime.
1657316575

16574-
Upon success, you'll receive a registered `ParaID`.
16576+
### On-Demand Extrinsics
1657516577

16576-
2. Register your parachain's essential information by submitting the [`registrar.register`](https://paritytech.github.io/polkadot-sdk/master/polkadot_runtime_common/paras_registrar/pallet/dispatchables/fn.register.html){target=\_blank} extrinsic with the following parameters:
16578+
There are two extrinsics available for ordering on-demand coretime:
1657716579

16578-
- **`id`**: Your reserved `ParaID`.
16579-
- **`genesisHead`**: Your exported genesis state.
16580-
- **`validationCode`**: Your exported Wasm validation code.
16580+
- **[`onDemand.placeOrderAllowDeath`](https://paritytech.github.io/polkadot-sdk/master/polkadot_runtime_parachains/on_demand/pallet/struct.Pallet.html#method.place_order_allow_death){target=\_blank}**: Will [reap](https://wiki.polkadot.com/learn/learn-accounts/#existential-deposit-and-reaping){target=\_blank} the account once the provided funds are depleted.
16581+
- **[`onDemand.placeOrderKeepAlive`](https://paritytech.github.io/polkadot-sdk/master/polkadot_runtime_parachains/on_demand/pallet/struct.Pallet.html#method.place_order_keep_alive){target=\_blank}**: Includes a check to prevent reaping the account, ensuring it remains alive even if funds run out.
1658116582

16582-
3. Start your parachain collator and begin synchronization with the relay chain.
16583+
### Place an On-Demand Order
1658316584

16584-
## Obtaining Coretime
16585+
To place an on-demand coretime order, follow these steps:
1658516586

16586-
### Bulk Coretime
16587+
1. Open the [Polkadot.js Apps interface connected to the Polkadot TestNet (Paseo)](https://polkadot.js.org/apps/?rpc=wss://paseo.dotters.network){target=\_blank}.
1658716588

16588-
Bulk coretime provides several advantages:
16589+
2. Navigate to **Developer > Extrinsics** in the top menu.
1658916590

16590-
- Monthly allocation of resources
16591-
- Guaranteed block production slots (every 12 seconds, or 6 seconds with [Asynchronous Backing](https://wiki.polkadot.com/learn/learn-async-backing/#asynchronous-backing){target=\_blank})
16592-
- Priority renewal rights
16593-
- Protection against price fluctuations
16594-
- Ability to split and resell unused coretime
16591+
3. Select the account that registered your parachain ID.
1659516592

16596-
To purchase bulk coretime:
16593+
4. From the **submit the following extrinsic** dropdown, select **onDemand** and then choose **placeOrderAllowDeath** as the extrinsic.
1659716594

16598-
1. Access the Coretime system parachain.
16599-
2. Interact with the Broker pallet.
16600-
3. Purchase your desired amount of coretime.
16601-
4. Assign the purchased core to your registered `ParaID`.
16595+
5. Configure the parameters:
1660216596

16603-
After successfully obtaining coretime, your parachain will automatically start producing blocks at regular intervals.
16597+
- **maxAmount**: The maximum amount of tokens you're willing to spend (e.g., `1000000000000`). This value may vary depending on network conditions.
16598+
- **paraId**: Your reserved parachain ID (e.g., `4508`).
1660416599

16605-
For current marketplaces and pricing, consult the [Coretime Marketplaces](https://wiki.polkadot.com/learn/learn-guides-coretime-marketplaces/){target=\_blank} page on the Polkadot Wiki.
16600+
6. Review the transaction details and click **Submit Transaction**.
1660616601

16607-
### On-demand Coretime
16602+
![Placing an on-demand order for coretime](/images/parachains/launch-a-parachain/obtain-coretime/obtain-coretime-01.webp)
1660816603

16609-
On-demand coretime allows for flexible, as-needed block production. To purchase:
16604+
Upon successful submission, your parachain will produce a new block. You can verify this by checking your collator node logs, which should display output confirming block production.
1661016605

16611-
1. Ensure your collator node is fully synchronized with the relay chain.
16612-
2. Submit the `onDemand.placeOrderAllowDeath` extrinsic on the relay chain with:
16606+
!!!note
16607+
Each successful on-demand extrinsic will trigger one block production cycle. For continuous block production, you'll need to place multiple orders or consider bulk coretime.
1661316608

16614-
- **`maxAmountFor`**: Sufficient funds for the transaction.
16615-
- **`paraId`**: Your registered `ParaID`.
16609+
## Purchase Bulk Coretime
1661616610

16617-
After successfully executing the extrinsic, your parachain will produce a block.
16611+
Bulk coretime offers a cost-effective way to maintain continuous block production. It lets you reserve a core for up to 28 days and renew it as needed.
16612+
16613+
You can purchase and manage cores on the [Coretime Chain](https://wiki.polkadot.com/learn/learn-system-chains/#coretime-chain){target=\_blank}, a system parachain that runs the [`pallet_broker`](https://paritytech.github.io/polkadot-sdk/master/pallet_broker/index.html){target=\_blank} to handle core sales, allocation, and renewal across the Polkadot ecosystem.
16614+
16615+
!!!tip
16616+
Paseo has a unique process for obtaining coretime cores. Refer to the [PAS-10 Onboard Paras Coretime](https://github.com/paseo-network/paseo-action-submission/blob/main/pas/PAS-10-Onboard-paras-coretime.md#summary){target=\_blank} guide for detailed instructions.
16617+
16618+
This tutorial shows you how to purchase bulk coretime using the [RegionX Coretime Marketplace](https://app.regionx.tech){target=\_blank}, a user-friendly interface for buying and managing cores on both the Polkadot TestNet and production networks.
16619+
16620+
![RegionX home page with Wallet connected](/images/parachains/launch-a-parachain/obtain-coretime/obtain-coretime-02.webp)
16621+
16622+
### Connect Your Wallet to RegionX
16623+
16624+
1. Visit the [RegionX App](https://app.regionx.tech){target=\_blank}.
16625+
16626+
2. Click the **Connect Wallet** button in the upper right corner.
16627+
16628+
3. Select your wallet provider and approve the connection.
16629+
16630+
### Obtain Coretime Chain Funds
16631+
16632+
To purchase a core, you need funds on the Coretime Chain. You can fund your account directly on the Coretime Chain using the Polkadot Faucet:
16633+
16634+
1. Visit the [Polkadot Faucet](https://faucet.polkadot.io/?parachain=0){target=\_blank}.
16635+
16636+
2. Select the **Coretime (Paseo)** network from the dropdown menu.
16637+
16638+
3. Paste your wallet address in the input field.
16639+
16640+
4. Click **Get some PASs** to receive 5000 PAS tokens.
16641+
16642+
!!!note
16643+
The Polkadot Faucet has a daily limit of 5,000 PAS tokens per account. If you need more tokens than this limit allows, you have two options:
16644+
16645+
- Return to the faucet on consecutive days to accumulate additional tokens.
16646+
- Create additional accounts, fund each one separately, and then transfer the tokens to your primary account that will be making the bulk coretime purchase.
16647+
16648+
Alternatively, to expedite the process, you can send a message to the [Paseo Support channel](https://matrix.to/#/#paseo-testnet-support:parity.io){target=\_blank} on Matrix, and the Paseo team will assist you in funding your account.
16649+
16650+
### Purchase a Core
16651+
16652+
1. From the RegionX home page, ensure the correct network is selected using the network switch in the top right corner (set to **Paseo**).
16653+
16654+
2. Review the information displayed on the home page, including:
16655+
- **Cores Remaining**: Number of available cores
16656+
- **Cores Offered**: Total cores in the current sale
16657+
- **Current price**: The price per core in PAS tokens
16658+
- **Auction Phase Status**: Current phase and progress
16659+
16660+
3. Click the **Purchase New Core** button displayed on the page.
16661+
16662+
4. A modal will appear detailing the transaction details and fees. Review the information carefully.
16663+
16664+
5. Click **Ok** and sign the transaction using your connected wallet.
16665+
16666+
6. Wait for the transaction to be confirmed on-chain.
16667+
16668+
### Verify Your Purchase
16669+
16670+
1. Once the transaction is confirmed, navigate to [**My Regions**](https://app.regionx.tech/regions){target=\_blank} from the left menu.
16671+
16672+
2. You should see your newly purchased core listed in your dashboard.
16673+
16674+
Congratulations! You've successfully purchased a core using RegionX.
16675+
16676+
### Assign Your Parachain to the Core
16677+
16678+
With your core purchased, you now need to assign your parachain to it for block production:
16679+
16680+
1. From the **My Regions** page, click on your core to select it.
16681+
16682+
2. Click the **Assign** option from the left-hand menu.
16683+
16684+
3. A modal will appear, allowing you to add a new task.
16685+
16686+
4. Click **Add Task** and enter the following information:
16687+
16688+
- **Parachain ID**: Your reserved parachain identifier
16689+
- **Project Name**: The name of your parachain project
16690+
16691+
5. Click **Add Task** to proceed.
16692+
16693+
6. Select your parachain task from the list.
16694+
16695+
7. Set the core's **Finality** setting:
16696+
16697+
- **Provisional**: Allows interlacing and partitioning of the core, but the region cannot be renewed as-is.
16698+
- **Final**: Prevents modification of the core but allows renewal. Choose this if you plan to renew the core.
16699+
16700+
8. Sign and submit the transaction.
16701+
16702+
Once confirmed, your parachain will be assigned to the core and should begin producing blocks (provided your collator is running and synced with the relay chain).
16703+
16704+
## Next Steps
16705+
16706+
Your parachain is now set up for block production. Consider the following:
16707+
16708+
- **Monitor your collator**: Keep your collator node running and monitor its performance.
16709+
- **Plan coretime renewal**: If using bulk coretime, plan to renew your core before the current lease expires.
16710+
- **Explore runtime upgrades**: Once comfortable with your setup, explore how to upgrade your parachain's runtime without interrupting block production.
1661816711

1661916712

1662016713
---

0 commit comments

Comments
 (0)