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
@@ -18141,6 +18142,206 @@ For a comprehensive guide to all Pop CLI features and advanced usage, see the of
18141
18142
Pop CLI also offers powerful solutions for smart contract developers. If you're interested in that path, check out the [Pop CLI Smart Contracts](https://learn.onpop.io/contracts) documentation.
description: Remote proxies enable cross-chain proxy functionality within the Polkadot ecosystem, allowing proxy accounts defined on one chain to execute transactions on different chains through cryptographic storage proofs.
18150
+
---
18151
+
18152
+
# Remote Proxies
18153
+
18154
+
!!!warning "Kusama Implementation Only"
18155
+
Remote proxies are currently only available on Kusama and its parachains (such as Kusama Asset Hub). This feature is not yet deployed on Polkadot MainNet. The examples and implementations described in this guide are specific to the Kusama ecosystem.
18156
+
18157
+
## Introduction
18158
+
18159
+
Remote proxies enable cross-chain proxy functionality within the Polkadot ecosystem, allowing proxy accounts defined on one chain to execute transactions on different chains through cryptographic storage proofs. This functionality extends the traditional [proxy system](https://wiki.polkadot.com/learn/learn-proxies/){target=\_blank} beyond single-chain boundaries.
18160
+
18161
+
This guide covers:
18162
+
18163
+
- Understanding remote proxy mechanics and architecture.
18164
+
- Implementation workflow and timing constraints.
18165
+
- Practical examples using Polkadot.js.
18166
+
- Advanced use cases and security considerations.
18167
+
18168
+
Remote proxies are particularly valuable for maintaining unified security models across multiple parachains while avoiding the complexity of managing separate proxy setups on each chain.
18169
+
18170
+
!!!note "Traditional vs Remote Proxies"
18171
+
Traditional proxies work within a single chain, where both the proxy and proxied accounts exist on the same blockchain. Remote proxies extend this concept across chains, using cryptographic proofs to verify proxy relationships without requiring account replication.
18172
+
18173
+
## Remote Proxy Architecture
18174
+
18175
+
Remote proxies operate through a trust and verification model using storage proofs. The target chain verifies the existence of proxy relationships on the source chain without requiring direct replication of proxy data.
In this architecture, Asset Hub trusts proxy definitions from the Relay Chain. When a remote proxy transaction is initiated, Asset Hub verifies the storage proof against its stored block roots from the Relay Chain, ensuring the proxy relationship is authentic and current.
18186
+
18187
+
The verification process utilizes [Merkle proofs](/polkadot-protocol/glossary/#trie-patricia-merkle-tree){target=\_blank} to confirm proxy permissions exist on the source chain at a specific block height.
18188
+
18189
+
!!!note "What makes remote proxies secure?"
18190
+
Remote proxies maintain security through cryptographic storage proofs that cannot be forged. The target chain verifies these proofs against trusted block roots, ensuring proxy relationships are authentic without requiring blind trust in external nodes.
18191
+
18192
+
## Implementation Workflow
18193
+
18194
+
Remote proxy execution follows a time-constrained workflow requiring coordination between multiple chains. The remote proxy workflow consists of several critical steps that must be completed within a narrow time window.
18195
+
18196
+
1. **Block Synchronization**: Query the target chain for recognized source chain blocks.
18197
+
2. **Storage Proof Creation**: Generate cryptographic proof of proxy relationship.
18198
+
3. **Transaction Construction**: Build the wrapped transaction with proof data.
18199
+
4. **Execution**: Submit the transaction before proof expiration.
18200
+
18201
+
Remote proxies operate under strict timing limitations.
18202
+
18203
+
- **Proof Validity**: Storage proofs expire after approximately **1 minute**.
Before implementing remote proxies, ensure you have:
18220
+
18221
+
- Active proxy relationship on the source chain (Kusama).
18222
+
- Access to both source and target chain RPC endpoints.
18223
+
- Compatible proxy types between chains.
18224
+
- Node.js environment for script execution.
18225
+
18226
+
### Installation and Setup
18227
+
18228
+
To implement remote proxies, you need to install the [`@polkadot/api`](/develop/toolkit/api-libraries/polkadot-js-api/){target=\_blank} package and create a script to execute the remote proxy transaction:
18229
+
18230
+
```bash
18231
+
pnpm add @polkadot/api
18232
+
```
18233
+
18234
+
Create your implementation script:
18235
+
18236
+
```bash
18237
+
touch remote-proxy-example.js
18238
+
```
18239
+
18240
+
### Implementation Example
18241
+
18242
+
Here is a complete implementation example of a remote proxy transaction:
18243
+
18244
+
```javascript title="remote-proxy-example.js"
18245
+
import { ApiPromise, WsProvider } from '@polkadot/api';
18246
+
18247
+
// Account configuration - replace with your addresses
Ensure to replace the `RECIPIENT_ACCOUNT` and `PROXIED_ACCOUNT` with your accounts. For a concrete example, check out the [Sending a remote proxy transaction via Polkadot-JS](https://blog.kchr.de/polkadot/guides/remote-proxies-for-the-braves/#sending-a-remote-proxy-transaction-via-polkadot-js){target=\_blank} section in the Remote Proxies article.
18329
+
18330
+
The code snippet above is a complete implementation example of a remote proxy transaction. It demonstrates how to:
18331
+
18332
+
- **Storage Key Generation**: The `proxyStorageKey` identifies where proxy relationship data is stored on Kusama. This key is used to create a proof that the relationship exists.
18333
+
- **Block Synchronization**: Asset Hub maintains a mapping of recent Kusama block numbers to their storage roots to enable proof verification without requiring full blockchain synchronization.
18334
+
- **Proof Creation**: The `getReadProof` RPC call generates a cryptographic proof that specific data exists in Kusama's state at a given block height.
18335
+
- **Transaction Wrapping**: The target transaction is wrapped within a `remoteProxy` call that includes both the proof data and the block anchor.
18336
+
18337
+
## Resources
18338
+
18339
+
- **[Remote Proxies for Braves](https://blog.kchr.de/polkadot/guides/remote-proxies-for-the-braves){target=\_blank}**
Copy file name to clipboardExpand all lines: llms.txt
+2-1Lines changed: 2 additions & 1 deletion
Original file line number
Diff line number
Diff line change
@@ -89,6 +89,7 @@
89
89
- [Polkadot Omni Node](https://raw.githubusercontent.com/polkadot-developers/polkadot-docs/refs/heads/master/develop/toolkit/parachains/polkadot-omni-node.md): Run parachain nodes easily with the polkadot-omni-node, a white-labeled binary that can run parachain nodes using a single pre-built solution.
90
90
- [Quickstart Parachain Development](https://raw.githubusercontent.com/polkadot-developers/polkadot-docs/refs/heads/master/develop/toolkit/parachains/quickstart/index.md): Bootstrap your development environment, scaffold template-based projects, deploy local networks, and simplify your workflow with tools for parachain developers.
91
91
- [Quickstart Parachain Development with Pop CLI](https://raw.githubusercontent.com/polkadot-developers/polkadot-docs/refs/heads/master/develop/toolkit/parachains/quickstart/pop-cli.md): Quickly bootstrap parachain projects, scaffold templates, deploy local networks, and streamline development workflows using Pop CLI.
92
+
- [Remote Proxies](https://raw.githubusercontent.com/polkadot-developers/polkadot-docs/refs/heads/master/develop/toolkit/parachains/remote-proxies.md): Remote proxies enable cross-chain proxy functionality within the Polkadot ecosystem, allowing proxy accounts defined on one chain to execute transactions on different chains through cryptographic storage proofs.
92
93
- [RPC Calls to Polkadot SDK chains.](https://raw.githubusercontent.com/polkadot-developers/polkadot-docs/refs/heads/master/develop/toolkit/parachains/rpc-calls.md): Learn how to interact with Polkadot SDK-based chains using RPC calls. This guide covers essential methods and usage via curl.
93
94
- [Spawn Networks for Testing](https://raw.githubusercontent.com/polkadot-developers/polkadot-docs/refs/heads/master/develop/toolkit/parachains/spawn-chains/index.md): Discover tools that enable you to spawn blockchains for testing, allowing for debugging, and validation of your blockchain setups in a controlled environment.
94
95
- [Get Started](https://raw.githubusercontent.com/polkadot-developers/polkadot-docs/refs/heads/master/develop/toolkit/parachains/spawn-chains/zombienet/get-started.md): Quickly install and configure Zombienet to deploy and test Polkadot-based blockchain networks with this comprehensive getting-started guide.
@@ -200,4 +201,4 @@
200
201
- [Create a dApp With Ethers.js](https://raw.githubusercontent.com/polkadot-developers/polkadot-docs/refs/heads/master/tutorials/smart-contracts/launch-your-first-project/create-dapp-ethers-js.md): Learn how to build a decentralized application on Polkadot Hub using Ethers.js and Next.js by creating a simple dApp that interacts with a smart contract.
201
202
- [Create a dApp With Viem](https://raw.githubusercontent.com/polkadot-developers/polkadot-docs/refs/heads/master/tutorials/smart-contracts/launch-your-first-project/create-dapp-viem.md): Learn how to build a decentralized application on Polkadot Hub using Viem and Next.js by creating a simple dApp that interacts with a smart contract.
202
203
- [Launch Your First Project](https://raw.githubusercontent.com/polkadot-developers/polkadot-docs/refs/heads/master/tutorials/smart-contracts/launch-your-first-project/index.md): Follow a step-by-step guide to creating, deploying, and managing your first smart contract project on Polkadot, from coding to execution.
203
-
- [Test and Deploy with Hardhat](https://raw.githubusercontent.com/polkadot-developers/polkadot-docs/refs/heads/master/tutorials/smart-contracts/launch-your-first-project/test-and-deploy-with-hardhat.md): Learn how to set up a Hardhat development environment, write comprehensive tests for Solidity smart contracts, and deploy to local and Polkadot Hub networks.
204
+
- [Test and Deploy with Hardhat](https://raw.githubusercontent.com/polkadot-developers/polkadot-docs/refs/heads/master/tutorials/smart-contracts/launch-your-first-project/test-and-deploy-with-hardhat.md): Learn how to set up a Hardhat development environment, write comprehensive tests for Solidity smart contracts, and deploy to local and Polkadot Hub networks.
0 commit comments