publishStateToL1 can block for a very long time if there is a large state backlog, preventing timely update of backlog metrics and the triggering of DA throttling. This PR lets the caller bound the time spent in the loop rather than allowing it to proceed until EOF is triggered.
Description
publishStateToL1 can block for a very long time if there is a large state backlog, preventing timely update of backlog metrics and the triggering of DA throttling. This PR lets the caller bound the time spent in the loop rather than allowing it to proceed until EOF is triggered.