diff --git a/docs/assets/coretime/Lastic-UI.png b/docs/assets/coretime/Lastic-UI.png new file mode 100644 index 000000000000..73438695a783 Binary files /dev/null and b/docs/assets/coretime/Lastic-UI.png differ diff --git a/docs/assets/coretime/Lastic-manage-core.png b/docs/assets/coretime/Lastic-manage-core.png new file mode 100644 index 000000000000..7179a26b0e80 Binary files /dev/null and b/docs/assets/coretime/Lastic-manage-core.png differ diff --git a/docs/assets/coretime/RegionX-UI.png b/docs/assets/coretime/RegionX-UI.png new file mode 100644 index 000000000000..f5ce17622aca Binary files /dev/null and b/docs/assets/coretime/RegionX-UI.png differ diff --git a/docs/assets/coretime/coretime-collation-bulk.png b/docs/assets/coretime/coretime-collation-bulk.png new file mode 100644 index 000000000000..6d725a8787b1 Binary files /dev/null and b/docs/assets/coretime/coretime-collation-bulk.png differ diff --git a/docs/assets/coretime/coretime-create-new-collation.png b/docs/assets/coretime/coretime-create-new-collation.png new file mode 100644 index 000000000000..242e509eb60a Binary files /dev/null and b/docs/assets/coretime/coretime-create-new-collation.png differ diff --git a/docs/assets/coretime/coretime-on-demand-assignment.png b/docs/assets/coretime/coretime-on-demand-assignment.png new file mode 100644 index 000000000000..dc301e252e28 Binary files /dev/null and b/docs/assets/coretime/coretime-on-demand-assignment.png differ diff --git a/docs/assets/coretime/coretime-on-demand-parahead.png b/docs/assets/coretime/coretime-on-demand-parahead.png new file mode 100644 index 000000000000..86948d9177e1 Binary files /dev/null and b/docs/assets/coretime/coretime-on-demand-parahead.png differ diff --git a/docs/assets/coretime/coretime-parachain-onboarding.png b/docs/assets/coretime/coretime-parachain-onboarding.png new file mode 100644 index 000000000000..8646e8faf987 Binary files /dev/null and b/docs/assets/coretime/coretime-parachain-onboarding.png differ diff --git a/docs/assets/coretime/coretime-register-parathread.png b/docs/assets/coretime/coretime-register-parathread.png new file mode 100644 index 000000000000..d45eb0a10efd Binary files /dev/null and b/docs/assets/coretime/coretime-register-parathread.png differ diff --git a/docs/assets/coretime/coretime-reserve-paraID.png b/docs/assets/coretime/coretime-reserve-paraID.png new file mode 100644 index 000000000000..66b6888e8726 Binary files /dev/null and b/docs/assets/coretime/coretime-reserve-paraID.png differ diff --git a/docs/assets/coretime/lastic-assign-core.png b/docs/assets/coretime/lastic-assign-core.png new file mode 100644 index 000000000000..6b5b03034765 Binary files /dev/null and b/docs/assets/coretime/lastic-assign-core.png differ diff --git a/docs/assets/coretime/regionx-manage-cores.png b/docs/assets/coretime/regionx-manage-cores.png new file mode 100644 index 000000000000..33f291af7a80 Binary files /dev/null and b/docs/assets/coretime/regionx-manage-cores.png differ diff --git a/docs/assets/coretime/regionx-purchase-core.png b/docs/assets/coretime/regionx-purchase-core.png new file mode 100644 index 000000000000..de7255c94980 Binary files /dev/null and b/docs/assets/coretime/regionx-purchase-core.png differ diff --git a/docs/learn/learn-agile-coretime.md b/docs/learn/learn-agile-coretime.md index d3d2dcc5deb5..8bd1e42cad15 100644 --- a/docs/learn/learn-agile-coretime.md +++ b/docs/learn/learn-agile-coretime.md @@ -1,7 +1,7 @@ --- id: learn-agile-coretime title: Introduction to Agile Coretime -sidebar_label: Agile Coretime +sidebar_label: Agile Coretime Intro description: Introduction to Agile Coretime and its terminology keywords: [coretime, blockspace, parathread, parachain, cores] slug: ../learn-agile-coretime diff --git a/docs/learn/learn-guides-coretime-marketplaces.md b/docs/learn/learn-guides-coretime-marketplaces.md new file mode 100644 index 000000000000..c2ba493af086 --- /dev/null +++ b/docs/learn/learn-guides-coretime-marketplaces.md @@ -0,0 +1,64 @@ +--- +id: learn-guides-coretime-marketplaces +title: Coretime Marketplaces +sidebar_label: Coretime Marketplaces +description: Usage guides for coretime marketplaces +keywords: [coretime, blockspace, parathread, parachain, cores] +slug: ../learn-guides-coretime-marketplaces +--- + +The tutorials in this document utilize: + +- [CoreHub on RegionX](https://app.regionx.tech/), a user interface +for purchasing and managing Coretime regions. + +- [Lastic](https://test.lastic.xyz/start), a Coretime marketplace user interface. + +:::caution + +Both RegionX and Lastic are under active development and are released only for testing purposes. + +::: + +## RegionX + +The RegionX CoreHub offers options to purchase and manage cores. + +![RegionX-UI](../assets/coretime/RegionX-UI.png) + +### Purchasing Cores with RegionX + +RegionX allows for purchasing core with accounts hosted on wallets like Subwallet, Talisman, Nova +Wallet and Polkadot-JS Extension. Select the account to be used for the coretime purchase (displayed +on top right) and ensure that both the relay chain and coretime chain are connected (displayed on +bottom left). Then, click on the purchase button to sign and broadcast the transaction. + +![RegionX-purchase-bulk-coretime](../assets/coretime/regionx-purchase-core.png) + +### Managing Cores with RegionX + +The Regions dashboard lists all the cores purchased through the connected wallet account along with +the basic information of the respective core. It allows for partitioning, interlacing, transfers, and +assigning tasks. + +![RegionX-regions-dashboard](../assets/coretime/regionx-manage-cores.png) + +## Lastic + +Lastic is a marketplace for buying and selling blockspace. For more information, check +[Lastic's official documentation](https://docs.lastic.xyz/). + +### Purchasing Cores with Lastic + +Lastic allows for purchasing core with accounts hosted on wallets like Subwallet, Talisman, Nova +Wallet and Polkadot-JS Extension. Select the account to be used for the coretime purchase and then, +click on "buy core" button to sign and broadcast the transaction. + +![Lastic-purchase-bulk-coretime](../assets/coretime/Lastic-UI.png) + +### Managing Cores with Lastic + +Lastic enables you to transfer your core to another account, utilize it for a parachain, split it +up, change block production frequency, or assign it to a task. + +![Lastic-manage-core](../assets/coretime/Lastic-manage-core.png) diff --git a/docs/learn/learn-guides-coretime-parachains.md b/docs/learn/learn-guides-coretime-parachains.md new file mode 100644 index 000000000000..2d85dcb92ca5 --- /dev/null +++ b/docs/learn/learn-guides-coretime-parachains.md @@ -0,0 +1,129 @@ +--- +id: learn-guides-coretime-parachains +title: Agile Coretime for Parachains +sidebar_label: Coretime for Parachains +description: Agile Coretime from Parachains perspective +keywords: [coretime, blockspace, parathread, parachain, cores] +slug: ../learn-guides-coretime-parachains +--- + +The landscape for parachains on {{ polkadot: Polkadot :polkadot }}{{ kusama: Kusama :kusama }} +changes with the rollout of [Agile Coretime](./learn-agile-coretime.md). With +[auctions](./learn-auction.md) being phased out in favor of direct coretime sales, the existing +parachains on the relaychain and the prospective parachains are presented with the following +scenarios: + +- Migrating from a legacy parachain lease into a bulk coretime model +- Starting with bulk coretime model from scratch +- Running a parachain with on-demand coretime purchases ("pay as you go") + +The parachain lease auctions will stop on-chain with the enactment of the +[runtime upgrade 1.2.0](https://github.com/polkadot-fellows/runtimes/releases/tag/v1.2.0), and the +existing leases will be migrated to bulk coretime automatically. Leases that are yet to be started +will be canceled and the locked {{ polkadot: DOT :polkadot }}{{ kusama: KSM :kusama }} +will be refunded. The existing parachains benefit from +[coretime renewals](https://docs.lastic.xyz/coretime/renewals.html) which allows for the continued +assignment of bulk coretime for a core without going through the regular purchasing process. + +:::info + +The tutorials below assume that you have already developed the parachain runtime and a fully configured +parachain collator for the target relay chain using Polkadot-SDK. + +::: + +For the tutorials below, +[the adder test parachain](https://github.com/paritytech/polkadot-sdk/tree/6f3d890ed35bfdee3e3f7d59018345635a62d1cd/polkadot/parachain/test-parachains/adder) +on Polkadot-SDK has been used. To compile the `adder-collator`, run the command below in the +Polkadot-SDK repository. + +``` +cargo build -r -p test-parachain-adder-collator +``` + +After the test parachain collator node is successfully compiled, export its genesis state and the +code using the following commands. If the export succeeds, these two files should appear in +the Polkadot-SDK repository. + +``` +./target/release/adder-collator export-genesis-state genesis +``` + +``` +./target/release/adder-collator export-genesis-wasm genesis-wasm +``` + +## Reserve ParaID + +The first step is to register a `ParaID` for the on-demand parachain. This can be done through +Polkadot-JS UI by navigating to Network > Parachains > Parathreads and clicking on ParaID button. +Ensure that you have sufficient tokens to reserve the displayed `ParaID` successfully. + +:::info + +Reserving a `ParaID` requires a deposit of 40 KSM on Kusama and 100 DOT on Polkadot. + +::: + +![coretime-reserve-paraID](../assets/coretime/coretime-reserve-paraID.png) + +## Register Parachain State and Code + +The next step is to register the parachain's genesis wasm and state, which you should have generated earlier. + +:::info + +Registering the state and wasm code of the parachain requires a deposit that is computed based on +the size. For the `adder-collator` example here, it turns out to be around 46 KSM on Kusama and 116 +DOT on Polkadot. As, the deposit used for registering `ParaID` is already counted in for this +deposit, the total deposit requirement for registering `ParaID`, state and code for `adder-collator` +is around 46 KSM on Kusama and 116 DOT on Polkadot. + +::: + +![coretime-register-parathread](../assets/coretime/coretime-register-parathread.png) + +After successful registration, the parachain starts onboarding as a parathread. + +![coretime-onboarding-parathread](../assets/coretime/coretime-parachain-onboarding.png) + +## Run Parachain Collator + +While the parachain is onboarding, start syncing the collator using the following command to rapidly +sync with the specified relaychain. + +``` +./target/release/adder-collator --parachain-id= $ParaID --chain=rococo --sync fast-unsafe +``` + +## Run a Parachain with Bulk Coretime + +Now, you can purchase bulk coretime on [Coretime chain](./learn-guides-coretime-marketplaces.md) and +assign the purchased core to the registered `ParaID`. The snapshot below is from +[Lastic](https://test.lastic.xyz/) interface. + +![coretime-bulk-assign-lastic](../assets/coretime/lastic-assign-core.png) + +After successful assignment of the core, the `adder-collator` logs show new collations at regular +intervals, gradually incrementing the state by `2`. + +![coretime-collation-bulk](../assets/coretime/coretime-collation-bulk.png) + +## Run a Parachain with On-demand Coretime + +After the collator node is fully synced with the relay chain, navigate to Developer > Extrinsics on +the relay chain and issue `onDemandAssignmentProvider.placeOrderAllowDeath` extrinsic from the +account that registered the `ParaID` by specifying sufficient `maxAmount`for the transaction to go +through successfully. + +![coretime-ondemand-assignment](../assets/coretime/coretime-on-demand-assignment.png) + +With each successful on-demand extrinsic, the parachain head changes (you may have to zoom out on +the browser for parachain head details to show up on Polkadot-JS UI). + +![coretime-ondemand-parahead](../assets/coretime/coretime-on-demand-parahead.png) + +The successful collation can also be verified in the parachain collator logs. It can be +noticed that with each parachain block, the state of `adder-collator` is incremented by `2`. + +![coretime-new-collation](../assets/coretime/coretime-create-new-collation.png) diff --git a/polkadot-wiki/sidebars.js b/polkadot-wiki/sidebars.js index af56e1e97a72..41bea2cec705 100644 --- a/polkadot-wiki/sidebars.js +++ b/polkadot-wiki/sidebars.js @@ -457,6 +457,8 @@ module.exports = { }, items: [ "learn/learn-agile-coretime", + "learn/learn-guides-coretime-marketplaces", + "learn/learn-guides-coretime-parachains", ], }, {