AcalaNetwork / chopsticks

Create parallel reality of your Substrate network.
Apache License 2.0
133 stars 80 forks source link

No DMP messages received in Parachain #631

Closed NachoPal closed 8 months ago

NachoPal commented 8 months ago

When running a Parachain from a genesis file, DMP messages are not received.

Block is built in the Parachain as a response of sending a XCM from the Relay Chain, but parentHead and downwardMessages in setValidationData are empty.

ermalkaleci commented 8 months ago

as I said last time, starting xcm with genesis won't work because you won't have any parachain registered

NachoPal commented 8 months ago

as I said last time, starting xcm with genesis won't work because you won't have any parachain registered

I manually registered the Parachain and onboarded it before sending the message.

I could try to add it to the Relay's genesis state if you think that will make any difference.

NachoPal commented 8 months ago

I added the Parachain in the genesis file but same result.

I provide the chain spec chain-spec-with-para-v1.0.0.json

ermalkaleci commented 8 months ago

the problem is missing dmqMqcHead, I will see if we can mock it

ermalkaleci commented 8 months ago

@NachoPal can you give this a try? #633

ermalkaleci commented 8 months ago

you don't need to do anything extra, just start from genesis. Did test transfer KSM and works

NachoPal commented 8 months ago

the problem is missing dmqMqcHead, I will see if we can mock it

That was it, now it is working. Let you know that it is not even necessary to add the Parachain in genesis for XCM to work bidirectionally.

I do not know if you can foresee some side effects or something that might not work/malfunction if a Parachain is not registered.

ermalkaleci commented 8 months ago

Chopsticks intercepts xcm messages produced by runtime execution and triggers block building on the other chain with that xcm message, so it all depends on the runtime if it can produce a message or not. If the runtime strictly required parachain to be registered then it will not produce a xcm message therefore the other chain won't intercept any message