From 56510bb4af9a48440ee4b288dd9557d1097aaa79 Mon Sep 17 00:00:00 2001 From: Bader Youssef Date: Tue, 3 Sep 2024 17:39:42 -0400 Subject: [PATCH 1/6] Add initial page (barebones) --- .../get-started/polkadot-sdk/.pages | 1 + .../polkadot-sdk/get-started-psdk.md | 98 +++++++++++++++++++ 2 files changed, 99 insertions(+) create mode 100644 develop/parachain-devs/get-started/polkadot-sdk/get-started-psdk.md diff --git a/develop/parachain-devs/get-started/polkadot-sdk/.pages b/develop/parachain-devs/get-started/polkadot-sdk/.pages index 7ad7de401..a220693fb 100644 --- a/develop/parachain-devs/get-started/polkadot-sdk/.pages +++ b/develop/parachain-devs/get-started/polkadot-sdk/.pages @@ -1,3 +1,4 @@ title: Polkadot SDK nav: - index.md + - get-started-psdk.md diff --git a/develop/parachain-devs/get-started/polkadot-sdk/get-started-psdk.md b/develop/parachain-devs/get-started/polkadot-sdk/get-started-psdk.md new file mode 100644 index 000000000..ef2ddb5d6 --- /dev/null +++ b/develop/parachain-devs/get-started/polkadot-sdk/get-started-psdk.md @@ -0,0 +1,98 @@ +--- +title: Getting Started - Intro to the Polkadot SDK +description: Get started with the Polkadot SDK, a comprehensive repository of libraries used for building on Polkadot and beyond. +--- + +!!! danger "Not a production ready guide." + This section is under construction and moving! + + Agile coretime is only for the Kusama and testnet networks at the moment, and is not yet deployed on + Polkadot. These guides are **not** production ready due to the moving nature of these features. + +## Using the Polkadot SDK + +The Polkadot SDK is what used to be overarching **three** repositories: + +- [**Polkadot**](https://paritytech.github.io/polkadot-sdk/master/polkadot_sdk_docs/polkadot_sdk/index.html#polkadot) - + For a time, this included both the client implementation and runtime, until the runtime was moved + to the [Polkadot Fellows organization](https://github.com/polkadot-fellows/runtimes). +- [**Substrate**](https://paritytech.github.io/polkadot-sdk/master/polkadot_sdk_docs/polkadot_sdk/index.html#substrate) - + The underlying, core primitives and libraries for building blockchains (any blockchain, not just + one for Polkadot). Polkadot itself is built with Substrate. +- [**Cumulus**](https://paritytech.github.io/polkadot-sdk/master/polkadot_sdk_docs/polkadot_sdk/index.html#cumulus) - + A set of libraries and tools which pertain specifically with connecting blockchains to Polkadot, + known as parachains. + +For an in-depth dive into the monorepo, it is highly recommended that you look into the [Polkadot SDK Rust documentation](https://paritytech.github.io/polkadot-sdk/master/polkadot_sdk_docs/polkadot_sdk/index.html) + + +1. **Reserving** a `ParaId`, where you will upload your runtime and genesis state +2. **Compiling** the runtime (written in Rust) to a WebAssembly blob, thereby defining how your state transitions from one state to the next. This runtime is created using the Polkadot SDK +3. **Ensure** your chain spec is viable and ready to be deployed as a live, working parachain +4. **Generating** your genesis state and wasm +5. **Obtaining** a core through a Coretime marketplace +6. **Assigning** that core to your `ParaId` +7. **Ensuring** you have at least one honest, synced collator for your task + +!!!info "What is a task?" + You might see the term "task" referenced quite a bit, but in most cases, it refers to a process + utilizing Polkadot's compute. This could be a parachain or any other computational process, provided + that it adheres to the Polkadot protocol. + + The full definition can be found on the [Polkadot Wiki](https://wiki.polkadot.network/docs/learn-agile-coretime#task). + +## Deploying on a Core + +Once you have your runtime and pallets developed, you will be able to deploy it on a +[core](../learn/learn-agile-coretime.md#core), which is how one utilizes the shared security of the Polkadot network. One does so by: + +```mermaid +flowchart TD + subgraph GA["Generate Artifacts"] + direction LR + A["Creating a runtime"]-->B["Compiling to Wasm"]-->C["Generate Genesis State"] + end + + subgraph PC["Procure ParaId & Core"] + direction LR + PARAID["Reserve ParaId"] + PARAID-->D["Buy Bulk Coretime"] + PARAID-->E["Issue On-Demand Coretime Extrinsic"] + end + + + subgraph DEP["Deploying"] + direction LR + F["Register artifacts to ParaId"]-->assign["Assign Core"]-->G["Sync collator"]-->H["Begin generating blocks!"] + end + +GA-->PC +PC-->DEP +``` + +### Install dependencies + +Make sure you have everything you need for your target system. + +### Deployment Example - Adder Collator + +Try out the above by deploying the adder collator, a very simple "counter" parachain implementation. + +## OpenZeppelin Templates & Guides + +OpenZeppelin offers a [generic parachain template](https://github.com/OpenZeppelin/polkadot-generic-runtime-template), which has support for: + +- Proxy Pallet +- Multisig Pallet +- Governance support - a treasury, referenda (OpenGov!), and assets configuration +- Collation/Parachain Support +- XCM (Cross Consensus Messaging) Configuration and Support + +For more information, check their +[Substrate parachain runtime guide.](https://docs.openzeppelin.com/substrate-runtimes/1.0.0/) + +## Getting Started with Parachains - Polkadot SDK Parachain Template + +If you wish to the +[Polkadot SDK's Parachain template](https://github.com/paritytech/polkadot-sdk-parachain-template), +please follow the [Template to Core guide.](./build-guides-template-basic.md) \ No newline at end of file From 5c6371a9f8a5850a9a12b169660f8b57b7dcec6c Mon Sep 17 00:00:00 2001 From: Bader Youssef Date: Thu, 5 Sep 2024 17:23:18 -0400 Subject: [PATCH 2/6] add stuff so far --- .../polkadot-sdk/get-started-psdk.md | 54 ++++++++++--------- 1 file changed, 29 insertions(+), 25 deletions(-) diff --git a/develop/parachain-devs/get-started/polkadot-sdk/get-started-psdk.md b/develop/parachain-devs/get-started/polkadot-sdk/get-started-psdk.md index ef2ddb5d6..2322b5f79 100644 --- a/develop/parachain-devs/get-started/polkadot-sdk/get-started-psdk.md +++ b/develop/parachain-devs/get-started/polkadot-sdk/get-started-psdk.md @@ -11,46 +11,46 @@ description: Get started with the Polkadot SDK, a comprehensive repository of li ## Using the Polkadot SDK -The Polkadot SDK is what used to be overarching **three** repositories: +The Polkadot SDK monorepo is composed of **three** repositories: -- [**Polkadot**](https://paritytech.github.io/polkadot-sdk/master/polkadot_sdk_docs/polkadot_sdk/index.html#polkadot) - +- [**Polkadot**](https://paritytech.github.io/polkadot-sdk/master/polkadot_sdk_docs/polkadot_sdk/index.html#polkadot){target=_blank} - For a time, this included both the client implementation and runtime, until the runtime was moved - to the [Polkadot Fellows organization](https://github.com/polkadot-fellows/runtimes). -- [**Substrate**](https://paritytech.github.io/polkadot-sdk/master/polkadot_sdk_docs/polkadot_sdk/index.html#substrate) - + to the [Polkadot Fellows organization](https://github.com/polkadot-fellows/runtimes){target=_blank}. +- [**Substrate**](https://paritytech.github.io/polkadot-sdk/master/polkadot_sdk_docs/polkadot_sdk/index.html#substrate){target=_blank} - The underlying, core primitives and libraries for building blockchains (any blockchain, not just one for Polkadot). Polkadot itself is built with Substrate. -- [**Cumulus**](https://paritytech.github.io/polkadot-sdk/master/polkadot_sdk_docs/polkadot_sdk/index.html#cumulus) - +- [**Cumulus**](https://paritytech.github.io/polkadot-sdk/master/polkadot_sdk_docs/polkadot_sdk/index.html#cumulus){target=_blank} - A set of libraries and tools which pertain specifically with connecting blockchains to Polkadot, known as parachains. -For an in-depth dive into the monorepo, it is highly recommended that you look into the [Polkadot SDK Rust documentation](https://paritytech.github.io/polkadot-sdk/master/polkadot_sdk_docs/polkadot_sdk/index.html) +For an in-depth dive into the monorepo, the [Polkadot SDK Rust documentation](https://paritytech.github.io/polkadot-sdk/master/polkadot_sdk_docs/polkadot_sdk/index.html){target=_blank} is highly recommended + + +## Zero to Hero with The Polkadot SDK + +The process of using the Polkadot SDK to deploying a parachain on a [core](https://wiki.polkadot.network/docs/learn-agile-coretime#core){target=_blank} can be summarized as follows. It is also possible to build standalone blockchains with the Polkadot SDK: 1. **Reserving** a `ParaId`, where you will upload your runtime and genesis state 2. **Compiling** the runtime (written in Rust) to a WebAssembly blob, thereby defining how your state transitions from one state to the next. This runtime is created using the Polkadot SDK 3. **Ensure** your chain spec is viable and ready to be deployed as a live, working parachain 4. **Generating** your genesis state and wasm -5. **Obtaining** a core through a Coretime marketplace +5. **Obtaining** a core through a [Coretime marketplace](https://wiki.polkadot.network/docs/learn-guides-coretime-marketplaces){target=_blank} 6. **Assigning** that core to your `ParaId` 7. **Ensuring** you have at least one honest, synced collator for your task !!!info "What is a task?" - You might see the term "task" referenced quite a bit, but in most cases, it refers to a process - utilizing Polkadot's compute. This could be a parachain or any other computational process, provided - that it adheres to the Polkadot protocol. - - The full definition can be found on the [Polkadot Wiki](https://wiki.polkadot.network/docs/learn-agile-coretime#task). + A task refers to a process utilizing Polkadot's compute. This could be a parachain or any other computational process, provided that it adheres to the Polkadot protocol. The full definition can be found on the [Polkadot Wiki](https://wiki.polkadot.network/docs/learn-agile-coretime#task). -## Deploying on a Core +### Deploying on a Core -Once you have your runtime and pallets developed, you will be able to deploy it on a -[core](../learn/learn-agile-coretime.md#core), which is how one utilizes the shared security of the Polkadot network. One does so by: +Once you have your runtime and pallets developed, it will be able to deploy it on a core, which is how one utilizes the shared security of the Polkadot network. One does so by: ```mermaid flowchart TD subgraph GA["Generate Artifacts"] direction LR - A["Creating a runtime"]-->B["Compiling to Wasm"]-->C["Generate Genesis State"] + A["Creating a runtime"]-->B["Generating a chain specification"]-->C["Generate Genesis State & Runtime Artifacts"] end subgraph PC["Procure ParaId & Core"] @@ -63,16 +63,22 @@ flowchart TD subgraph DEP["Deploying"] direction LR - F["Register artifacts to ParaId"]-->assign["Assign Core"]-->G["Sync collator"]-->H["Begin generating blocks!"] + F["Register artifacts to ParaId"]-->assign["Assign Core"]-->G["Sync collator"]-->H["Begin producing blocks"] end GA-->PC PC-->DEP ``` -### Install dependencies + + + + +### Install Dependencies + +Ensure all necessary dependencies are installed. -Make sure you have everything you need for your target system. + ### Deployment Example - Adder Collator @@ -80,7 +86,7 @@ Try out the above by deploying the adder collator, a very simple "counter" parac ## OpenZeppelin Templates & Guides -OpenZeppelin offers a [generic parachain template](https://github.com/OpenZeppelin/polkadot-generic-runtime-template), which has support for: +OpenZeppelin offers a [generic parachain template](https://github.com/OpenZeppelin/polkadot-generic-runtime-template){target=_blank}, which has support for: - Proxy Pallet - Multisig Pallet @@ -89,10 +95,8 @@ OpenZeppelin offers a [generic parachain template](https://github.com/OpenZeppel - XCM (Cross Consensus Messaging) Configuration and Support For more information, check their -[Substrate parachain runtime guide.](https://docs.openzeppelin.com/substrate-runtimes/1.0.0/) +[Substrate parachain runtime guide.](https://docs.openzeppelin.com/substrate-runtimes/1.0.0/){target=_blank} -## Getting Started with Parachains - Polkadot SDK Parachain Template +## Polkadot SDK Templates -If you wish to the -[Polkadot SDK's Parachain template](https://github.com/paritytech/polkadot-sdk-parachain-template), -please follow the [Template to Core guide.](./build-guides-template-basic.md) \ No newline at end of file +A full list of Polkadot SDK templates can be found within the [Rust documentation for the Polkadot SDK.](https://paritytech.github.io/polkadot-sdk/master/polkadot_sdk_docs/polkadot_sdk/templates/index.html){target=_blank} \ No newline at end of file From bbf00c31754d608c4073f9313824d02d84f458d9 Mon Sep 17 00:00:00 2001 From: Bader Youssef Date: Thu, 5 Sep 2024 17:25:10 -0400 Subject: [PATCH 3/6] no more "you" --- .../get-started/polkadot-sdk/get-started-psdk.md | 14 +++++++------- 1 file changed, 7 insertions(+), 7 deletions(-) diff --git a/develop/parachain-devs/get-started/polkadot-sdk/get-started-psdk.md b/develop/parachain-devs/get-started/polkadot-sdk/get-started-psdk.md index 2322b5f79..351a19435 100644 --- a/develop/parachain-devs/get-started/polkadot-sdk/get-started-psdk.md +++ b/develop/parachain-devs/get-started/polkadot-sdk/get-started-psdk.md @@ -31,20 +31,20 @@ For an in-depth dive into the monorepo, the [Polkadot SDK Rust documentation](ht The process of using the Polkadot SDK to deploying a parachain on a [core](https://wiki.polkadot.network/docs/learn-agile-coretime#core){target=_blank} can be summarized as follows. It is also possible to build standalone blockchains with the Polkadot SDK: -1. **Reserving** a `ParaId`, where you will upload your runtime and genesis state -2. **Compiling** the runtime (written in Rust) to a WebAssembly blob, thereby defining how your state transitions from one state to the next. This runtime is created using the Polkadot SDK -3. **Ensure** your chain spec is viable and ready to be deployed as a live, working parachain -4. **Generating** your genesis state and wasm +1. **Reserving** a `ParaId`, where the runtime and genesis state will be uploaded +2. **Compiling** the runtime (written in Rust) to a WebAssembly blob, thereby defining how state transitions from one state to the next. This runtime is created using the Polkadot SDK +3. **Generating** a chain spec that is viable and ready to be deployed as a live, working parachain +4. **Generating** the genesis state and wasm 5. **Obtaining** a core through a [Coretime marketplace](https://wiki.polkadot.network/docs/learn-guides-coretime-marketplaces){target=_blank} -6. **Assigning** that core to your `ParaId` -7. **Ensuring** you have at least one honest, synced collator for your task +6. **Assigning** that core to a `ParaId` +7. **Provisioning** at least one honest, synced collator is available for the task to begin producing blocks !!!info "What is a task?" A task refers to a process utilizing Polkadot's compute. This could be a parachain or any other computational process, provided that it adheres to the Polkadot protocol. The full definition can be found on the [Polkadot Wiki](https://wiki.polkadot.network/docs/learn-agile-coretime#task). ### Deploying on a Core -Once you have your runtime and pallets developed, it will be able to deploy it on a core, which is how one utilizes the shared security of the Polkadot network. One does so by: +Once the desired runtime and pallets have been developed, it will be able to deploy it on a core, which is how one utilizes the shared security of the Polkadot network. One does so by: ```mermaid flowchart TD From 0c8cb5ada6be1580f9ff62c6a7d96151f85e8955 Mon Sep 17 00:00:00 2001 From: DAWN KELLY Date: Tue, 1 Oct 2024 14:00:55 -0400 Subject: [PATCH 4/6] expanded on some content, updates per review --- .../get-started/polkadot-sdk/.pages | 2 +- .../polkadot-sdk/get-started-psdk.md | 109 ++++++++++++------ 2 files changed, 73 insertions(+), 38 deletions(-) diff --git a/develop/parachain-devs/get-started/polkadot-sdk/.pages b/develop/parachain-devs/get-started/polkadot-sdk/.pages index a220693fb..4fe9a8862 100644 --- a/develop/parachain-devs/get-started/polkadot-sdk/.pages +++ b/develop/parachain-devs/get-started/polkadot-sdk/.pages @@ -1,4 +1,4 @@ title: Polkadot SDK nav: - index.md - - get-started-psdk.md + - 'Get Started with Polkadot SDK': 'get-started-psdk.md' diff --git a/develop/parachain-devs/get-started/polkadot-sdk/get-started-psdk.md b/develop/parachain-devs/get-started/polkadot-sdk/get-started-psdk.md index 351a19435..af598ad7f 100644 --- a/develop/parachain-devs/get-started/polkadot-sdk/get-started-psdk.md +++ b/develop/parachain-devs/get-started/polkadot-sdk/get-started-psdk.md @@ -1,61 +1,97 @@ --- -title: Getting Started - Intro to the Polkadot SDK -description: Get started with the Polkadot SDK, a comprehensive repository of libraries used for building on Polkadot and beyond. +title: Get Started with Polkadot SDK +description: Get started with the Polkadot SDK, a comprehensive repository providing all the components needed to start building on the Polkadot network. --- -!!! danger "Not a production ready guide." - This section is under construction and moving! +# Get Started with Polkadot SDK - Agile coretime is only for the Kusama and testnet networks at the moment, and is not yet deployed on - Polkadot. These guides are **not** production ready due to the moving nature of these features. +## Introduction -## Using the Polkadot SDK +The Polkadot SDK is a powerful toolset designed to facilitate building on the Polkadot network. It provides the necessary components for creating custom parachains, connecting them to Polkadot, and taking advantage of Polkadot's shared security. Whether you're building a standalone chain or deploying a parachain, this SDK equips developers with the libraries and tools needed to manage runtime logic, compile the codebase, and utilize the network's core features like staking, governance, and cross-chain communication. -The Polkadot SDK monorepo is composed of **three** repositories: +!!! danger "Not Production Ready" + This section is under construction. Expect frequent changes. -- [**Polkadot**](https://paritytech.github.io/polkadot-sdk/master/polkadot_sdk_docs/polkadot_sdk/index.html#polkadot){target=_blank} - - For a time, this included both the client implementation and runtime, until the runtime was moved - to the [Polkadot Fellows organization](https://github.com/polkadot-fellows/runtimes){target=_blank}. -- [**Substrate**](https://paritytech.github.io/polkadot-sdk/master/polkadot_sdk_docs/polkadot_sdk/index.html#substrate){target=_blank} - - The underlying, core primitives and libraries for building blockchains (any blockchain, not just - one for Polkadot). Polkadot itself is built with Substrate. -- [**Cumulus**](https://paritytech.github.io/polkadot-sdk/master/polkadot_sdk_docs/polkadot_sdk/index.html#cumulus){target=_blank} - - A set of libraries and tools which pertain specifically with connecting blockchains to Polkadot, - known as parachains. + Agile coretime is not yet deployed on Polkadot and is only for the Kusama and TestNet networks. These features remain under development. -For an in-depth dive into the monorepo, the [Polkadot SDK Rust documentation](https://paritytech.github.io/polkadot-sdk/master/polkadot_sdk_docs/polkadot_sdk/index.html){target=_blank} is highly recommended +## Explore the Polkadot SDK + +The Polkadot SDK monorepo combines multiple repositories to provide all the components needed to start building on the Polkadot network: + +??? function "[**Polkadot**](https://paritytech.github.io/polkadot-sdk/master/polkadot_sdk_docs/polkadot_sdk/index.html#polkadot){target=\_blank} - implementation of a Polkadot node in Rust" + + === "Key Features" + + - [`core-primitives`](https://github.com/paritytech/polkadot-sdk/blob/master/polkadot/core-primitives/src/lib.rs){target=\_blank} - source file defining types for primitives such as `ChainId`, `Balance`, and `BlockNumber` which are used throughout development + - [`cli`](https://github.com/paritytech/polkadot-sdk/blob/master/polkadot/cli/src/cli.rs){target=\_blank} - source file defining commands for the Polkadot CLI library + - [`primitives`](https://github.com/paritytech/polkadot-sdk/blob/master/polkadot/primitives/src/lib.rs){target=\_blank} - source file defining types shared between the runtime and the node services + - [`rpc`](https://github.com/paritytech/polkadot-sdk/blob/master/polkadot/rpc/src/lib.rs){target=\_blank} - source file containing Polkadot-specific RPC implementation + + === "Resources" + + - [Install the node](https://github.com/paritytech/polkadot-sdk/tree/master/polkadot#installation){target=\_blank} - from pre-compiled binary + - [Build the client](https://github.com/paritytech/polkadot-sdk/tree/master/polkadot#building){target=\_blank} - build from source with Cargo and Docker + - [Get TestNet tokens](https://wiki.polkadot.network/docs/learn-DOT#obtaining-testnet-tokens){target=\_blank} - instructions on getting TestNet tokens for Paseo (PAS) and Westend (WND) + +??? function "[**Substrate**](https://github.com/paritytech/polkadot-sdk/tree/master/substrate){target=\_blank} - a Rust framework for building blockchains in a modular and extensible way" + + === "Key Features" + + - [`client`](https://github.com/paritytech/polkadot-sdk/tree/master/substrate/client){target=\_blank} - crates that lead to the node software such as notification protocols, syncing algorithms, and discovery mechanisms + - [`primitives`](https://github.com/paritytech/polkadot-sdk/tree/master/substrate/primitives){target=\_blank} - crates that facilitate both the node and the runtime including host functions for `hashing`, `logging`, and `storage` + - [`frame`](https://github.com/paritytech/polkadot-sdk/tree/master/substrate/frame){target=\_blank} - The FRAME development environment provides modules (called "pallets") and support libraries that you can use, modify, and extend to build runtime logic to suit the needs of your blockchain. Includes key pallets like `BABE` and `GRANDPA` + + === "Resources" + + - Read about the [Substrate module](https://paritytech.github.io/polkadot-sdk/master/polkadot_sdk_docs/polkadot_sdk/substrate/index.html#){target=\_blank} + - [Substrate Stack Exchange](https://substrate.stackexchange.com/){target=\_blank} - ask questions and get answers from other developers + +??? function "[**Cumulus**](https://github.com/paritytech/polkadot-sdk/tree/master/cumulus){target=\_blank} - a set of libraries and tools focused on distribution, p2p, database, and synchronization layers for Polkadot parachains" + + === "Key Features" + + - [`parachain-consensus`](https://github.com/paritytech/polkadot-sdk/blob/master/cumulus/client/consensus/common/src/parachain_consensus.rs){target=\_blank} - a consensus engine to run a Polkadot node internally and dictate to the client and synchronization algorithms which chain to follow, finalize, and treat as best + - [`polkadot-parachain`](https://github.com/paritytech/polkadot-sdk/tree/master/cumulus/polkadot-parachain){target=\_blank} - binary which implements a Polkadot collator for the parachain + - [`validate_block`](https://github.com/paritytech/polkadot-sdk/tree/1617852a2f1caec796f2b218aecae2facaeacad6/cumulus/pallets/parachain-system/src/validate_block){target=\_blank} - function that is expected by Polkadot to validate a state transition + + === "Resources" + + - Read the [Cumulus Overview](https://github.com/paritytech/polkadot-sdk/blob/master/cumulus/docs/overview.md){target=\_blank} + - [Cumulus installation and setup](https://github.com/paritytech/polkadot-sdk/tree/master/cumulus#installation-and-setup){target=\_blank} - instructions to prepare your developer environment and launch a local network + +For an in-depth dive into the monorepo, the [Polkadot SDK Rust documentation](https://paritytech.github.io/polkadot-sdk/master/polkadot_sdk_docs/polkadot_sdk/index.html){target=\_blank} is highly recommended ## Zero to Hero with The Polkadot SDK -The process of using the Polkadot SDK to deploying a parachain on a [core](https://wiki.polkadot.network/docs/learn-agile-coretime#core){target=_blank} can be summarized as follows. It is also possible to build standalone blockchains with the Polkadot SDK: +The Polkadot SDK is a versatile tool that can be used to build both standalone blockchains and parachains. For standalone blockchains, developers can leverage the SDK's components to create independent networks with custom functionality. The process for deploying a parachain on a Polkadot [core](https://wiki.polkadot.network/docs/learn-agile-coretime#core){target=\_blank} can be summarized as follows: -1. **Reserving** a `ParaId`, where the runtime and genesis state will be uploaded -2. **Compiling** the runtime (written in Rust) to a WebAssembly blob, thereby defining how state transitions from one state to the next. This runtime is created using the Polkadot SDK -3. **Generating** a chain spec that is viable and ready to be deployed as a live, working parachain -4. **Generating** the genesis state and wasm -5. **Obtaining** a core through a [Coretime marketplace](https://wiki.polkadot.network/docs/learn-guides-coretime-marketplaces){target=_blank} -6. **Assigning** that core to a `ParaId` -7. **Provisioning** at least one honest, synced collator is available for the task to begin producing blocks +1. **Reserve** a `ParaId`, where the runtime and genesis state will be uploaded +2. **Compile** the runtime (written in Rust) to a WebAssembly blob, thereby defining how state transitions from one state to the next. This runtime is created using the Polkadot SDK +3. **Generate** a chain spec that is viable and ready to be deployed as a live, working parachain +4. **Generate** the genesis state and wasm +5. **Obtain** a core through a [Coretime marketplace](https://wiki.polkadot.network/docs/learn-guides-coretime-marketplaces){target=\_blank} +6. **Assign** that core to a `ParaId` +7. **Provision** at least one honest, synced collator is available for the *task* to begin producing blocks !!!info "What is a task?" - A task refers to a process utilizing Polkadot's compute. This could be a parachain or any other computational process, provided that it adheres to the Polkadot protocol. The full definition can be found on the [Polkadot Wiki](https://wiki.polkadot.network/docs/learn-agile-coretime#task). + A [task](https://wiki.polkadot.network/docs/learn-agile-coretime#task){target=\_blank} refers to a process utilizing Polkadot's compute. This could be a parachain or any other computational process, provided that it adheres to the Polkadot protocol. ### Deploying on a Core -Once the desired runtime and pallets have been developed, it will be able to deploy it on a core, which is how one utilizes the shared security of the Polkadot network. One does so by: +After developing the desired runtime and implementing the necessary pallets, the next step is to deploy your parachain on a Polkadot core. This deployment process is crucial as it allows your parachain to leverage the shared security model of the Polkadot network. The deployment process involves several key steps: ```mermaid flowchart TD subgraph GA["Generate Artifacts"] direction LR - A["Creating a runtime"]-->B["Generating a chain specification"]-->C["Generate Genesis State & Runtime Artifacts"] + A["Create a runtime"]-->B["Generate a chain specification"]-->C["Generate Genesis State & Runtime Artifacts"] end - subgraph PC["Procure ParaId & Core"] + subgraph PC["Procure `ParaId` & Core"] direction LR - PARAID["Reserve ParaId"] + PARAID["Reserve `ParaId`"] PARAID-->D["Buy Bulk Coretime"] PARAID-->E["Issue On-Demand Coretime Extrinsic"] end @@ -63,7 +99,7 @@ flowchart TD subgraph DEP["Deploying"] direction LR - F["Register artifacts to ParaId"]-->assign["Assign Core"]-->G["Sync collator"]-->H["Begin producing blocks"] + F["Register artifacts to `ParaId`"]-->assign["Assign Core"]-->G["Sync collator"]-->H["Begin producing blocks"] end GA-->PC @@ -82,11 +118,11 @@ Ensure all necessary dependencies are installed. ### Deployment Example - Adder Collator -Try out the above by deploying the adder collator, a very simple "counter" parachain implementation. +Try out the preceding example by deploying the adder collator, a very simple "counter" parachain implementation. ## OpenZeppelin Templates & Guides -OpenZeppelin offers a [generic parachain template](https://github.com/OpenZeppelin/polkadot-generic-runtime-template){target=_blank}, which has support for: +OpenZeppelin offers a [generic parachain template](https://github.com/OpenZeppelin/polkadot-generic-runtime-template){target=\_blank}, which has support for: - Proxy Pallet - Multisig Pallet @@ -94,9 +130,8 @@ OpenZeppelin offers a [generic parachain template](https://github.com/OpenZeppel - Collation/Parachain Support - XCM (Cross Consensus Messaging) Configuration and Support -For more information, check their -[Substrate parachain runtime guide.](https://docs.openzeppelin.com/substrate-runtimes/1.0.0/){target=_blank} +For more information, check their [Substrate Parachain Runtimes](https://docs.openzeppelin.com/substrate-runtimes/1.0.0/){target=\_blank} guide. ## Polkadot SDK Templates -A full list of Polkadot SDK templates can be found within the [Rust documentation for the Polkadot SDK.](https://paritytech.github.io/polkadot-sdk/master/polkadot_sdk_docs/polkadot_sdk/templates/index.html){target=_blank} \ No newline at end of file +A full list of Polkadot SDK templates can be found within the [Rust documentation for the Polkadot SDK](https://paritytech.github.io/polkadot-sdk/master/polkadot_sdk_docs/polkadot_sdk/templates/index.html){target=\_blank}. \ No newline at end of file From c6ec0656b891afe7426c9ff0c7716473da7972e9 Mon Sep 17 00:00:00 2001 From: Bader Youssef Date: Wed, 2 Oct 2024 17:17:41 -0400 Subject: [PATCH 5/6] Address most comments --- .../polkadot-sdk/get-started-psdk.md | 47 ++++++------------- 1 file changed, 15 insertions(+), 32 deletions(-) diff --git a/develop/parachain-devs/get-started/polkadot-sdk/get-started-psdk.md b/develop/parachain-devs/get-started/polkadot-sdk/get-started-psdk.md index af598ad7f..9dbc68393 100644 --- a/develop/parachain-devs/get-started/polkadot-sdk/get-started-psdk.md +++ b/develop/parachain-devs/get-started/polkadot-sdk/get-started-psdk.md @@ -7,7 +7,7 @@ description: Get started with the Polkadot SDK, a comprehensive repository provi ## Introduction -The Polkadot SDK is a powerful toolset designed to facilitate building on the Polkadot network. It provides the necessary components for creating custom parachains, connecting them to Polkadot, and taking advantage of Polkadot's shared security. Whether you're building a standalone chain or deploying a parachain, this SDK equips developers with the libraries and tools needed to manage runtime logic, compile the codebase, and utilize the network's core features like staking, governance, and cross-chain communication. +The Polkadot SDK is a powerful and versatile developer kit designed to facilitate building on the Polkadot network. It provides the necessary components for creating custom parachains, connecting them to Polkadot, and taking advantage of Polkadot's shared security. Whether you're building a standalone chain or deploying a parachain, this SDK equips developers with the libraries and tools needed to manage runtime logic, compile the codebase, and utilize the network's core features like staking, governance, and cross-chain communication. !!! danger "Not Production Ready" This section is under construction. Expect frequent changes. @@ -59,29 +59,15 @@ The Polkadot SDK monorepo combines multiple repositories to provide all the comp - Read the [Cumulus Overview](https://github.com/paritytech/polkadot-sdk/blob/master/cumulus/docs/overview.md){target=\_blank} - [Cumulus installation and setup](https://github.com/paritytech/polkadot-sdk/tree/master/cumulus#installation-and-setup){target=\_blank} - instructions to prepare your developer environment and launch a local network -For an in-depth dive into the monorepo, the [Polkadot SDK Rust documentation](https://paritytech.github.io/polkadot-sdk/master/polkadot_sdk_docs/polkadot_sdk/index.html){target=\_blank} is highly recommended +For an in-depth dive into the monorepo, the [Polkadot SDK Rust documentation](https://paritytech.github.io/polkadot-sdk/master/polkadot_sdk_docs/polkadot_sdk/index.html){target=\_blank} is highly recommended. - - -## Zero to Hero with The Polkadot SDK - -The Polkadot SDK is a versatile tool that can be used to build both standalone blockchains and parachains. For standalone blockchains, developers can leverage the SDK's components to create independent networks with custom functionality. The process for deploying a parachain on a Polkadot [core](https://wiki.polkadot.network/docs/learn-agile-coretime#core){target=\_blank} can be summarized as follows: +### Deploying on a Core -1. **Reserve** a `ParaId`, where the runtime and genesis state will be uploaded -2. **Compile** the runtime (written in Rust) to a WebAssembly blob, thereby defining how state transitions from one state to the next. This runtime is created using the Polkadot SDK -3. **Generate** a chain spec that is viable and ready to be deployed as a live, working parachain -4. **Generate** the genesis state and wasm -5. **Obtain** a core through a [Coretime marketplace](https://wiki.polkadot.network/docs/learn-guides-coretime-marketplaces){target=\_blank} -6. **Assign** that core to a `ParaId` -7. **Provision** at least one honest, synced collator is available for the *task* to begin producing blocks +After developing the desired runtime and implementing the necessary pallets, the next step is to deploy your parachain as a task on a Polkadot [core](https://wiki.polkadot.network/docs/learn-agile-coretime#core){target=\_blank}. This deployment process is crucial as it allows your parachain to leverage the shared security model of the Polkadot network. The deployment process involves several key steps: !!!info "What is a task?" A [task](https://wiki.polkadot.network/docs/learn-agile-coretime#task){target=\_blank} refers to a process utilizing Polkadot's compute. This could be a parachain or any other computational process, provided that it adheres to the Polkadot protocol. -### Deploying on a Core - -After developing the desired runtime and implementing the necessary pallets, the next step is to deploy your parachain on a Polkadot core. This deployment process is crucial as it allows your parachain to leverage the shared security model of the Polkadot network. The deployment process involves several key steps: - ```mermaid flowchart TD subgraph GA["Generate Artifacts"] @@ -108,30 +94,27 @@ PC-->DEP - - ### Install Dependencies -Ensure all necessary dependencies are installed. - - +Ensure all necessary dependencies are installed. See [Install Polkadot SDK Dependencies](install-deps.md){target=\_blank}. ### Deployment Example - Adder Collator -Try out the preceding example by deploying the adder collator, a very simple "counter" parachain implementation. +Try out the preceding example by deploying the adder collator, a very simple "counter" parachain implementation. See [Agile Coretime for Parachains](https://wiki.polkadot.network/docs/learn-guides-coretime-parachains){target=\_blank} on the Polkadot Wiki. + +## Polkadot SDK Templates + +A full list of Polkadot SDK templates (both within the SDK and from third parties) can be found within the [Rust documentation for the Polkadot SDK](https://paritytech.github.io/polkadot-sdk/master/polkadot_sdk_docs/polkadot_sdk/templates/index.html){target=\_blank}. -## OpenZeppelin Templates & Guides +### OpenZeppelin Template -OpenZeppelin offers a [generic parachain template](https://github.com/OpenZeppelin/polkadot-generic-runtime-template){target=\_blank}, which has support for: +OpenZeppelin offers a [generic parachain template](https://github.com/OpenZeppelin/polkadot-runtime-templates?tab=readme-ov-file#generic-runtime-template){target=\_blank} and [an EVM template](https://github.com/OpenZeppelin/polkadot-runtime-templates?tab=readme-ov-file#evm-template){target=\_blank}, which has support for: - Proxy Pallet - Multisig Pallet -- Governance support - a treasury, referenda (OpenGov!), and assets configuration +- Governance support - a treasury, referenda, and assets configuration - Collation/Parachain Support - XCM (Cross Consensus Messaging) Configuration and Support +- EVM compatibility ([Frontier](https://github.com/polkadot-evm/frontier){target=\_blank} pallets) -For more information, check their [Substrate Parachain Runtimes](https://docs.openzeppelin.com/substrate-runtimes/1.0.0/){target=\_blank} guide. - -## Polkadot SDK Templates - -A full list of Polkadot SDK templates can be found within the [Rust documentation for the Polkadot SDK](https://paritytech.github.io/polkadot-sdk/master/polkadot_sdk_docs/polkadot_sdk/templates/index.html){target=\_blank}. \ No newline at end of file +For more information, check their [Substrate Parachain Runtimes](https://docs.openzeppelin.com/substrate-runtimes/1.0.0/){target=\_blank} guide. \ No newline at end of file From cd4865d20999cad6db828766c564df15e3be4936 Mon Sep 17 00:00:00 2001 From: Bader Youssef Date: Wed, 2 Oct 2024 17:33:35 -0400 Subject: [PATCH 6/6] absolute path --- .../parachain-devs/get-started/polkadot-sdk/get-started-psdk.md | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/develop/parachain-devs/get-started/polkadot-sdk/get-started-psdk.md b/develop/parachain-devs/get-started/polkadot-sdk/get-started-psdk.md index 9dbc68393..c76df75d3 100644 --- a/develop/parachain-devs/get-started/polkadot-sdk/get-started-psdk.md +++ b/develop/parachain-devs/get-started/polkadot-sdk/get-started-psdk.md @@ -96,7 +96,7 @@ PC-->DEP ### Install Dependencies -Ensure all necessary dependencies are installed. See [Install Polkadot SDK Dependencies](install-deps.md){target=\_blank}. +Ensure all necessary dependencies are installed. See [Install Polkadot SDK Dependencies](./install-deps.md){target=\_blank}. ### Deployment Example - Adder Collator