Expand description

An introduction to the Polkadot SDK. Read this module to learn about the structure of the SDK, the tools that are provided as a part of it, and to gain a high level understanding of each.

§Polkadot SDK

Polkadot SDK provides the main resources needed to start building on the Polkadot network, a scalable, multi-chain blockchain platform that enables different blockchains to securely interoperate.

StackExchange

awesomeDot wiki forum

RFCs Runtime Manifesto

§Getting Started

The primary way to get started with the Polkadot SDK is to start writing a FRAME-based runtime. See:

§Components

§Substrate

Substrate-license GitHub Repo

substrate is the base blockchain framework used to power the Polkadot SDK. It is a full toolkit to create sovereign blockchains, including but not limited to those who connect to Polkadot as parachains.

§FRAME

Substrate-license GitHub Repo

frame is the framework used to create Substrate-based application logic, aka. runtimes. Learn more about the distinction of a runtime and node in reference_docs::wasm_meta_protocol.

§Cumulus

Cumulus-license GitHub Repo

cumulus transforms FRAME-based runtimes into Polkadot-compatible parachain runtimes, and Substrate-based nodes into Polkadot/Parachain-compatible nodes.

§XCM

XCM-license GitHub Repo

xcm, short for “cross consensus message”, is the primary format that is used for communication between parachains, but is intended to be extensible to other use cases as well.

§Polkadot

Polkadot-license GitHub Repo

polkadot is an implementation of a Polkadot node in Rust, by @paritytech. The Polkadot runtimes are located under the polkadot-fellows/runtimes repository.

§Summary

The following diagram summarizes how some of the components of Polkadot SDK work together:

flowchart LR
	subgraph SubstrateChain[A Substrate-based blockchain]
		Node
		Runtime
	end

    FRAME -.-> Runtime
    Substrate[Substrate Node Libraries] -.-> Node

A Substrate-based chain is a blockchain composed of a runtime and a node. As noted above, the runtime is the application logic of the blockchain, and the node is everything else. See crate::reference_docs::wasm_meta_protocol for an in-depth explanation of this. The former is built with frame, and the latter is built with rest of Substrate.

You can think of a Substrate-based chain as a white-labeled blockchain.

flowchart LR

	subgraph Polkadot[The Polkadot Relay Chain]
		PolkadotNode[Polkadot Node]
		PolkadotRuntime[Polkadot Runtime]
	end

    FRAME -.-> PolkadotRuntime
    Substrate[Substrate Node Libraries] -.-> PolkadotNode


Polkadot is itself a Substrate-based chain, composed of the exact same two components. It has specialized logic in both the node and the runtime side, but it is not “special” in any way.

A parachain is a “special” Substrate-based chain, whereby both the node and the runtime components have became “Polkadot-aware” using Cumulus.

flowchart LR
	subgraph Parachain[A Polkadot Parachain]
		ParachainNode[Parachain Node]
		ParachainRuntime[Parachain Runtime]
	end

    FRAME -.-> ParachainRuntime
    Substrate[Substrate Node Libraries] -.-> ParachainNode

    CumulusC[Cumulus Node Libraries] -.-> ParachainNode
    CumulusR[Cumulus Runtime Libraries] -.-> ParachainRuntime

§Notable Upstream Crates

§Trophy Section: Notable Downstream Projects

A list of projects and tools in the blockchain ecosystem that one way or another parts of the Polkadot SDK:

Modules§

  • Lean about Cumulus, the framework that transforms substrate-based chains into polkadot-enabled parachains.
  • Learn about FRAME, the framework used to build Substrate runtimes.
  • Learn about Polkadot as a platform.
  • Learn about different ways through which smart contracts can be utilized on top of Substrate, and in the Polkadot ecosystem.
  • Learn about Substrate, the main blockchain framework used in the Polkadot ecosystem.
  • Index of all the templates that can act as first scaffold for a new project.
  • Learn about XCM, the de-facto communication language between different consensus systems.