You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
Copy file name to clipboardExpand all lines: develop/toolkit/parachains/light-clients.md
+1-1Lines changed: 1 addition & 1 deletion
Display the source diff
Display the rich diff
Original file line number
Diff line number
Diff line change
@@ -37,7 +37,7 @@ In the diagram above, the decentralized application queries on-chain account inf
37
37
38
38
Light clients can quickly verify the blockchain's state, including [GRANDPA finality](/polkadot-protocol/glossary#grandpa){target=\_blank} justifications.
39
39
40
-
!!!info "What does it mean to be 'trust-minimized'?"
40
+
!!!info "What does it mean to be *trust-minimized*?"
41
41
"Trust-minimized" means that the light client does not need to fully trust the full node from which it retrieves the state. This is achieved through the use of Merkle proofs, which allow the light client to verify the correctness of the state by checking the Merkle tree root.
Copy file name to clipboardExpand all lines: llms.txt
+11-67Lines changed: 11 additions & 67 deletions
Original file line number
Diff line number
Diff line change
@@ -645,30 +645,7 @@ decl_test_relay_chains! {
645
645
- [**`decl_test_parachains`**](https://github.com/paritytech/polkadot-sdk/blob/{{dependencies.repositories.polkadot_sdk.version}}/cumulus/xcm/xcm-emulator/src/lib.rs#L590){target=\_blank} - defines runtime and configuration for the parachains. Example:
Error fetching snippet from https://raw.githubusercontent.com/paritytech/polkadot-sdk/refs/tags/polkadot-stable2412/cumulus/parachains/integration-tests/emulated/chains/parachains/assets/asset-hub-westend/src/lib.rs
672
649
```
673
650
674
651
- [**`decl_test_bridges`**](https://github.com/paritytech/polkadot-sdk/blob/{{dependencies.repositories.polkadot_sdk.version}}/cumulus/xcm/xcm-emulator/src/lib.rs#L1178){target=\_blank} - creates bridges between chains, specifying the source, target, and message handler. Example:
@@ -5724,40 +5701,7 @@ my-pallet/
5724
5701
With the directory structure set, you can use the [`polkadot-sdk-parachain-template`](https://github.com/paritytech/polkadot-sdk-parachain-template/tree/master/pallets){target=\_blank} to get started as follows:
Error fetching snippet from https://raw.githubusercontent.com/paritytech/polkadot-sdk-parachain-template/refs/tags/v0.0.2/pallets/template/src/benchmarking.rs
5761
5705
```
5762
5706
5763
5707
In your benchmarking tests, employ these best practices:
description: Learn about Polkadot light clients, their importance, usage, and how they enable robust, cohesive, and secure application composition.
10644
+
description:Light clients enable secure and efficient blockchain interaction without running a full node. Learn everything you need to know about light clients on Polkadot.
10701
10645
---
10702
10646
10703
10647
# Light Clients
@@ -10720,7 +10664,7 @@ Light clients are particularly valuable for resource-constrained environments an
10720
10664
10721
10665
## Light Clients Workflow
10722
10666
10723
-
Unlike JSON-RPC interfaces, where an application must either maintain a list of providers or rely on a single node, light clients are not limited to nor dependent on a single node. They use cryptographic proofs to verify the blockchain's state, ensuring it is both up-to-date and accurate. By verifying only block headers, light clients avoid syncing the entire state, making them ideal for resource-constrained environments.
10667
+
Unlike JSON-RPC interfaces, where an application must maintain a list of providers or rely on a single node, light clients are not limited to or dependent on a single node. They use cryptographic proofs to verify the blockchain's state, ensuring it is up-to-date and accurate. By verifying only block headers, light clients avoid syncing the entire state, making them ideal for resource-constrained environments.
10724
10668
10725
10669
```mermaid
10726
10670
flowchart LR
@@ -10730,20 +10674,20 @@ LC -- Response --> DAPP
10730
10674
FN -- Response (validated via Merkle proof) --> LC
10731
10675
```
10732
10676
10733
-
In the diagram above, the decentralized application queries on-chain account information through the light client. The light client, which runs as part of the application, requires minimal memory and computational resources. It uses Merkle proofs to verify the state retrieved from a full node in a trust-minimized manner. Polkadot-compatible light clients utilize [warp syncing](https://spec.polkadot.network/sect-lightclient#sect-sync-warp-lightclient){target=\_blank}, which downloads only block headers.
10677
+
In the diagram above, the decentralized application queries on-chain account information through the light client. The light clientruns as part of the application and requires minimal memory and computational resources. It uses Merkle proofs to verify the state retrieved from a full node in a trust-minimized manner. Polkadot-compatible light clients utilize [warp syncing](https://spec.polkadot.network/sect-lightclient#sect-sync-warp-lightclient){target=\_blank}, which downloads only block headers.
10734
10678
10735
10679
Light clients can quickly verify the blockchain's state, including [GRANDPA finality](/polkadot-protocol/glossary#grandpa){target=\_blank} justifications.
10736
10680
10737
-
!!!info "What does it mean to be 'trust-minimized'?"
10738
-
"Trust-minimized" means that the light client does not need to fully trust the full node from which it retrieves state. This is achieved through the use of Merkle proofs, which allow the light client to verify the correctness of the state by checking the Merkle tree root.
10681
+
!!!info "What does it mean to be *trust-minimized*?"
10682
+
"Trust-minimized" means that the light client does not need to fully trust the full node from which it retrieves the state. This is achieved through the use of Merkle proofs, which allow the light client to verify the correctness of the state by checking the Merkle tree root.
10739
10683
10740
10684
## JSON-RPC and Light Client Comparison
10741
10685
10742
10686
Another common method of communication between a user interface (UI) and a node is through the JSON-RPC protocol. Generally, the UI retrieves information from the node, fetches network or [pallet](/polkadot-protocol/glossary#pallet){target=\_blank} data, and interacts with the blockchain. This is typically done in one of two ways:
10743
10687
10744
-
- **User-Controlled Nodes** - the UI connects to a node client installed on the user's machine
10688
+
- **User-controlled nodes** - the UI connects to a node client installed on the user's machine
10745
10689
- These nodes are secure, but installation and maintenance can be inconvenient
10746
-
- **Publicly Accessible Nodes** - the UI connects to a third-party-owned publicly accessible node client
10690
+
- **Publicly accessible nodes** - the UI connects to a third-party-owned publicly accessible node client
10747
10691
- These nodes are convenient but centralized and less secure. Applications must maintain a list of backup nodes in case the primary node becomes unavailable
10748
10692
10749
10693
While light clients still communicate with [full nodes](/polkadot-protocol/glossary#full-node), they offer significant advantages for applications requiring a secure alternative to running a full node:
@@ -10752,15 +10696,15 @@ While light clients still communicate with [full nodes](/polkadot-protocol/gloss
| Fully verifies all blocks of the chain | Verifies only the authenticity of blocks |
10754
10698
| Stores previous block data and the chain's storage in a database | Does not require a database |
10755
-
| Installation, maintenance, and execution are resource-intensive and require technical expertise | No installation; typically included as part of the application |
10699
+
| Installation, maintenance, and execution are resource-intensive and require technical expertise | No installation is typically included as part of the application |
10756
10700
10757
10701
## Using Light Clients
10758
10702
10759
10703
The [`smoldot`](https://github.com/smol-dot/smoldot){target=\_blank} client is the cornerstone of light client implementation for Polkadot SDK-based chains. It provides the primitives needed to build light clients and is also integrated into libraries such as [PAPI](#papi-light-client-support).
10760
10704
10761
10705
### PAPI Light Client Support
10762
10706
10763
-
The [Polkadot API (PAPI)](/develop//toolkit/api-libraries/papi){target=\_blank} library natively supports light client configurations, powered by [`smoldot`](https://github.com/smol-dot/smoldot){target=\_blank}. This allows developers to connect to multiple chains simultaneously using a light client.
10707
+
The [Polkadot API (PAPI)](/develop//toolkit/api-libraries/papi){target=\_blank} library natively supports light client configurations powered by [`smoldot`](https://github.com/smol-dot/smoldot){target=\_blank}. This allows developers to connect to multiple chains simultaneously using a light client.
0 commit comments