5

The setup is:

  • polkadot-launch
  • 1 relay chain: polkadot-0.9.18 rococo
  • 2 parachains: moonbeam-0.24.0 moonbase-local
    • paraId 1000
    • paraId 1001
  • open hrmp channel via polkadot-launch

Transferring DOT between Relay chain and parachain is ok:

  1. assetManager.registerForeignAsset
  2. assetManager.setAssetUnitsPerSecond
  3. relay chain -> parachain xcmPallet.limitedReserveTransferAssets
  4. parachain -> relay chain xtokens.transfer

However, transferring parachain native token between 2 Moonbeam parachains is failed: parachain 1001 -> parachain 1000

  1. On parachain 1000: assetManager.registerForeignAsset
  2. On parachain 1000: assetManager.setAssetUnitsPerSecond
  3. On parachain 1001: xTokens.transfer This step failed.

The sender parachain 1001 successfully send the xcm message, but receiver parachain 1000 throw an error when executing this message.

Maybe the xcm multilocation is wrong.

enter image description here

The error log of receiver parachain 1000 is as follows:

2022-07-07 11:14:00.028 TRACE tokio-runtime-worker xcm::should_execute: [🌗] 
did not pass barrier: 
origin: 
    MultiLocation { parents: 1, interior: X1(Parachain(1001)) }, 
message: 
    Xcm([ReserveAssetDeposited(
        MultiAssets([
            MultiAsset {
                id: Concrete(
                    MultiLocation {
                        parents: 1,
                        interior: X2(Parachain(1001), PalletInstance(3))
            }),
                fun: Fungible(1000000000)
        }
    ])),
    ClearOrigin,
    BuyExecution {
        fees: MultiAsset {
            id: Concrete(MultiLocation {
                parents: 1,
                interior: X2(Parachain(1001), PalletInstance(3))
            }),
            fun: Fungible(1000000000)
        },
        weight_limit: Limited(100)
    },
    DepositAsset {
        assets: Wild(All),
        max_assets: 1,
        beneficiary: MultiLocation {
            parents: 0,
            interior: X1(AccountKey20 {
                network: Any,
                key: [
                    242,
                    79,
                    243,
                    169,
                    207,
                    4,
                    199,
                    29,
                    188,
                    148,
                    208,
                    181,
                    102,
                    247,
                    162,
                    123,
                    148,
                    86,
                    108,
                    172
                ]
            })
        }
    }
]) 
max_weight: 400000000, 
weight_credit: 0

2022-07-07 11:14:00.028 DEBUG tokio-runtime-worker xcm::execute_xcm_in_credit: [🌗] Barrier blocked execution! Error: (). (origin: MultiLocation { parents: 1, interior: X1(Parachain(1001)) }, message: Xcm([ReserveAssetDeposited(MultiAssets([MultiAsset { id: Concrete(MultiLocation { parents: 1, interior: X2(Parachain(1001), PalletInstance(3)) }), fun: Fungible(1000000000) }])), ClearOrigin, BuyExecution { fees: MultiAsset { id: Concrete(MultiLocation { parents: 1, interior: X2(Parachain(1001), PalletInstance(3)) }), fun: Fungible(1000000000) }, weight_limit: Limited(100) }, DepositAsset { assets: Wild(All), max_assets: 1, beneficiary: MultiLocation { parents: 0, interior: X1(AccountKey20 { network: Any, key: [242, 79, 243, 169, 207, 4, 199, 29, 188, 148, 208, 181, 102, 247, 162, 123, 148, 86, 108, 172] }) } }]), weight_limit: 41666666666, weight_credit: 0)    
2022-07-07 11:14:00.028 ERROR tokio-runtime-worker cumulus_pallet_xcmp_queue: [🌗] Failed to process XCMP-XCM message, caused by Barrier   

Update: I make it after adding a xcm barrier to Moonbase.

https://sourcegraph.com/github.com/PureStake/moonbeam@8369da6dd073e1dc757deda2a778648c15c8298e/-/blob/runtime/moonbase/src/xcm_config.rs?L223

// Allow paid executions
pub type XcmBarrier = (
    TakeWeightCredit,
    AllowTopLevelPaidExecutionFrom<Everything>,
    AllowUnpaidExecutionFrom<Everything>, // add this line, allow every xcm message
    AllowKnownQueryResponses<PolkadotXcm>,
    // Subscriptions for version tracking are OK.
    AllowSubscriptionsFrom<Everything>,
);

0

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service and acknowledge that you have read and understand our privacy policy and code of conduct.

Browse other questions tagged or ask your own question.