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
With this change (#130) we no longer return error right away if an order failed to execute. When an order failed to execute, it's possible that variants in AuthorityTemporaryStore may no longer hold (e.g. no objects are mutated). So in that case, we want to avoid calling AuthorityTemporaryStore::check_invariants.
Also worth double checking if there are other similar places making same assumption as well (i.e. that the transaction has failed) @gdanezis thoughts?
The text was updated successfully, but these errors were encountered:
I think we have to agree on what happens when the function executing an order (in the adaptor) fails:
Option 1: the adaptor cleans up and returns a good AuthorityTemporaryStore, for example with no mutations except the gas object having gas deducted, OR
Option 2: the adaptor cannot guarantee this, and the outer function (handle_confirmation_order) needs to handle throwing away results, and deducting the appropriate amount of gas.
I have assumed so far that Option 1 is what we do, but I am open to Option 2. In practice I would move most of this logic to a separate function no matter what, to keep the handle_confirmation_order simple, and abstract execution as much as possible.
With this change (#130) we no longer return error right away if an order failed to execute. When an order failed to execute, it's possible that variants in AuthorityTemporaryStore may no longer hold (e.g. no objects are mutated). So in that case, we want to avoid calling AuthorityTemporaryStore::check_invariants.
Also worth double checking if there are other similar places making same assumption as well (i.e. that the transaction has failed)
@gdanezis thoughts?
The text was updated successfully, but these errors were encountered: