-
Notifications
You must be signed in to change notification settings - Fork 803
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
message queue regression compare to dmp queue #3709
Comments
This is a known change - yes. The MQ pallet has to be careful with PoV weight: just executing all XCM at the beginning of a block can overload the PoV weight and produce overweight blocks. It therefore queues them. You can call I guess it still makes sense to add a config flag to enable it to also process messages in the |
This will make it possible to use remaining weight on idle for processing enqueued messages. More context here #3709 --------- Co-authored-by: Adrian Catangiu <[email protected]>
This will make it possible to use remaining weight on idle for processing enqueued messages. More context here paritytech#3709 --------- Co-authored-by: Adrian Catangiu <[email protected]>
closed by #3844 |
We detected a minor regression when migrate from using dmpQueue to messageQeueue that the incoming XCM are executed one block later.
A brief check of the code shows that previously with dmpQueue pallet, it will try to execute the message immediately in the message handler. However, for messageQueue, it only enqueue the message. The messages in the queue are only dispatched in
on_initialize
hook, but the messages are enqueued in the inherent, after theon_initialize
hook.This means all the incoming XCM are going to be stored in storage for at least one block before they are dispatched. This seems inefficient. As it have to write the XCM and then read and remove it on the next block. Compare to what we have currently that it will just dispatch it and no need those extra storage access. And the message get dispatched faster.
This behaviour also makes e2e test lot more complicated as there will be some uncertainty on when the message will be dispatched. Hardcoded it to be 2 blocks later just sounds like a poor workaround.
I am not sure what's the best way to address such issue. Make it try to dispatch messages with
on_idle
hook may work. Or better just restore the old behaivour and dispatch the messages after they are queued. Another way will need to what for the new post_inherent hook and service the queue there.The text was updated successfully, but these errors were encountered: