Recently I am learning Rollups, and one thing makes me confused is that, Does the compressed transaction in a batch need the parameter nonce?
Here in on-chain-scaling-to-potentially-500-tx-sec-through-mass-tx-validation published in 2018, the vitalik says: To send money, the user should construct the data which includes a 2-byte parameter nonce to differ the transactions that are sent from the same user.
But, in An Incomplete Guide to Rollups published in 2021, the vitalik also says that:
In the rollup, we can omit the nonce entirely, beacause we just recover the nonce from the pre-state; if someone tries replaying a transaction with an earlier nonce, the signature would fail to verify, as the signature would be checked against data that contains the new higher nonce.
So they are absolutely conflict.
Assume that there is no parameter nonce in compressed transaction, my question is:
- How could we recover the nonce from the pre-state since there is no parameter
noncein the transaction? - How could we defend a replaying attack?