Skip to main content

Getting Started - Intro to the Polkadot SDK

This section is under construction and moving! (Expect Chaos)
Not a production ready guide.

Agile coretime is only for the Kusama and testnet networks at the moment, and is not yet deployed on Polkadot. These guides are not production ready due to the moving nature of these features.

Using the Polkadot SDKโ€‹

At first glance, the Polkadot SDK can be rather overwhelming, and in a way it is - it packs a lot of tech into one place. The Polkadot SDK used to be overarching three repositories:

  • Polkadot - Which for a time, included both the client implementation and runtime, until the runtime was moved to the Polkadot Fellows organization.
  • Substrate - The underlying, core primitives and libraries for building blockchains (any blockchain, not just one for Polkadot). Much of Polkadot is built with Substrate!
  • Cumulus - A set of libraries and tools which pertain specifically with connecting blockchains to Polkadot, known as parachains.

For an in-depth dive into the monorepo, it is highly recommended that you look into the Polkadot SDK Docs, which explains everything.

What is a task?

You might see the term "task" referenced quite a bit, but in most cases, it refers to a process utilizing Polkadot's compute. This could be a parachain or any other computational process, provided that it adheres to the Polkadot protocol.

The full definition can be found here.

  1. Reserving a ParaId, where you will upload your runtime and genesis state.
  2. Compiling the runtime (written in Rust) to a WebAssembly blob, thereby defining how your state transitions from one state to the next. This runtime is created using the Polkadot SDK.
  3. Ensure your chain spec is viable and ready to be deployed as a live, working parachain.
  4. Generating your genesis state and wasm.
  5. Obtaining a core, most likely through a Coretime marketplace.
  6. Assigning that core to your ParaId.
  7. Ensuring you have at least one honest, synced collator for your task

Deploying on a Coreโ€‹

Once you have your runtime and pallets developed, you will be able to deploy it on a core, which is how one utilizes the shared security of the Polkadot network. One does so by:

Install dependenciesโ€‹

Make sure you have everything you need for your target system here.

Deployment Example - Adder Collatorโ€‹

Try out the above by deploying the adder collator, a very simple "counter" parachain implementation..

OpenZeppelin Templates & Guidesโ€‹

OpenZeppelin offers a generic parachain template, which has support for:

  • Proxy Pallet
  • Multisig Pallet
  • Governance support - a treasury, referenda (OpenGov!), and assets configuration
  • Collation/Parachain Support
  • XCM (Cross Consensus Messaging) Configuration and Support

For more information, check their Substrate parachain runtime guide.

Polkadot SDK Parachain Templateโ€‹

If you wish to the Polkadot SDK's Parachain template, please follow the Template to Core guide.