Skip to main content

Getting Started - Intro to the Polkadot SDK

This section is under construction.

Using the Polkadot SDKโ€‹

The Polkadot SDK is comprised of three important repositories:

  • Polkadot - This included both 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 pertaining specifically to 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 often in place of "parachain". In most cases, it refers to a process utilizing the relay chain's compute. This could be a parachain or any other computational process, provided that it adheres to the Polkadot protocol interface.

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.

Be sure you also install the polkadot-parachain and chain-spec-builder binaries, as they needed to start and run your chain!

Deployment Example - Adder Collatorโ€‹

Try out the above by deploying the adder collator, a straightforward "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.