zkInputs are not properly generated when there is an exit transaction in L2 with 0 amount.
Expected Behavior
correct zkInputs generation
Additional Information:
When the exit tree is empty and a L2 exit transaction with amount 0 is performed, we do not create a new leaf in the exit tree. Thus, receiver leaf processor is not used and associated zkInputs fields should not matter expect for the tokenID2 that should match sender leaf unless the transaction is an L1 transaction or newExit (insert operation into the exit tree) transaction.
Summary of Bug
zkInputs
are not properly generated when there is an exit transaction in L2 with 0 amount.Expected Behavior
correct
zkInputs
generationAdditional Information:
When the exit tree is empty and a L2 exit transaction with amount 0 is performed, we do not create a new leaf in the exit tree. Thus, receiver leaf processor is not used and associated zkInputs fields should not matter expect for the
tokenID2
that should match sender leaf unless the transaction is an L1 transaction ornewExit
(insert operation into the exit tree) transaction.The suggested change to fix this issue would be:
newExit = 1
on zkInputs will solvetokenID2
checktokenID2 = tokenID1
to fulfilltokenID2
circuit check