Closed dudo50 closed 4 months ago
CC @franciscoaguirre
I'll take a look at this.
@dudo50 is this live on some chain? Can you send me an extrinsic if that's the case? Could you share a link to the code if it's possible?
Hey @franciscoaguirre, It is not live on chain I test it locally through Zombienet. I can share the code with you, however: https://github.com/ParaSpell-Research-Foundation/polkadot-sdk-nft-pallet/blob/master/cumulus/parachain-template/pallets/xnft/src/lib.rs
It is a custom pallet implemented in the Parachain Template. PoC for cross-chain NFT sharing.
The XCM part that fails starts at line: https://github.com/ParaSpell-Research-Foundation/polkadot-sdk-nft-pallet/blob/master/cumulus/parachain-template/pallets/xnft/src/lib.rs#L337
To test code pull the repo
compile parachain template
cargo b -r -p parachain-template-node
compile polkadot node
cd Polkadot && cargo build --release
Then launch via Zombienet:
Navigate to binaries
cd binaries
add your zombienet binary and run command:
./zombienet-macos -p native -c 1 spawn config.toml
Thanks for your time!
I couldn't get the runtime XCM logs with zombienet, where I would've been able to diagnose the issue. Do you know how to? I don't use zombienet much.
Thank you for your time @franciscoaguirre , I do not know how to get them through Zombienet unfortunately. Perhaps @pepoviola could help us on this one? Is there any way to get XCM logs through Zombienet?
Edit: @franciscoaguirre perhaps try with debug option?
DEBUG=zombie* zombienet-macos -p native -c 1 spawn config.toml
Hi @dudo50, does the logs are produced by the pallet? in that case you can search in the node
logs (in native we store all the logs for the nodes in the same tmp
directory).
Thx!
@dudo50 it is the same issue as here: https://substrate.stackexchange.com/questions/10950/error-bad-origin-on-custom-xcm-integration?
Hey @bkontur , yes, I figured, the best and fastest way to resolve this issue is to contact both platforms.
Hey @bkontur , yes, I figured, the best and fastest way to resolve this issue is to contact both platforms.
@dudo50 I see, the more noise, the higher the success rate :D (co uz s tebou narobime), please check that https://substrate.stackexchange.com/questions/10950/error-bad-origin-on-custom-xcm-integration/11002#11002 , I think that missing HRMP channel and wrong para id is your problem
@bkontur opening HRMP channels between 1000 and 1001 using parasudowrapper results in weird error "unsupported" any idea as to why that might happen? HRMP channels are opened correctly on Relay chain side.
@bkontur After opening HRMP channels I am now able to send XCM, but receiving Parachain also returns Unsupported.
EDIT: (Už asi nič so mnou nenarobíte no :D)
@dudo50 you can add this to the zombienet here:
args = [
"-lparachain=debug,xcm::process-message=trace,xcm::execute=trace,xcm::process=trace"
]
and it will show you the reason in the logs, could please share then?
@bkontur , here are the logs: parachain1000log.txt parachain1001log.txt relaychainlog.txt
ok, there are several issues, I can see now:
parachain-template
expects paid XCM execution: https://github.com/ParaSpell-Research-Foundation/polkadot-sdk-nft-pallet/blob/master/cumulus/parachain-template/runtime/src/xcm_config.rs#L100-L102
So, there are several fixes:
You need to add e.g. WithdrawAsset
+ BuyExecution
to your program here: https://github.com/ParaSpell-Research-Foundation/polkadot-sdk-nft-pallet/blob/master/cumulus/parachain-template/pallets/xnft/src/lib.rs#L338 but then you need to make sure that sovereign account of Parachain(1000)
on Parachain(1001)
has some tokens (maybe just to teleport from relay).
You can check more: https://wiki.polkadot.network/docs/learn/xcm/journey/transfers-summary
You can add UnpaidExecution(Unlimited)
before your Transact
instruction, but then you need to add another exception here: https://github.com/ParaSpell-Research-Foundation/polkadot-sdk-nft-pallet/blob/master/cumulus/parachain-template/runtime/src/xcm_config.rs#L87 : `
parameter_types! {
pub MyPara1000: MultiLocation = (Parent, Parachain(1000)).into();
}
...
AllowExplicitUnpaidExecutionFrom<(ParentOrParentsExecutivePlurality, Equals<MyPara1000>)>,
And the last one, I am not sure about require_weight_at_most: Weight::from_parts(1_000, 1_000),
here: https://github.com/ParaSpell-Research-Foundation/polkadot-sdk-nft-pallet/blob/master/cumulus/parachain-template/pallets/xnft/src/lib.rs#L340 , because you set a different numbers for extrinsic mint_collection_received
here: https://github.com/ParaSpell-Research-Foundation/polkadot-sdk-nft-pallet/blob/master/cumulus/parachain-template/pallets/xnft/src/lib.rs#L370-L371, you can check the real weight for extrinsic call with PJS, there is a runtime call: transactionPaymentCallApi::queryCallInfo
, so you can take this value, double it and set as a require_weight_at_most
@bkontur This did not entirely resolve our issue, unfortunately. We are still getting an error "unsupported" when opening HRMP channels between our Parachains through parasudowrapper.
@pepoviola , I've concluded, that the issue is probably in zombienet or config. I have pulled fresh polkadot-sdk and launched the network via Zombienet config here: https://github.com/ParaSpell-Research-Foundation/polkadot-sdk-nft-pallet/blob/master/binaries/config.toml
Could you please try if you can open the HRMP channel between 2 parachains successfully when you follow these steps: https://github.com/paritytech/polkadot-sdk/issues/3195#issuecomment-1934235575? Because I could not see an issue as to why it would during opening of the HRMP channel say - the error message "unsupported" on Parachains if something during startup was not handled incorrectly - https://github.com/paritytech/polkadot-sdk/issues/3195#issuecomment-1939038585.
Closing this in favor of https://github.com/paritytech/polkadot-sdk/issues/3436
I am building a custom XCM pallet for Non-fungibles.
While executing specific call:
I receive an error: "Transport". I looked it up on the XCM_Format repository and error does not tell me much.
Transport = 14: Destination is routable, but there is some issue with the transport mechanism.
The destination is of ParaId type.What am I missing or doing wrong?
Thanks in advance.