Deployment Proxy
How we manage to deploy with one click
As seen in the Deployment Process, several steps are required to deploy a Polkadot Native Rollup on Polkadot. These processes occur at different moments in time and therefore require signing several extrinsics to complete the deployment.
To simplify this process for users, the PDP leverages Polkadot's Proxies. Polkadot’s proxies are highly flexible, as the permissions granted to the proxied account depend on the type of proxy the user selects.
How It Works
When a user deploys their Polkadot Native Rollup through the PDP, they sign a message granting the PDP system a proxy to their account. This proxy is currently of type NonTransfer
, ensuring that the PDP cannot transfer any funds from the user’s account. However, with this type of proxy, the PDP system can perform the following operations:
- Reserve a paraID: The paraID serves as the unique numeric identifier for the Polkadot Native Rollup.
- Register a Wasm and Head: These components—the initial code and genesis Head—are generated based on the user’s chosen configuration and the paraID reserved in step (1).
- Remove the proxy: Once deployment is complete, the PDP system uses the proxy to revoke its own access, ensuring it no longer has rights over the user’s account.
Visualizing the Proxy Process
Why This Solution
Deploying a Polkadot Native Rollup involves multiple actions at different times, both on-chain and off-chain. These actions are interdependent and must occur in sequence.
- The paraID must first be reserved.
- This paraID is then used to create the Wasm and Genesis Head for the Polkadot Native Rollup.
- Finally, the Wasm and Genesis Head must be registered.
Without a proxy, users would need to sign multiple on-chain transactions at various times, complicating the process and increasing the likelihood of errors. The proxy system streamlines this journey, making it efficient and error-resistant.
Future Enhancement:
The PDP team has opened a request to the Polkadot Fellowship to introduce a new type of proxy:ParaRegistration
. TheParaRegistration
proxy type will ensure that the PDP system can only perform actions strictly related to paraID reservation and Polkadot Native Rollup registration. This dramatically improves user safety by limiting PDP’s permissions.