Expand description
Reference documents covering in-depth topics across the Polkadot SDK. It is suggested to read
these on-demand, while you are going through the guides
or other content.
§Polkadot SDK Reference Docs.
This is the entry point for all reference documents that enhance one’s learning experience in the Polkadot SDK.
Note that this module also contains the glossary.
§What is a “reference document”?
First, see why we use rust-docs for everything and our
documentation principles. We acknowledge that as much of
the crucial information should be embedded in the low level rust-docs. Then, high level
scenarios should be covered in crate::guides
. Finally, we acknowledge that there is a
category of information that is:
- Crucial to know.
- Is too high level to be in the rust-doc of any one
type
,trait
orfn
. - Is too low level to be encompassed in a
crate::guides
.
We call this class of documents “reference documents”. Our goal should be to minimize the number of “reference” docs, as they incur maintenance burden.
Modules§
- blockchain_
state_ machines - Learn about the way Substrate and FRAME view their blockchains as state machines.
- chain_
spec_ genesis - Learn about chain specification file and the genesis state of the blockchain.
- cli
- Learn about Substrate’s CLI, and how it can be extended.
- custom_
host_ functions - Learn about how to add custom host functions to the node.
- custom_
runtime_ api_ rpc - Learn about how to create custom RPC endpoints and runtime APIs.
- defensive_
programming - Learn about how to write safe and defensive code in your FRAME runtime.
Defensive programming is a design paradigm that enables a program to continue
running despite unexpected behavior, input, or events that may arise in runtime.
Usually, unforeseen circumstances may cause the program to stop or, in the Rust context,
panic!
. Defensive practices allow for these circumstances to be accounted for ahead of time and for them to be handled gracefully, which is in line with the intended fault-tolerant and deterministic nature of blockchains. - development_
environment_ advice - Advice for configuring your development environment for Substrate development.
- extrinsic_
encoding - Learn about how extrinsics are encoded to be transmitted to a node and stored in blocks.
- fee_
less_ runtime - Learn about how to make a pallet/runtime that is fee-less and instead uses another mechanism to control usage and sybil attacks.
- frame_
benchmarking_ weight - Learn about benchmarking and weight.
- frame_
logging - Learn about how to do logging in FRAME-based runtimes.
- frame_
offchain_ workers - Learn about the offchain workers, how they function, and how to use them, as provided by the
frame
APIs. - frame_
origin - Learn about Origins, a topic in FRAME that enables complex account abstractions to be built.
- frame_
pallet_ coupling - Learn about the different ways through which multiple
frame
pallets can be combined to work together. - frame_
runtime_ types - Learn about composite enums and other runtime level types, such as
RuntimeEvent
andRuntimeCall
. - frame_
runtime_ upgrades_ and_ migrations - Learn about Runtime Upgrades and best practices for writing Migrations.
- frame_
storage_ derives - Learn about the details of what derives are needed for a type to be store-able in
frame
storage. - frame_
system_ accounts - Learn about how frame-system handles
account-ids
, nonces, consumers and providers. - frame_
tokens - Learn about the token-related logic in FRAME and how to apply it to your use case.
- glossary
- The glossary.
- metadata
- Learn about metadata, the main means through which an upgradeable runtime communicates its properties to the outside world.
- omni_
node - The
polkadot-omni-node
and its related binaries. - runtime_
vs_ smart_ contract - Learn about the differences between smart contracts and a FRAME-based runtime. They are both “code stored onchain”, but how do they differ?
- signed_
extensions - Deprecated in favor of transaction extensions.
SignedExtension
s are deprecated in favor ofTransactionExtension
s. - state
- Learn about the state in Substrate.
- trait_
based_ programming - Learn how Substrate and FRAME use traits and associated types to make modules generic in a type-safe manner.
- transaction_
extensions - Learn about the transaction extensions that form a part of extrinsics. Transaction extensions are, briefly, a means for different chains to extend the “basic” extrinsic format with custom data that can be checked by the runtime.
- umbrella_
crate - Learn about the Polkadot Umbrella crate that re-exports all other crates.
- wasm_
meta_ protocol - Learn about the WASM meta-protocol of all Substrate-based chains.