-
Notifications
You must be signed in to change notification settings - Fork 337
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
Girazoki xcm queues to maintenance mode #1031
Conversation
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Looks good to me! Nice design.
The pallet's doc comments should be updated to indicate these changes, including removing point 5 under "future improvements". #TheFutureIsHere
…nt to modify hook behavior
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Looks great! Thanks!
What does it do?
This PR adds support for disabling XCM in maintenance mode. We do so by making the maintenance_mode control two things:
xcmp and dmp handlers for the queues. This is gonna be called each time a new xcm message arrives. For maintenance mode, we have set a max_weight_limit of 0, which prevents any message from being executed and it enqueues them.
Pallet hooks. The main reason for making maintenance_mode control this is that both dmp and xcmp queues executed messages onIdle. I added the possibility of removing specific hooks in maintenance mode, and in the particular case of xcm, I did set this to 0.
This scenario is difficult to test, at least until we have an xcm mocker. So for now I just added a integration test, which does not run in the CI but anyone can verify it works.
What important points reviewers should know?
Is there something left for follow-up PRs?
What alternative implementations were considered?
Are there relevant PRs or issues in other repositories (Substrate, Polkadot, Frontier, Cumulus)?
What value does it bring to the blockchain users?