Skip to content

Commit 6545d53

Browse files
brunopgalvaonhussein11eshaben
authored
Add Parachains > Overview (#1035)
* add parachains/overview * Apply suggestion from @nhussein11 Co-authored-by: Nicolás Hussein <[email protected]> * Apply suggestion from @nhussein11 Co-authored-by: Nicolás Hussein <[email protected]> * Apply suggestion from @nhussein11 Co-authored-by: Nicolás Hussein <[email protected]> * Update content * Update content * Update parachains/overview.md Co-authored-by: Erin Shaben <[email protected]> * Update parachains/overview.md Co-authored-by: Erin Shaben <[email protected]> * Update content --------- Co-authored-by: Nicolás Hussein <[email protected]> Co-authored-by: Erin Shaben <[email protected]>
1 parent 199aa86 commit 6545d53

File tree

11 files changed

+1098
-764
lines changed

11 files changed

+1098
-764
lines changed

llms-files/llms-basics.txt

Lines changed: 87 additions & 60 deletions
Original file line numberDiff line numberDiff line change
@@ -3784,59 +3784,57 @@ These functionalities empower developers to build innovative, multi-chain applic
37843784
Doc-Content: https://docs.polkadot.com/parachains/overview/
37853785
--- BEGIN CONTENT ---
37863786
---
3787-
title: Introduction to Polkadot SDK
3788-
description: Learn about the Polkadot SDK, a robust developer toolkit for building custom blockchains. Explore its components and how it powers the Polkadot protocol.
3789-
categories: Basics, Tooling
3787+
title: Parachains Overview
3788+
description: Learn about parachains, specialized blockchains on Polkadot that gain shared security and interoperability. Discover how they work and the tools to build them.
3789+
categories: Basics, Parachains
37903790
---
37913791

3792-
# Introduction to Polkadot SDK
3792+
# Parachains Overview
37933793

37943794
## Introduction
37953795

3796-
The [Polkadot SDK](https://github.com/paritytech/polkadot-sdk/tree/{{dependencies.repositories.polkadot_sdk.version}}){target=\_blank} is a powerful and versatile developer kit designed to facilitate building on the Polkadot network. It provides the necessary components for creating custom blockchains, parachains, generalized rollups, and more. Written in the Rust programming language, it puts security and robustness at the forefront of its design.
3796+
A parachain is a specialized blockchain that connects to the Polkadot relay chain, benefiting from shared security, interoperability, and scalability. Parachains are built using the [Polkadot SDK](https://github.com/paritytech/polkadot-sdk){target=\_blank}, a powerful toolkit written in Rust that provides everything needed to create custom blockchain logic while integrating seamlessly with the Polkadot network.
37973797

3798-
Whether you're building a standalone chain or deploying a parachain on Polkadot, this SDK equips developers with the libraries and tools needed to manage runtime logic, compile the codebase, and utilize core features like staking, governance, and Cross-Consensus Messaging (XCM). It also provides a means for building generalized peer-to-peer systems beyond blockchains. The Polkadot SDK houses the following overall functionality:
3798+
Unlike standalone blockchains that must bootstrap their own validator sets and security, parachains leverage Polkadot's pooled security model. This allows parachain developers to focus on their application-specific functionality rather than consensus and security infrastructure. Parachains can communicate with each other through Cross-Consensus Messaging (XCM), enabling seamless interoperability across the Polkadot ecosystem.
37993799

3800-
- Networking and peer-to-peer communication (powered by [Libp2p](/polkadot-protocol/glossary#libp2p){target=\_blank}).
3801-
- Consensus protocols, such as [BABE](/polkadot-protocol/glossary#blind-assignment-of-blockchain-extension-babe){target=\_blank}, [GRANDPA](/polkadot-protocol/glossary#grandpa){target=\_blank}, or [Aura](/polkadot-protocol/glossary#authority-round-aura){target=\_blank}.
3802-
- Cryptography.
3803-
- The ability to create portable Wasm runtimes.
3804-
- A selection of pre-built modules, called [pallets](/polkadot-protocol/glossary#pallet){target=\_blank}.
3805-
- Benchmarking and testing suites.
3800+
Key capabilities that parachains provide include:
38063801

3807-
For an in-depth look at the monorepo, see the [Polkadot SDK Rust documentation](https://paritytech.github.io/polkadot-sdk/master/polkadot_sdk_docs/polkadot_sdk/index.html){target=\_blank}.
3802+
- **Shared security**: Inherit security from Polkadot's validator set without maintaining your own.
3803+
- **Interoperability**: Communicate trustlessly with other parachains via XCM.
3804+
- **Scalability**: Process transactions in parallel with other parachains.
3805+
- **Customization**: Build application-specific logic tailored to your use case.
3806+
- **Upgradeability**: Upgrade runtime logic without hard forks.
38083807

3809-
## Polkadot SDK Overview
3808+
## Polkadot SDK: Parachain Architecture
38103809

3811-
The Polkadot SDK is composed of five major components:
3810+
Building a parachain involves understanding and utilizing several key components of the Polkadot SDK:
38123811

38133812
![](/images/parachains/overview/overview-01.webp)
38143813

3815-
- **[Substrate](https://paritytech.github.io/polkadot-sdk/master/polkadot_sdk_docs/polkadot_sdk/substrate/index.html){target=\_blank}**: A set of libraries and primitives for building blockchains.
3816-
- **[FRAME](https://paritytech.github.io/polkadot-sdk/master/polkadot_sdk_docs/polkadot_sdk/frame_runtime/index.html){target=\_blank}**: A blockchain development framework built on top of Substrate.
3817-
- **[Cumulus](https://paritytech.github.io/polkadot-sdk/master/polkadot_sdk_docs/polkadot_sdk/cumulus/index.html){target=\_blank}**: A set of libraries and pallets to add parachain capabilities to a Substrate/FRAME runtime.
3818-
- **[XCM (Cross Consensus Messaging)](https://paritytech.github.io/polkadot-sdk/master/polkadot_sdk_docs/polkadot_sdk/xcm/index.html){target=\_blank}**: The primary format for conveying messages between parachains.
3819-
- **[Polkadot](https://paritytech.github.io/polkadot-sdk/master/polkadot_sdk_docs/polkadot_sdk/polkadot/index.html){target=\_blank}**: The node implementation for the Polkadot protocol.
3814+
- **[Substrate](https://paritytech.github.io/polkadot-sdk/master/polkadot_sdk_docs/polkadot_sdk/substrate/index.html){target=\_blank}**: The foundation providing core blockchain primitives and libraries.
3815+
- **[FRAME](https://paritytech.github.io/polkadot-sdk/master/polkadot_sdk_docs/polkadot_sdk/frame_runtime/index.html){target=\_blank}**: A modular framework for building your parachain's runtime logic.
3816+
- **[Cumulus](https://paritytech.github.io/polkadot-sdk/master/polkadot_sdk_docs/polkadot_sdk/cumulus/index.html){target=\_blank}**: Essential libraries and pallets that enable parachain functionality.
3817+
- **[XCM (Cross Consensus Messaging)](https://paritytech.github.io/polkadot-sdk/master/polkadot_sdk_docs/polkadot_sdk/xcm/index.html){target=\_blank}**: The messaging format for communicating with other parachains and the relay chain.
3818+
- **[Polkadot](https://paritytech.github.io/polkadot-sdk/master/polkadot_sdk_docs/polkadot_sdk/polkadot/index.html){target=\_blank}**: The relay chain that provides security and coordination.
38203819

3821-
### Substrate
3820+
### Substrate: The Foundation
38223821

3823-
Substrate is a Software Development Kit (SDK) that uses Rust-based libraries and tools to enable you to build application-specific blockchains from modular and extensible components. Application-specific blockchains built with Substrate can run as standalone services or in parallel with other chains to take advantage of the shared security provided by the Polkadot ecosystem. Substrate includes default implementations of the core components of the blockchain infrastructure to allow you to focus on the application logic.
3822+
Substrate provides the core infrastructure that every parachain is built upon. It handles the low-level blockchain functionality, allowing you to focus on your application's unique features. Substrate includes implementations for networking, database management, consensus participation, and the execution environment for your runtime.
38243823

3825-
Every blockchain platform relies on a decentralized network of computers—called nodes—that communicate with each other about transactions and blocks. In general, a node in this context is the software running on the connected devices rather than the physical or virtual machine in the network. As software, Substrate-based nodes consist of two main parts with separate responsibilities:
3824+
Every Polkadot SDK node consists of two main components:
38263825

3827-
- **Client**: Services to handle network and blockchain infrastructure activity.
3826+
- **Client (Host)**: Handles infrastructure services.
38283827

3829-
- Native binary.
3830-
- Executes the Wasm runtime.
3831-
- Manages components like database, networking, mempool, consensus, and others.
3832-
- Also known as "Host".
3828+
- Native binary that runs on validator and collator nodes.
3829+
- Executes the Wasm-compiled runtime.
3830+
- Manages networking, database, mempool, and block production.
3831+
- Interfaces with the relay chain for validation.
38333832

3834-
- **Runtime**: Business logic for state transitions.
3833+
- **Runtime (State Transition Function)**: Contains your business logic.
38353834

3836-
- Application logic.
3837-
- Compiled to [Wasm](https://webassembly.org/){target=\_blank}.
3838-
- Stored as a part of the chain state.
3839-
- Also known as State Transition Function (STF).
3835+
- Defines how your Polkadot SDK node processes transactions.
3836+
- Compiled to [Wasm](https://webassembly.org/){target=\_blank} for deterministic execution.
3837+
- Stored on-chain and upgradeable via governance.
38403838

38413839
```mermaid
38423840
%%{init: {'flowchart': {'padding': 5, 'nodeSpacing': 50, 'rankSpacing': 10}}}%%
@@ -3846,15 +3844,15 @@ graph TB
38463844
classDef clientSubNodeStyle margin-top:10px
38473845
classDef runtimeCallExecutorStyle padding-top:10px
38483846

3849-
subgraph sg1[Substrate<br /> Node]
3847+
subgraph sg1[Parachain<br /> Node]
38503848
direction TB
38513849

38523850
I[RuntimeCall Executor]
38533851
B[Wasm Runtime - STF]
38543852

38553853
subgraph sg2[Client]
38563854
direction TB
3857-
C[Network and Blockchain<br/>Infrastructure Services]
3855+
C[Network and Blockchain<br/>Infrastructure Services<br/>+ Relay Chain Interface]
38583856
end
38593857

38603858
I --> B
@@ -3867,23 +3865,23 @@ graph TB
38673865

38683866
```
38693867

3870-
### FRAME
3868+
### FRAME: Building Blocks for Your Runtime
38713869

3872-
FRAME provides the core modular and extensible components that make the Substrate SDK flexible and adaptable to different use cases. FRAME includes Rust-based libraries that simplify the development of application-specific logic. Most of the functionality that FRAME provides takes the form of plug-in modules called [pallets](/polkadot-protocol/glossary#pallet){target=\_blank} that you can add and configure to suit your requirements for a custom runtime.
3870+
FRAME provides modular components called [pallets](/reference/glossary#pallet){target=\_blank} that you can compose to build your parachain's runtime. Each pallet provides specific functionality that you can customize and configure for your needs. This modular approach allows you to quickly assemble complex functionality without writing everything from scratch.
38733871

38743872
```mermaid
38753873
graph LR
3876-
subgraph SP["<b style='font-size:18px;'>Runtime</b>"]
3874+
subgraph SP["<b style='font-size:18px;'>Parachain Runtime</b>"]
38773875
direction LR
3878-
Timestamp ~~~ Aura ~~~ GRANDPA
3876+
Timestamp ~~~ Aura ~~~ ParachainSystem
38793877
Balances ~~~ TransactionPayment ~~~ Sudo
38803878
subgraph Timestamp["Timestamp"]
38813879
SS1[Custom Config]
38823880
end
38833881
subgraph Aura["Aura"]
38843882
SS2[Custom Config]
38853883
end
3886-
subgraph GRANDPA["GRANDPA"]
3884+
subgraph ParachainSystem["Parachain System"]
38873885
SS3[Custom Config]
38883886
end
38893887
subgraph Balances["Balances"]
@@ -3897,7 +3895,7 @@ graph LR
38973895
end
38983896
style Timestamp stroke:#FF69B4
38993897
style Aura stroke:#FF69B4
3900-
style GRANDPA stroke:#FF69B4
3898+
style ParachainSystem stroke:#FF69B4
39013899
style Balances stroke:#FF69B4
39023900
style TransactionPayment stroke:#FF69B4
39033901
style Sudo stroke:#FF69B4
@@ -3909,38 +3907,67 @@ graph LR
39093907
style SS6 stroke-dasharray: 5
39103908

39113909
end
3912-
subgraph AP["<b style='font-size:18px;'>FRAME Pallets</b>"]
3910+
subgraph AP["<b style='font-size:18px;'>Available FRAME Pallets</b>"]
39133911
direction LR
3914-
A1[Aura]~~~A2[BABE]~~~A3[GRANDPA]~~~A4[Transaction<br>Payment]
3915-
B1[Identity]~~~B2[Balances]~~~B3[Sudo]~~~B4[EVM]
3916-
C1[Timestamp]~~~C2[Assets]~~~C3[Contracts]~~~C4[and more...]
3912+
A1[Aura]~~~A2[Parachain<br>System]~~~A3[Transaction<br>Payment]~~~A4[Sudo]
3913+
B1[Identity]~~~B2[Balances]~~~B3[Assets]~~~B4[EVM]
3914+
C1[Timestamp]~~~C2[Staking]~~~C3[Contracts]~~~C4[and more...]
39173915
end
39183916
AP --> SP
39193917
```
39203918

3921-
### Cumulus
3919+
### Cumulus: Parachain-Specific Functionality
39223920

3923-
Cumulus provides utilities and libraries to turn FRAME-based runtimes into runtimes that can be a parachain on Polkadot. Cumulus runtimes are still FRAME runtimes but contain the necessary functionality that allows that runtime to become a parachain on a relay chain.
3921+
Cumulus is what transforms a Polkadot SDK-based runtime into a parachain-capable runtime. It provides the essential components for communicating with the relay chain, participating in Polkadot's consensus, and handling parachain-specific operations like block validation and collation.
39243922

3925-
## Why Use Polkadot SDK?
3923+
Key Cumulus components include:
39263924

3927-
Using the Polkadot SDK, you can build application-specific blockchains without the complexity of building a blockchain from scratch or the limitations of building on a general-purpose blockchain. You can focus on crafting the business logic that makes your chain unique and innovative with the additional benefits of flexibility, upgradeability, open-source licensing, and cross-consensus interoperability.
3925+
- **Parachain system pallet**: Core parachain functionality and relay chain communication.
3926+
- **Collator consensus**: Block production logic for parachain collators.
3927+
- **Relay chain interface**: APIs for interacting with the Polkadot relay chain.
3928+
- **Validation data**: Handling proof-of-validity data required by relay chain validators.
39283929

3929-
## Create a Custom Blockchain Using the SDK
3930+
## Where to Go Next
39303931

3931-
Before starting your blockchain development journey, you'll need to decide whether you want to build a standalone chain or a parachain that connects to the Polkadot network. Each path has its considerations and requirements. Once you've made this decision, follow these development stages:
3932+
Building a parachain requires understanding the relationship between your chain and the Polkadot relay chain. The Polkadot SDK provides all the tools needed to design custom runtime logic, enable cross-chain communication, and deploy your parachain to production.
39323933

3933-
```mermaid
3934-
graph LR
3935-
A[Install the Polkadot SDK] --> B[Build the Chain]
3936-
B --> C[Deploy the Chain]
3937-
```
3934+
The following sections provide detailed guidance on each aspect of parachain development, from initial design through deployment and ongoing maintenance.
3935+
3936+
<div class="grid cards" markdown>
3937+
3938+
- <span class="badge guide">Guide</span> __Customize Your Runtime__
3939+
3940+
---
3941+
3942+
Design your parachain's runtime logic and choose appropriate pallets for your use case.
3943+
3944+
[:octicons-arrow-right-24: Get Started](/parachains/customize-runtime/)
3945+
3946+
- <span class="badge guide">Guide</span> __Interoperability__
39383947

3939-
1. **[Install the Polkadot SDK](/develop/parachains/install-polkadot-sdk/)**: Set up your development environment with all necessary dependencies and tools.
3940-
2. **[Build the chain](/develop/parachains/customize-parachain)**: Learn how to create and customize your blockchain's runtime, configure pallets, and implement your chain's unique features.
3941-
3. **[Deploy the chain](/develop/parachains/deployment)**: Follow the steps to launch your blockchain, whether as a standalone network or as a parachain on Polkadot.
3948+
---
3949+
3950+
Implement XCM for trustless cross-chain communication with other parachains.
3951+
3952+
[:octicons-arrow-right-24: Learn More](/parachains/interoperability/get-started/)
3953+
3954+
- <span class="badge guide">Guide</span> __Nodes & Validators__
3955+
3956+
---
3957+
3958+
Deploy your parachain to Polkadot by obtaining coretime and connecting to the relay chain.
39423959

3943-
Each stage is covered in detail in its respective guide, walking you through the process from initial setup to final deployment.
3960+
[:octicons-arrow-right-24: Deploy](/parachains/launch-a-parachain/choose-a-template/)
3961+
3962+
- <span class="badge guide">Guide</span> __Runtime Upgrades__
3963+
3964+
---
3965+
3966+
Upgrade your parachain's runtime without hard forks using forkless upgrade mechanisms.
3967+
3968+
[:octicons-arrow-right-24: Maintain](/parachains/runtime-maintenance/runtime-upgrades/)
3969+
3970+
</div>
39443971
--- END CONTENT ---
39453972

39463973
Doc-Content: https://docs.polkadot.com/polkadot-protocol/architecture/parachains/overview/

0 commit comments

Comments
 (0)