This proposal aims to fix the problem that occurred whilst opening the bi-directional HRMP channel between Robonomics and Statemine. The previous attempt successfully passed through the voting stage, but failed on the last stage due to insufficient weight provided for the XCM Transact operation to open channels. This proposal describes the fix for the problem and is based on the solution provided by the Polkadot team.
The proposal is to send an XCM message (xcmPallet.send
) to Statemine to execute a transaction with superuser (root) permission. This time it is not needed to transfer KSM from Kusama Treasury, so the transaction consists only of executing XCM Transact.
Preimage design can be reviewed here.
Encoded call hash:
0x946b6aee1b23b04bc3a8d1e60642ca567ed6c2e968876eaa981fcf0588c08a39
Encoded call data of this transaction, which can be decoded on Kusama:
0x630001000100a10f020406020208af2fb5011f0001010002141804000000000760f0f8d1e8000013000000000760f0f8d1e800060003009435775c1802083c01000800003c0000080000e803000000900100140d01010000000004000101006d6f646c70792f74727372790000000000000000000000000000000000000000
The XCM message that is sent to Statemine looks like:
0x1f0001010002141804000000000760f0f8d1e8000013000000000760f0f8d1e800060003009435775c1802083c01000800003c0000080000e803000000900100140d01010000000004000101006d6f646c70792f74727372790000000000000000000000000000000000000000
The message can be decoded on Statemine. It consists of polkadotXcm.send
, which sends a XCM message back to Kusama to perform Transact
of this call:
0x1802083c01000800003c0000080000e803000000900100
which can be decoded on Kusama. This call is a batch transaction with two calls: the first one accepts the open channel request (hrmp.hrmpAcceptOpenChannel
) from Robonomics (ParaId: 2048), and the second one to make a reciprocal open channel request (hrmp.hrmpInitOpenChannel
) to Robonomics.
Following the guidelines for calculating weight, this time requreWeightAtMost
is set to 2,000,000,000.
The message also includes a ClaimAsset
instruction to claim trapped fee assets (about 0.999955 KSM) from the previous proposal. After Transact
, it follows up with RefundSurplus
, which refunds any unused weight from execution, and then DepositAsset
, which instructs the executor to deposit any KSM that wasn't used on transaction fees back into Kusama Treasury.
Preimage design of the XCM message can be reviewed here.
Preimage design of the a batch transaction for accepting/requesting can be reviewed here.