0

I'm getting an "Unroutable" Error when performing reserve asset transfer of DOT from parachain to polkadot asset hub. I have tested it on rococo using the same wasm for the parachain and I'm able to perform the reserve asset transfer.

I'm testing the reserve asset transfer using chopsticks, this is the call I'm performing: 0x1f0303080004000100000700e8764817100100010100a10f0c13000100000700e876481700140d0100000101008eaf04151687736326c9fea17e25fc5287613693c912909cb226aa4794f26a480700c817a80402093d00

And here are the logs:

[21:48:17.431] INFO (block-builder): Hashed Network building #2,860,947
    app: "chopsticks"
    number: 2860947
    extrinsics: [
      "0xf90284008eaf04151687736326c9fea1…aa4794f26a480700c817a80402093d00"
    ]
    umpCount: 0
runtime::system              TRACE: Used block weight: PerDispatchClass { normal: Weight { ref_time: 0, proof_size: 0 }, operational: Weight { ref_time: 0, proof_size: 0 }, mandatory: Weight { ref_time: 10061287000, proof_size: 1493 } }
runtime::system              TRACE: Used block length: 2905
xcm::weight                  TRACE: FixedWeightBounds message: Xcm([WithdrawAsset(MultiAssets([MultiAsset { id: Concrete(MultiLocation { parents: 1, interior: Here }), fun: Fungible(100000000000) }])), InitiateReserveWithdraw { assets: Wild(All), reserve: MultiLocation { parents: 1, interior: X1(Parachain(1000)) }, xcm: Xcm([BuyExecution { fees: MultiAsset { id: Concrete(MultiLocation { parents: 1, interior: Here }), fun: Fungible(100000000000) }, weight_limit: Unlimited }, RefundSurplus, DepositAsset { assets: Wild(All), beneficiary: MultiLocation { parents: 0, interior: X1(AccountId32 { network: None, id: [142, 175, 4, 21, 22, 135, 115, 99, 38, 201, 254, 161, 126, 37, 252, 82, 135, 97, 54, 147, 201, 18, 144, 156, 178, 38, 170, 71, 148, 242, 106, 72] }) } }]) }])
xcm::execute_xcm_in_credit   TRACE: origin: MultiLocation { parents: 0, interior: X1(AccountId32 { network: Some(Polkadot), id: [142, 175, 4, 21, 22, 135, 115, 99, 38, 201, 254, 161, 126, 37, 252, 82, 135, 97, 54, 147, 201, 18, 144, 156, 178, 38, 170, 71, 148, 242, 106, 72] }) }, message: Xcm([WithdrawAsset(MultiAssets([MultiAsset { id: Concrete(MultiLocation { parents: 1, interior: Here }), fun: Fungible(100000000000) }])), InitiateReserveWithdraw { assets: Wild(All), reserve: MultiLocation { parents: 1, interior: X1(Parachain(1000)) }, xcm: Xcm([BuyExecution { fees: MultiAsset { id: Concrete(MultiLocation { parents: 1, interior: Here }), fun: Fungible(100000000000) }, weight_limit: Unlimited }, RefundSurplus, DepositAsset { assets: Wild(All), beneficiary: MultiLocation { parents: 0, interior: X1(AccountId32 { network: None, id: [142, 175, 4, 21, 22, 135, 115, 99, 38, 201, 254, 161, 126, 37, 252, 82, 135, 97, 54, 147, 201, 18, 144, 156, 178, 38, 170, 71, 148, 242, 106, 72] }) } }]) }]), weight_credit: Weight { ref_time: 20000000000, proof_size: 1000000 }
xcm::barriers                TRACE: TrailingSetTopicAsId origin: MultiLocation { parents: 0, interior: X1(AccountId32 { network: Some(Polkadot), id: [142, 175, 4, 21, 22, 135, 115, 99, 38, 201, 254, 161, 126, 37, 252, 82, 135, 97, 54, 147, 201, 18, 144, 156, 178, 38, 170, 71, 148, 242, 106, 72] }) }, instructions: [WithdrawAsset(MultiAssets([MultiAsset { id: Concrete(MultiLocation { parents: 1, interior: Here }), fun: Fungible(100000000000) }])), InitiateReserveWithdraw { assets: Wild(All), reserve: MultiLocation { parents: 1, interior: X1(Parachain(1000)) }, xcm: Xcm([BuyExecution { fees: MultiAsset { id: Concrete(MultiLocation { parents: 1, interior: Here }), fun: Fungible(100000000000) }, weight_limit: Unlimited }, RefundSurplus, DepositAsset { assets: Wild(All), beneficiary: MultiLocation { parents: 0, interior: X1(AccountId32 { network: None, id: [142, 175, 4, 21, 22, 135, 115, 99, 38, 201, 254, 161, 126, 37, 252, 82, 135, 97, 54, 147, 201, 18, 144, 156, 178, 38, 170, 71, 148, 242, 106, 72] }) } }]) }], max_weight: Weight { ref_time: 2000000000, proof_size: 131072 }, properties: Properties { weight_credit: Weight { ref_time: 20000000000, proof_size: 1000000 }, message_id: None }
xcm::barriers                TRACE: TakeWeightCredit origin: MultiLocation { parents: 0, interior: X1(AccountId32 { network: Some(Polkadot), id: [142, 175, 4, 21, 22, 135, 115, 99, 38, 201, 254, 161, 126, 37, 252, 82, 135, 97, 54, 147, 201, 18, 144, 156, 178, 38, 170, 71, 148, 242, 106, 72] }) }, instructions: [WithdrawAsset(MultiAssets([MultiAsset { id: Concrete(MultiLocation { parents: 1, interior: Here }), fun: Fungible(100000000000) }])), InitiateReserveWithdraw { assets: Wild(All), reserve: MultiLocation { parents: 1, interior: X1(Parachain(1000)) }, xcm: Xcm([BuyExecution { fees: MultiAsset { id: Concrete(MultiLocation { parents: 1, interior: Here }), fun: Fungible(100000000000) }, weight_limit: Unlimited }, RefundSurplus, DepositAsset { assets: Wild(All), beneficiary: MultiLocation { parents: 0, interior: X1(AccountId32 { network: None, id: [142, 175, 4, 21, 22, 135, 115, 99, 38, 201, 254, 161, 126, 37, 252, 82, 135, 97, 54, 147, 201, 18, 144, 156, 178, 38, 170, 71, 148, 242, 106, 72] }) } }]) }], max_weight: Weight { ref_time: 2000000000, proof_size: 131072 }, properties: Properties { weight_credit: Weight { ref_time: 20000000000, proof_size: 1000000 }, message_id: None }
xcm::process                 TRACE: origin: Some(MultiLocation { parents: 0, interior: X1(AccountId32 { network: Some(Polkadot), id: [142, 175, 4, 21, 22, 135, 115, 99, 38, 201, 254, 161, 126, 37, 252, 82, 135, 97, 54, 147, 201, 18, 144, 156, 178, 38, 170, 71, 148, 242, 106, 72] }) }), total_surplus/refunded: Weight { ref_time: 0, proof_size: 0 }/Weight { ref_time: 0, proof_size: 0 }, error_handler_weight: Weight { ref_time: 0, proof_size: 0 }
xcm::process_instruction     TRACE: === WithdrawAsset(MultiAssets([MultiAsset { id: Concrete(MultiLocation { parents: 1, interior: Here }), fun: Fungible(100000000000) }]))
xcm::currency_adapter        TRACE: withdraw_asset what: MultiAsset { id: Concrete(MultiLocation { parents: 1, interior: Here }), fun: Fungible(100000000000) }, who: MultiLocation { parents: 0, interior: X1(AccountId32 { network: Some(Polkadot), id: [142, 175, 4, 21, 22, 135, 115, 99, 38, 201, 254, 161, 126, 37, 252, 82, 135, 97, 54, 147, 201, 18, 144, 156, 178, 38, 170, 71, 148, 242, 106, 72] }) }
xcm::fungibles_adapter       TRACE: withdraw_asset what: MultiAsset { id: Concrete(MultiLocation { parents: 1, interior: Here }), fun: Fungible(100000000000) }, who: MultiLocation { parents: 0, interior: X1(AccountId32 { network: Some(Polkadot), id: [142, 175, 4, 21, 22, 135, 115, 99, 38, 201, 254, 161, 126, 37, 252, 82, 135, 97, 54, 147, 201, 18, 144, 156, 178, 38, 170, 71, 148, 242, 106, 72] }) }
xcm::process_instruction     TRACE: === InitiateReserveWithdraw { assets: Wild(All), reserve: MultiLocation { parents: 1, interior: X1(Parachain(1000)) }, xcm: Xcm([BuyExecution { fees: MultiAsset { id: Concrete(MultiLocation { parents: 1, interior: Here }), fun: Fungible(100000000000) }, weight_limit: Unlimited }, RefundSurplus, DepositAsset { assets: Wild(All), beneficiary: MultiLocation { parents: 0, interior: X1(AccountId32 { network: None, id: [142, 175, 4, 21, 22, 135, 115, 99, 38, 201, 254, 161, 126, 37, 252, 82, 135, 97, 54, 147, 201, 18, 144, 156, 178, 38, 170, 71, 148, 242, 106, 72] }) } }]) }
xcm::pallet_xcm::note_unknown_version TRACE: XCM version is unknown for destination: MultiLocation { parents: 1, interior: X1(Parachain(1000)) }
xcm::execute                 TRACE: !!! ERROR: Unroutable
xcm::execute_xcm_in_credit   TRACE: result: Err(ExecutorError { index: 1, xcm_error: Unroutable, weight: Weight { ref_time: 0, proof_size: 0 } })
xcm::execute_xcm_in_credit   TRACE: Execution errored at 1: Unroutable (original_origin: MultiLocation { parents: 0, interior: X1(AccountId32 { network: Some(Polkadot), id: [142, 175, 4, 21, 22, 135, 115, 99, 38, 201, 254, 161, 126, 37, 252, 82, 135, 97, 54, 147, 201, 18, 144, 156, 178, 38, 170, 71, 148, 242, 106, 72] }) })
runtime::system              TRACE: Used block weight: PerDispatchClass { normal: Weight { ref_time: 2225000000, proof_size: 131072 }, operational: Weight { ref_time: 0, proof_size: 0 }, mandatory: Weight { ref_time: 10061287000, proof_size: 1493 } }
runtime::system              TRACE: Used block length: 3097
runtime::system              DEBUG: [2860947] 0 extrinsics, length: 3097 (normal 0%, op: 0%, mandatory 0%) / normal weight:Weight(ref_time: 2225000000, proof_size: 131072) (0%) op weight Weight(ref_time: 0, proof_size: 0) (0%) / mandatory weight Weight(ref_time: 10061287000, proof_size: 1493) (0%)

Does anyone know why this might be?

Update:

Here is the XcmSender configuration of the xcm_executor::Config:

pub type XcmRouter = WithUniqueTopic<(
    // Two routers - use UMP to communicate with the relay chain:
    cumulus_primitives_utility::ParentAsUmp<ParachainSystem, PolkadotXcm, ()>,
    // ..and XCMP to communicate with the sibling chains.
    XcmpQueue,
)>;

This is the xcm config file: https://github.com/hashed-io/hashed-substrate-parachain/blob/cb6e9e318b79192263dfb87fb777e3362f058d32/runtime/src/xcm_config.rs#L209

Please note the it was built with the RelayNetwork as Polkadot not Rococo.

2 Answers 2

1

ok, I think this might be your problem, I checked this on Polkadot, you have safeXcmVersion=2 and you don't have SupportedVersion for AssetHub, so it means that your XcmRouter tries to use XCM version=2 for decoding message, but you also use WithUniqueTopic which adds xcm::v3 instruction SetTopic https://github.com/hashed-io/hashed-substrate-parachain/blob/cb6e9e318b79192263dfb87fb777e3362f058d32/runtime/src/xcm_config.rs#L242.

I am not sure, which one is your parachain on Rococo? I would like to check the same there.

The solution, would be:

  • either change your safeXcmVersion=3 with polkadotXcm::forceDefaultXcmVersion(3)
  • or polkadotXcm::forceXcmVersion(Location(1, Parachain(1000), 3) - to use 3 for communication with AssetHub

enter image description here enter image description here

1
1

Can you share your setting of xcm_executor::Config for XcmSender?

3
  • I've updated the answer accordingly
    – Sebastian
    Commented Apr 8 at 14:18
  • Hmm, strange, I need more information, the XcmpQueue should be able to route for MultiLocation { parents: 1, interior: X1(Parachain(1000)) }. Can you share you branch/git? What runtime? Which polkadot-sdk version? XCM configuration (impl xcm_executor::Config, impl cumulus_pallet_xcmp_queue::Config, impl pallet_message_queue::Config, ...)? Commented Apr 9 at 20:38
  • I've updated the answer accordingly
    – Sebastian
    Commented Apr 9 at 23:24

Your Answer

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

Not the answer you're looking for? Browse other questions tagged or ask your own question.