Ordering Coretime

There are two types of coretime:

  • Bulk coretime - rent computation for an amount of time in advance (i.e., 28 days), requires renewal.
  • On-demand coretime - buy computation on-demand on a per block basis, requires sending an extrinsic to order a block.

For Educhain, we mostly use on-demand coretime and place order when we need to test something.

Ordering on-demand coretime

Ordering via CLI

You can use the polkadot-js-api to call any extrinsic, including on-demand coretime for your parachain.

Ensure you have it installed:

yarn global add @polkadot/api-cli
# or
npm -g install @polkadot/api-cli

Once installed, you can send the extrinsic as follows. Be sure to supplement a seed phrase with ROC (faucet here) and also replace PARA_ID with your parachain's ID on Paseo:

polkadot-js-api tx.onDemand.placeOrderAllowDeath \
1000000000000 \
PARA_ID \
--seed "your seed here" \
--ws "wss://paseo.rpc.amforc.com"

If you want to, you can also run a shell script which orders a block at regular intervals of time:

while :
do
    polkadot-js-api tx.onDemand.placeOrderAllowDeath \
        1000000000000 \
        PARA_ID \
        --seed "your seed here" \
        --ws "wss://paseo.rpc.amforc.com"
    sleep 12
done

Ordering via PolkadotJS

Use the following guides to order on-demand coretime through PolkadotJS.

Ordering Bulk Coretime

Use the following guides to order bulk coretime.