Skip to content
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

[FRAME] MQ processor should be transactional #2441

Closed
ggwpez opened this issue Nov 22, 2023 · 7 comments · Fixed by #5198
Closed

[FRAME] MQ processor should be transactional #2441

ggwpez opened this issue Nov 22, 2023 · 7 comments · Fixed by #5198
Assignees
Labels
C1-mentor A task where a mentor is available. Please indicate in the issue who the mentor could be. D1-medium Can be fixed by a coder with good Rust knowledge but little knowledge of the codebase. I5-enhancement An additional feature request. T2-pallets This PR/Issue is related to a particular pallet.

Comments

@ggwpez
Copy link
Member

ggwpez commented Nov 22, 2023

Follow up to #2356 (comment) where it was noticed that the MQ pallet does not enforce transactional processing.
Should probably be fixed, but it a breaking change, therefore creating a new issue for it.

@ggwpez ggwpez changed the title [FRAME] MQ message processor should be transactional [FRAME] MQ processor should be transactional Nov 22, 2023
@ggwpez ggwpez added C1-mentor A task where a mentor is available. Please indicate in the issue who the mentor could be. I5-enhancement An additional feature request. T2-pallets This PR/Issue is related to a particular pallet. D1-medium Can be fixed by a coder with good Rust knowledge but little knowledge of the codebase. labels Feb 5, 2024
@asoliman92
Copy link

I'd like to pick this up please @ggwpez

@lean-apple
Copy link
Contributor

Is it in progress or I can try also ?

@ggwpez
Copy link
Member Author

ggwpez commented Apr 9, 2024

Yea seems to be stale, going to re-assign. Thanks @lean-apple!

@ggwpez ggwpez assigned lean-apple and unassigned asoliman92 Apr 9, 2024
@dharjeezy
Copy link
Contributor

I want to work on this, @ggwpez I would think including the transactional attribute on the extrinsics would solve this, but as per the breaking change, should we introduce new extrinsics that are annotated transactional and deprecate the old one?

@lean-apple lean-apple removed their assignment Jun 15, 2024
@ggwpez
Copy link
Member Author

ggwpez commented Jun 16, 2024

The transactional attribute is not already the default for all extrinsics.
This issue is about the this call (and the subsequent inner call to the MessageProcessor):

let res = Self::process_message_payload(

When the message processor does some storage modifications and returns an error - then the assumption is most likely that all modifications are rolled back. But this is currently not the case.
Although this is a breaking change, i would label this as a fix to the current code. Creating a new extrinsic and explaining what it does/means and hoping that people will use it wont work i think.

@dharjeezy
Copy link
Contributor

Hello @ggwpez does this means the function Self::process_message_payload should get executed within the storage::with_transaction context?

@ggwpez
Copy link
Member Author

ggwpez commented Jun 29, 2024

Yea could work, or rather only the call into the message processor within that function.

github-merge-queue bot pushed a commit that referenced this issue Sep 2, 2024
closes #2441

Polkadot address: 12GyGD3QhT4i2JJpNzvMf96sxxBLWymz4RdGCxRH5Rj5agKW

---------

Signed-off-by: Oliver Tale-Yazdi <[email protected]>
Co-authored-by: Oliver Tale-Yazdi <[email protected]>
Co-authored-by: Bastian Köcher <[email protected]>
x3c41a pushed a commit that referenced this issue Sep 4, 2024
closes #2441

Polkadot address: 12GyGD3QhT4i2JJpNzvMf96sxxBLWymz4RdGCxRH5Rj5agKW

---------

Signed-off-by: Oliver Tale-Yazdi <[email protected]>
Co-authored-by: Oliver Tale-Yazdi <[email protected]>
Co-authored-by: Bastian Köcher <[email protected]>
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
C1-mentor A task where a mentor is available. Please indicate in the issue who the mentor could be. D1-medium Can be fixed by a coder with good Rust knowledge but little knowledge of the codebase. I5-enhancement An additional feature request. T2-pallets This PR/Issue is related to a particular pallet.
Projects
None yet
Development

Successfully merging a pull request may close this issue.

4 participants