What stops conflicting zkrollup batchs?

For zkroolups, there’s someone who submits the batches to the mainnet. What prevents it from submitting conflicting information?

For example, A has 10 eth in the zkrollup smart contract. A signs two transactions A → B 10 eth, A → C 10 eth, what if two zkrollup batches with these conflicting transactions separately are sent out simultaneously?

Only one of the batches will be accepted. After that, the other batch will fail, since the state root has changed, thereby invalidating the proof.

1 Like