pub async fn initialize(&mut self, storage: &mut Connection<'_, Core>) -> anyhow::Result<()> {
        if storage
            .blocks_dal()
            .get_earliest_l1_batch_number()
            .await?
            .is_some()
        {
            // We have batches in the storage, no need for special treatment.
            return Ok(());
        }

        let Some(snapshot) = storage
            .snapshot_recovery_dal()
            .get_applied_snapshot_status()
            .await
            .context("failed getting snapshot recovery status")?
        else {
            anyhow::bail!(
                "Storage is not initialized, it doesn't have batches or snapshot recovery status"
            )
        };
        self.snapshot = Some(snapshot);
        Ok(())
    }
Performs the provider initialization. Must only be called with the initialized storage (e.g.
either after genesis or snapshot recovery).
core/lib/vm_executor/src/storage.rs