## Module pezkuwi_sdk

Source
Expand description

An introduction to the Pezkuwi 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.

## §Pezkuwi SDK

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

### §Getting Started

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

- `pezkuwi`, to understand what is Pezkuwi as a development platform.
- `substrate`, for an overview of what Substrate as the main blockchain framework of Pezkuwi SDK.
- `frame`, to learn about how to write blockchain applications aka. “App Chains”.
- Continue with the `pezkuwi_sdk_docs`’s “getting started”.

### §Components

##### §Substrate

`substrate` is the base blockchain framework used to power the Pezkuwi SDK. It is a full toolkit to create sovereign blockchains, including but not limited to those which connect to Pezkuwi as teyrchains.

##### §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 Pezkuwi-compatible teyrchain runtimes, and Substrate-based nodes into Pezkuwi/Teyrchain-compatible nodes.

##### §XCM

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

##### §Pezkuwi

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

#### §Binaries

The main binaries that are part of the Pezkuwi SDK are:

- `pezkuwi`: The Pezkuwi relay chain node binary, as noted above.
- `pezkuwi-omni-node`: A white-labeled teyrchain collator node. See more in `crate::reference_docs::omni_node`.
- `pezkuwi-teyrchain-bin`: The collator node used to run collators for all Pezkuwi system teyrchains.
- `frame-omni-bencher`: a benchmarking tool for FRAME-based runtimes. Nodes typically contain a `benchmark` subcommand that does the same.
- [`chain_spec_builder`]: Utility to build chain-specs Nodes typically contain a `build-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 with `FRAME`. This node and runtime is only used for testing and demonstration.

#### §Summary

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

    flowchart LR
    	subgraph PezkuwiSDKChain[A Pezkuwi SDK-based blockchain]
    		Node
    		Runtime
    	end

        FRAME -.-> Runtime
        PezkuwiSDK[Pezkuwi SDK 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 Pezkuwi[The Pezkuwi Relay Chain]
    		PezkuwiNode[Pezkuwi Node]
    		PezkuwiRuntime[Pezkuwi Runtime]
    	end

        FRAME -.-> PezkuwiRuntime
        PezkuwiSDK[Pezkuwi SDK Node Libraries] -.-> PezkuwiNode

Pezkuwi 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 teyrchain is a “special” Substrate-based chain, whereby both the node and the runtime components have became “Pezkuwi-aware” using Cumulus.

    flowchart LR
    	subgraph TeyrChain[A Pezkuwi TeyrChain]
    		TeyrChainNode[TeyrChain Node]
    		TeyrChainRuntime[TeyrChain Runtime]
    	end

        FRAME -.-> TeyrChainRuntime
        PezkuwiSDK[Pezkuwi SDK Node Libraries] -.-> TeyrChainNode

        CumulusC[Cumulus Node Libraries] -.-> TeyrChainNode
        CumulusR[Cumulus Runtime Libraries] -.-> TeyrChainRuntime

### §Notable Upstream Crates

- `parity-scale-codec`
- `parity-db`
- `trie`
- `parity-common`

### §Trophy Section: Notable Downstream Projects

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

- Avail
- Cardano Partner Chains
- Starknet’s Madara Sequencer
- Polymesh

## Modules§

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