Great Proposal.
Idea Option 5: Celestia accounts with withdrawal nonces
Pattern: We could add the transaction on Celestia itself as input on the ZKP or any account details we want to fetch from the state.
We could add a withdrawal nonce per Celestia account. When you withdraw on the Rollup, you must specify a Celestia withdrawal nonce while withdrawing, which you can prove from the stateroot afterward.
When you submit a withdrawal on Celestia, you must also provide the account-specific withdrawal nonce as input to the ZKP. After successful withdrawal, Celestia increases the nonce by one, so you cannot replay a withdrawal.
This enables many withdrawals per rollup per account in the same Celestia height, with the downside of adding another nonce to the state of Celestia.
Edge Case: The user uses the same nonce for multiple rollup withdrawals. With that, the next withdrawal cannot be completed, and the funds are already burned on the rollup. To “unburn” the tokens, you would prove on the Rollup that you used the nonce for another snark account on Celestia.
Another con is that if you are withdrawing from 10 Rollups at the same time and the first Rollups stateroot does not get updated on Celestia because of a liveness failure, then your other Rollups funds are stuck as well. That seems like a UX issue that can be solved by “burning” the nonce with another withdrawal. This could be, for example, through another rollup, a dummy snark account that you control, or an integrated function on Celestia.