Module polkadot_sdk_docs::polkadot_sdk
source · 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.
§Getting Started
The primary way to get started with the Polkadot SDK is to start writing a FRAME-based runtime. See:
polkadot
, to understand what is Polkadot as a development platform.substrate
, for an overview of what Substrate as the main blockchain framework of Polkadot SDK.frame
, to learn about how to write blockchain applications aka. “App Chains”.- Continue with the
polkadot_sdk_docs
’s “getting started”.
§Components
§Substrate
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 which connect to
Polkadot as parachains.
§FRAME
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
transforms FRAME-based runtimes into Polkadot-compatible parachain runtimes, and
Substrate-based nodes into Polkadot/Parachain-compatible nodes.
§XCM
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
is an implementation of a Polkadot node in Rust, by @paritytech
. The Polkadot
runtimes are located under the
polkadot-fellows/runtimes
repository.
§Binaries
The main binaries that are part of the Polkadot SDK are:
polkadot
: The Polkadot relay chain node binary, as noted above.polkadot-omni-node
: A white-labeled parachain collator node. See more incrate::reference_docs::omni_node
.polkadot-parachain-bin
: The collator node used to run collators for all Polkadot system parachains.frame-omni-bencher
: a benchmarking tool for FRAME-based runtimes. Nodes typically contain abenchmark
subcommand that does the same.chain_spec_builder
: Utility to build chain-specs Nodes typically contain abuild-spec
subcommand that does the same.subkey
: Substrate’s key management utility.substrate-node
is an extensive substrate node that contains the superset of all runtime and node side features. The corresponding runtime, called [kitchensink_runtime
] contains all of the modules that are provided withFRAME
. This node and runtime is only used for testing and demonstration.
§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 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 use parts of the Polkadot SDK:
Modules§
- 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.