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
{{ message }}
This repository was archived by the owner on Nov 15, 2023. It is now read-only.
Currently transactions are not applied atomically that if it failed halfway through, the previously applied storage updates are kept and not reverted. Therefore we have to perform all the checks before first storage write and cannot return error after first storage write happened.
That means if a runtime module wants make multiple fallible calls, it have to first check all of them won't fail upfront. This can be hard to implement. Image I want to implement a runtime call to transfer token to 3 different accounts, which may or may not be already created (hence different transaction fee will be deduced). It is hard to calculate the exact total balances required to make this action without failure.
Another feature I would like to implement in future is atomic batch transaction (Thanks to Schnorr, only one signature will be needed). It needs to ensure either all or none of the transactions success. That means it needs ability to revert previously applied transaction if the last one failed.