MinaProtocol / MIPs

22 stars 18 forks source link

[pre-MIP] Reset action states when action state precondition is set #19

Open L-as opened 6 months ago

L-as commented 6 months ago

Right now AFAIU (although I haven't tested it), you could set the precondition to s1, then again to s4, which is very unintuitive and could break zkapps depending on it only going forward.

I propose resetting all action states older than the one used for the precondition to it, solving this problem.

Unless, of course, this is already impossible.

L-as commented 2 months ago

This would also solve another problem where you want to "flush" the action state, to prevent matching on partial histories, e.g. perhaps you want to undo something in the action state, and so submit an Undo action, but you want to be sure that it's not ignored.