You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
The computational overhead is no 0, but its quite low. This is a very substantial change, and deeply impacts how one can write extrinsics: in a more care free way without all the validation up front. I don't think we should abandon our prior methodology of having all verifications up front though, because it really encourages clarity of thinking. However, we have some very sensitive cases in our runtime where I think adding a tranactional protection can really be a good long term protection against errors: cross pallet calls.
Proposal
Identify all cross pallet calls, and make all such extrinsics transactional. This may require benchmarking, as transactionality has some performance implication.
Ok, that is great, but let me ask, if we remove the storage checks, what do we do about the mutation safety barrier? it will be quite misleading I think. Either way, can you make a new issue with this idea, which includes an explicit list of extrinsics, and which also explicitly states that the work is done after benchmark is done.
Background
Substrate now supports
transactional
macro, which means any side-effect in the extrinsic is rolled back if it results in anErr
. Read more here:https://substrate.stackexchange.com/questions/1184/whats-the-overhead-associated-with-the-transactional-macro
The computational overhead is no 0, but its quite low. This is a very substantial change, and deeply impacts how one can write extrinsics: in a more care free way without all the validation up front. I don't think we should abandon our prior methodology of having all verifications up front though, because it really encourages clarity of thinking. However, we have some very sensitive cases in our runtime where I think adding a tranactional protection can really be a good long term protection against errors: cross pallet calls.
Proposal
Identify all cross pallet calls, and make all such extrinsics transactional. This may require benchmarking, as transactionality has some performance implication.
┆Issue is synchronized with this Asana task by Unito
The text was updated successfully, but these errors were encountered: