referrerpolicy=no-referrer-when-downgrade

Module polkadot_sdk_docs::reference_docs

source ·
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:

  1. Crucial to know.
  2. Is too high level to be in the rust-doc of any one type, trait or fn.
  3. 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§

  • Learn about the way Substrate and FRAME view their blockchains as state machines.
  • Learn about chain specification file and the genesis state of the blockchain.
  • Learn about Substrate’s CLI, and how it can be extended.
  • Learn about how to add custom host functions to the node.
  • Learn about how to create custom RPC endpoints and runtime APIs.
  • 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.
  • Advice for configuring your development environment for Substrate development.
  • Learn about how extrinsics are encoded to be transmitted to a node and stored in blocks.
  • Learn about how to make a pallet/runtime that is fee-less and instead uses another mechanism to control usage and sybil attacks.
  • Learn about benchmarking and weight.
  • Learn about how to do logging in FRAME-based runtimes.
  • Learn about the offchain workers, how they function, and how to use them, as provided by the frame APIs.
  • Learn about Origins, a topic in FRAME that enables complex account abstractions to be built.
  • Learn about the different ways through which multiple frame pallets can be combined to work together.
  • Learn about composite enums and other runtime level types, such as RuntimeEvent and RuntimeCall.
  • Learn about Runtime Upgrades and best practices for writing Migrations.
  • Learn about the details of what derives are needed for a type to be store-able in frame storage.
  • Learn about how frame-system handles account-ids, nonces, consumers and providers.
  • Learn about the token-related logic in FRAME and how to apply it to your use case.
  • The glossary.
  • Learn about metadata, the main means through which an upgradeable runtime communicates its properties to the outside world.
  • The polkadot-omni-node and its related binaries.
  • Learn about the differences between smart contracts and a FRAME-based runtime. They are both “code stored onchain”, but how do they differ?
  • Deprecated in favor of transaction extensions. SignedExtensions are deprecated in favor of TransactionExtensions.
  • Learn how Substrate and FRAME use traits and associated types to make modules generic in a type-safe manner.
  • 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.
  • Learn about the Polkadot Umbrella crate that re-exports all other crates.
  • Learn about the WASM meta-protocol of all Substrate-based chains.