githubEdit

Acquire Coretime

The following guide shows how to acquire coretime.

In order to get a chain's block validated and finalised by the Relay chain it needs to acquire coretimearrow-up-right.

Acquire coretime using the following command:

pop call chain --url <relay_endpoint>
β”Œ   Pop CLI : Call a chain
β”‚
β—‡  What would you like to do?
β”‚  Purchase on-demand coretime 
β”‚
β—‡  Enter the value for the parameter: max_amount
β”‚  10000000
β”‚
β—‡  Enter the value for the parameter: para_id
β”‚  2000
β”‚
β—‡  Do you want to use your browser wallet to sign the extrinsic? (Selecting 'No' will prompt you to manually enter the secret key URI for signing, e.g., '//Alice')
β”‚  No
β”‚
β—‡  Signer of the extrinsic:
β”‚  <CHAIN MANAGER ACCOUNT>
...
       Event OnDemand ➜ OnDemandOrderPlaced
         para_id: Id(2000)
         spot_price: 1mUNIT
         ordered_by: <CHAIN MANAGER ACCOUNT>
...

Note: the max_amount (spot price willing to pay for a core) will vary depending on the Relay Network.

If the event OnDemandOrderPlaced is returned it means that your block will be validated and finalised!

Note: In the example above, you are prompted to provide a <private-key> to interact with the chain. However, this implies a potentially insecure way of handling private keys and should only be used for development accounts. For production accounts and enhanced security, Pop CLI offers the --use-wallet option to securely sign transactions. Refer to the Securely sign transactions from CLI guide for detailed instructions.

Resources

Learning Resources

Need help?

Ask on Polkadot Stack Exchangearrow-up-right (tag it poparrow-up-right) or drop by our Telegramarrow-up-right. We're here to help!

Last updated

Was this helpful?