pub async fn get_ready_for_commit_l1_batches(
        &mut self,
        limit: usize,
        bootloader_hash: H256,
        default_aa_hash: H256,
        protocol_version_id: ProtocolVersionId,

        with_da_inclusion_info: bool,
    ) -> anyhow::Result<Vec<L1BatchWithMetadata>> {
        let raw_batches = sqlx::query_as!(
            StorageL1Batch,
            r#"
            SELECT
                number,
                l1_batches.timestamp,
                l1_tx_count,
                l2_tx_count,
                bloom,
                priority_ops_onchain_data,
                hash,
                commitment,
                l2_to_l1_messages,
                used_contract_hashes,
                compressed_initial_writes,
                compressed_repeated_writes,
                l2_l1_merkle_root,
                rollup_last_leaf_index,
                zkporter_is_available,
                l1_batches.bootloader_code_hash,
                l1_batches.default_aa_code_hash,
                l1_batches.evm_emulator_code_hash,
                aux_data_hash,
                pass_through_data_hash,
                meta_parameters_hash,
                protocol_version,
                compressed_state_diffs,
                system_logs,
                events_queue_commitment,
                bootloader_initial_content_commitment,
                pubdata_input,
                fee_address,
                aggregation_root,
                local_root,
                state_diff_hash,
                data_availability.inclusion_data,
                l1_gas_price,
                l2_fair_gas_price,
                fair_pubdata_price
            FROM
                l1_batches
            LEFT JOIN commitments ON commitments.l1_batch_number = l1_batches.number
            LEFT JOIN
                data_availability
                ON data_availability.l1_batch_number = l1_batches.number
            JOIN protocol_versions ON protocol_versions.id = l1_batches.protocol_version
            WHERE
                eth_commit_tx_id IS NULL
                AND number != 0
                AND protocol_versions.bootloader_code_hash = $1
                AND protocol_versions.default_account_code_hash = $2
                AND commitment IS NOT NULL
                AND (
                    protocol_versions.id = $3
                    OR protocol_versions.upgrade_tx_hash IS NULL
                )
                AND events_queue_commitment IS NOT NULL
                AND bootloader_initial_content_commitment IS NOT NULL
                AND (
                    data_availability.inclusion_data IS NOT NULL
                    OR $4 IS FALSE
                )
            ORDER BY
                number
            LIMIT
                $5
            "#,
            bootloader_hash.as_bytes(),
            default_aa_hash.as_bytes(),
            protocol_version_id as i32,
            with_da_inclusion_info,
            limit as i64,
        )
        .instrument("get_ready_for_commit_l1_batches")
        .with_arg("limit", &limit)
        .with_arg("bootloader_hash", &bootloader_hash)
        .with_arg("default_aa_hash", &default_aa_hash)
        .with_arg("protocol_version_id", &protocol_version_id)
        .with_arg("with_da_inclusion_info", &with_da_inclusion_info)
        .fetch_all(self.storage)
        .await?;

        self.map_l1_batches(raw_batches)
            .await
            .context("map_l1_batches()")
    }
When `with_da_inclusion_info` is true, only batches for which custom DA inclusion
information has already been provided will be included
core/lib/dal/src/blocks_dal.rs