async fn lock_batch_for_proving(
        &self,
        proof_generation_timeout: Duration,
    ) -> Result<Option<L1BatchNumber>, ProcessorError> {
        self.pool
            .connection()
            .await?
            .proof_generation_dal()
            .lock_batch_for_proving(proof_generation_timeout)
            .await
            .map_err(Into::into)
    }
Will choose a batch that has all the required data and isn't picked up by any prover yet.
core/node/proof_data_handler/src/processor.rs