-
Notifications
You must be signed in to change notification settings - Fork 2.6k
Add #[without_storage_layer]
tag which explicitly allows an extrinsic to not have a storage layer
#11533
Comments
I would like to work on this. |
@Szegoo yup all yours! Presumably you are familiar with writing Rust macros? Let me know if you need any help with finding the appropriate parts of code. |
@shawntabrizi Yes, I am familiar with writing rust macros, I will let you know if I need any help 😀. |
@shawntabrizi I have added a mode tag, that shows whether an extrinsic is gonna have a storage layer. So AFAIU I need now to write code that checks whether transactional is being used in the |
I think we should not do this. The point here being that Pallet developers should be aware of what is the standard, aka either always transactional or not transactional. As we want transactional, I would vote for transactional as the default and this default should not be configurable. Otherwise we may open some attack vectors/bugs when it comes to nested calls where a developer needs to do some assumptions about the nested calls and their transactional behavior. |
agreed with basti here, best to have only one behavior |
Left over from: #10806
Now that: #11431 is merged, all extrinsics will have a transactional layer by default.
However, there may be situations you explicitly do not want a transactional layer, for example when you know that there is no need for it, or if you may even want to abuse this behavior(?)
We need to introduce a new attribute tag which can allow a user to note that an extrinsic should not have a storage layer, and then we skip adding the layer to the extrinsic.
This should be an easy task for anyone who is familiar with writing Rust macros.
The text was updated successfully, but these errors were encountered: