Closed acatangiu closed 6 months ago
Actually sovereign accounts of AHP on AHK and vice-versa are no longer needed/used - checking.
Yes, not needed, removed from description.
Based on fees distribution documented in https://github.com/paritytech/parity-bridges-common/issues/2871, we will initially fund:
Polkadot BH accounts total: 10_100 DOT, Kusama BH accounts total: 2_030 KSM,
which should provide enough coverage for at least 5000 messages each way - in the meantime we'll continue working on an automated mechanism to move user paid fees to these accounts, and not require manual/governance rebalancing.
On Polkadot BridgeHub
ExportMessage
: 13cKp89SgdtqUngo2WiEijPrQWdHFhzYZLf2TJePKRvExk7o
(0x7369626ce8030000000000000000000000000000000000000000000000000000
) - 100 DOT13E5fui93Uyua5RtDv2LQj4aVBBHo6YREe3n6CBwYdqNqoxj
(0x627261700000000162686b7300726577617264732d6163636f756e7400000000
) - 5000 DOT13E5fui93Uyua5RtDv2c9kcAbfrVFeeHyJzHe8sn1Ti77Afd
(0x627261700000000162686b7301726577617264732d6163636f756e7400000000
) - 5000 DOTTotal: 10_100 DOT
On Kusama BridgeHub
ExportMessage
: FBeL7EFTDeHnuViqaUHUXvhhUusN5FawDmHgfvzF97DXFr3
(0x7369626ce8030000000000000000000000000000000000000000000000000000
) - 30 KSMEoQBtnwp4jMtCEpV7C88rKrz6x1qMBh2z74ibGSqtZRnuMM
(0x62726170000000016268706400726577617264732d6163636f756e7400000000
) - 1000 KSMEoQBtnwp4jMtCEpV7CPsssT6bdDHuHZmf3aGXxHJiSA4Dz3
(0x62726170000000016268706401726577617264732d6163636f756e7400000000
) - 1000 KSMTotal: 2_030 KSM
Options for funding:
Afaict, option 1 is not possible from the main relay chain treasury as it can't do cross-chain payouts.
Option 3 should work fine but I expect it to take a 1-2 weeks at best, delaying bridge operation.
In the interest of time I will go for Option 2 and act as the middleman, if small spender referendum is rejected, I will fallback on option 3.
I have created following funding referendums:
L.E. removed preimages for above referendums, they will fail even if they pass, we are going with Option 3 instead (see below)
Falling back to whitelisted caller (Option 3) instead of manual middleman transfer (Option 2).
Calls to whitelist and run:
0x1a0300016d6f646c70792f747273727900000000000000000000000000000000000000001a020c630903000100a90f03000101007369626ce8030000000000000000000000000000000000000000000000000000030400000000070010a5d4e80000000000630903000100a90f0300010100627261700000000162686b7300726577617264732d6163636f756e74000000000304000000000b00203d88792d0000000000630903000100a90f0300010100627261700000000162686b7301726577617264732d6163636f756e74000000000304000000000b00203d88792d0000000000
0x180300016d6f646c70792f7472737279000000000000000000000000000000000000000018020c630903000100a90f03000101007369626ce80300000000000000000000000000000000000000000000000000000304000000000b00e057eb481b0000000000630903000100a90f030001010062726170000000016268706400726577617264732d6163636f756e74000000000304000000000f0080c6a47e8d030000000000630903000100a90f030001010062726170000000016268706401726577617264732d6163636f756e74000000000304000000000f0080c6a47e8d030000000000
These do utility::dispatchAs(Signed(TREASURY), utility::batchAll( 3x limitedTeleportAssets )
Checking the calls, there's no need to calculate the sovereign account and transfer to AccountId32 { id: calculated_sov_account, _ }
, you can just put the location of the chain as the beneficiary and it will calculate the sovereign account for you.
So instead of using the calculated account, you could put { parents: 1, interior: [Parachain(1000)].into() }
to deposit to the sovereign account of asset hub, for example.
Now that I checked, the other sovereign accounts are something that we don't have a Location for. The best way in my mind would be to have a location for them, a converter from location to account id, and then the message would be so much cleaner. I agree that now that we don't have it let's just use those accounts. I'd still change AssetHub's though.
Regarding the amounts in those calls:
Unless I got something wrong. I checked Polkadot has 10 decimals and Kusama 12.
You should show the public key of the accounts here as well as the SS58 address because it's the public key that shows up in the decoded XCMs.
Done, see updated comment: https://github.com/polkadot-fellows/runtimes/issues/238#issuecomment-2007179202
just a nit - one more 0x
here:
0x0x7369626ce8030000000000000000000000000000000000000000000000000000
0x7369626ce8030000000000000000000000000000000000000000000000000000
Also, the accounts of the lanes are the same, is that expected?
Also, the accounts of the lanes are the same, is that expected?
There is a digit difference (0
vs 1
) if you look carefully (or run it through a diff
) coming from the encoding of an inner enum - making the difference between the two accounts.
Executed the calls in chopsticks. Results:
Polkadot BridgeHub:
Account 13cKp89SgdtqUngo2WiEijPrQWdHFhzYZLf2TJePKRvExk7o
system.account: FrameSystemAccountInfo
{
nonce: 0
consumers: 0
providers: 1
sufficients: 0
data: {
free: 999,964,070,000
reserved: 0
frozen: 0
flags: 170,141,183,460,469,231,731,687,303,715,884,105,728
}
}
Account 13E5fui93Uyua5RtDv2LQj4aVBBHo6YREe3n6CBwYdqNqoxj
system.account: FrameSystemAccountInfo
{
nonce: 0
consumers: 0
providers: 1
sufficients: 0
data: {
free: 49,999,964,070,000
reserved: 0
frozen: 0
flags: 170,141,183,460,469,231,731,687,303,715,884,105,728
}
}
Account 13E5fui93Uyua5RtDv2c9kcAbfrVFeeHyJzHe8sn1Ti77Afd
system.account: FrameSystemAccountInfo
{
nonce: 0
consumers: 0
providers: 1
sufficients: 0
data: {
free: 49,999,964,070,000
reserved: 0
frozen: 0
flags: 170,141,183,460,469,231,731,687,303,715,884,105,728
}
}
Kusama BridgeHub
Account FBeL7EFTDeHnuViqaUHUXvhhUusN5FawDmHgfvzF97DXFr3
system.account: FrameSystemAccountInfo
{
nonce: 0
consumers: 0
providers: 1
sufficients: 0
data: {
free: 29,999,880,233,333
reserved: 0
frozen: 0
flags: 170,141,183,460,469,231,731,687,303,715,884,105,728
}
}
Account EoQBtnwp4jMtCEpV7C88rKrz6x1qMBh2z74ibGSqtZRnuMM
system.account: FrameSystemAccountInfo
{
nonce: 0
consumers: 0
providers: 1
sufficients: 0
data: {
free: 999,999,880,233,333
reserved: 0
frozen: 0
flags: 170,141,183,460,469,231,731,687,303,715,884,105,728
}
}
Account EoQBtnwp4jMtCEpV7CPsssT6bdDHuHZmf3aGXxHJiSA4Dz3
system.account: FrameSystemAccountInfo
{
nonce: 0
consumers: 0
providers: 1
sufficients: 0
data: {
free: 999,999,880,233,333
reserved: 0
frozen: 0
flags: 170,141,183,460,469,231,731,687,303,715,884,105,728
}
}
Seems correct
Referendum https://polkadot.polkassembly.io/referenda/593 which will execute call in preimage.
On Polkadot Collectives chain: I've submitted preimage to whitelist above call
Referendum https://kusama.polkassembly.io/referenda/361 which will execute call in preimage.
I've also submitted preimage to whitelist above call
L.E. Done by @kianenigma 🙏
Kusama side executed, Kusama BH accounts successfully funded 🎉
Polkadot also executed, accounts successfully funded. Closing issue.
For the Polkadot <> Kusama bridge to operate and support DOT/KSM transfer between Polkadot AssetHub and Kusama AssetHub we need to fund following accounts:
Note: all of these accounts are exclusively chain-owned (governance-owned)
On Polkadot BridgeHub
[x] SA of Polkadot asset hub to pay for the execution of
ExportMessage
:13cKp89SgdtqUngo2WiEijPrQWdHFhzYZLf2TJePKRvExk7o
Generated using:
frame_support::sp_runtime::AccountId32::new( SiblingParachainConvertsVia::::convert_location(&Location {
parents: 1,
interior: [Parachain(1000)].into()
}).unwrap()
).to_ss58check_with_version(0_u16.into())
[x] SA of lane dedicated to asset hub for paying rewards for delivery:
13E5fui93Uyua5RtDv2LQj4aVBBHo6YREe3n6CBwYdqNqoxj
Generated using:
frame_support::sp_runtime::AccountId32::new( PayRewardFromAccount::<[u8; 32], [u8; 32]>::rewards_account(RewardsAccountParams::new( LaneId([0, 0, 0, 1]), *b"bhks", RewardsAccountOwner::ThisChain )) ) .to_ss58check_with_version(0_u16.into())
[x] SA of lane dedicated to asset hub for paying rewards for delivery confirmation:
13E5fui93Uyua5RtDv2c9kcAbfrVFeeHyJzHe8sn1Ti77Afd
Generated using:
frame_support::sp_runtime::AccountId32::new( PayRewardFromAccount::<[u8; 32], [u8; 32]>::rewards_account(RewardsAccountParams::new( LaneId([0, 0, 0, 1]), *b"bhks", RewardsAccountOwner::BridgedChain )) ) .to_ss58check_with_version(0_u16.into())
On Kusama BridgeHub
[x] SA of Kusama asset hub to pay for the execution of
ExportMessage
:FBeL7EFTDeHnuViqaUHUXvhhUusN5FawDmHgfvzF97DXFr3
Generated using:
frame_support::sp_runtime::AccountId32::new( SiblingParachainConvertsVia::::convert_location(&Location {
parents: 1,
interior: [Parachain(1000)].into()
}).unwrap()
).to_ss58check_with_version(2_u16.into())
[x] SA of lane dedicated to asset hub for paying rewards for delivery:
EoQBtnwp4jMtCEpV7C88rKrz6x1qMBh2z74ibGSqtZRnuMM
Generated using:
frame_support::sp_runtime::AccountId32::new( PayRewardFromAccount::<[u8; 32], [u8; 32]>::rewards_account(RewardsAccountParams::new( LaneId([0, 0, 0, 1]), *b"bhpd", RewardsAccountOwner::ThisChain )) ) .to_ss58check_with_version(2_u16.into())
[x] SA of lane dedicated to asset hub for paying rewards for delivery confirmation:
EoQBtnwp4jMtCEpV7CPsssT6bdDHuHZmf3aGXxHJiSA4Dz3
Generated using:
frame_support::sp_runtime::AccountId32::new( PayRewardFromAccount::<[u8; 32], [u8; 32]>::rewards_account(RewardsAccountParams::new( LaneId([0, 0, 0, 1]), *b"bhpd", RewardsAccountOwner::BridgedChain )) ) .to_ss58check_with_version(2_u16.into())