op-batcher: fix channel duration timeout management (#12916)
* op-batcher: fix channel duration timeout management Previously, we would use L1 data to help track channel durations. For example, the batcher would be configured to post data every hour. We update a global state variable with the latest l1 origin of a channel when it closed, and compute the deadline for that channel using a duration delta starting at that l1 origin timestamp. Since we changed the way autoDA switching works, a channel can be _closed_ (due to a duration timeout or other reason) and this will cause the l1 origin state variable to move forward, extending the deadline ready for the next channel. Crucially, with autoDA switching nowadays, the closed channel will not always be submitted on chain (it can be discarded and the blocks requeued). If it is discarded, the channel duration timeout has already been extended. The fix for this is to update the global state variable at channel submission time, not channel closing time. * add regression test for channel duration timeouts during requeue
Showing
Please register or sign in to comment