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
+8-8Lines changed: 8 additions & 8 deletions
Display the source diff
Display the rich diff
Original file line number
Diff line number
Diff line change
@@ -1,6 +1,6 @@
1
1
---
2
2
title: Light Clients
3
-
description:Learn about Polkadot light clients, their importance, usage, and how they enable robust, cohesive, and secure application composition.
3
+
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.
4
4
---
5
5
6
6
# Light Clients
@@ -23,7 +23,7 @@ Light clients are particularly valuable for resource-constrained environments an
23
23
24
24
## Light Clients Workflow
25
25
26
-
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.
26
+
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.
27
27
28
28
```mermaid
29
29
flowchart LR
@@ -33,20 +33,20 @@ LC -- Response --> DAPP
33
33
FN -- Response (validated via Merkle proof) --> LC
34
34
```
35
35
36
-
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.
36
+
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.
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
40
!!!info "What does it mean to be 'trust-minimized'?"
41
-
"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.
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.
42
42
43
43
## JSON-RPC and Light Client Comparison
44
44
45
45
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:
46
46
47
-
-**User-Controlled Nodes** - the UI connects to a node client installed on the user's machine
47
+
-**User-controlled nodes** - the UI connects to a node client installed on the user's machine
48
48
- These nodes are secure, but installation and maintenance can be inconvenient
49
-
-**Publicly Accessible Nodes** - the UI connects to a third-party-owned publicly accessible node client
49
+
-**Publicly accessible nodes** - the UI connects to a third-party-owned publicly accessible node client
50
50
- These nodes are convenient but centralized and less secure. Applications must maintain a list of backup nodes in case the primary node becomes unavailable
51
51
52
52
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:
@@ -55,15 +55,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 |
57
57
| Stores previous block data and the chain's storage in a database | Does not require a database |
58
-
| Installation, maintenance, and execution are resource-intensive and require technical expertise | No installation; typically included as part of the application |
58
+
| Installation, maintenance, and execution are resource-intensive and require technical expertise | No installation is typically included as part of the application |
59
59
60
60
## Using Light Clients
61
61
62
62
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).
63
63
64
64
### PAPI Light Client Support
65
65
66
-
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.
66
+
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