pub async fn new(
        pool: ConnectionPool<Core>,
        rocksdb_path: PathBuf,
        io: Io,
        chain_id: L2ChainId,
    ) -> anyhow::Result<(Self, StorageSyncTask<Io>)> {
        let mut conn = pool.connection_tagged(io.name()).await?;
        let l1_batch_params_provider = L1BatchParamsProvider::new(&mut conn)
            .await
            .context("Failed initializing L1 batch params provider")?;
        drop(conn);

        let state = Arc::new(RwLock::new(State {
            rocksdb: None,
            l1_batch_number: L1BatchNumber(0),
            storage: BTreeMap::new(),
        }));
        let task = StorageSyncTask::new(
            pool.clone(),
            chain_id,
            rocksdb_path,
            io.clone(),
            state.clone(),
        )
        .await?;
        Ok((
            Self {
                pool,
                l1_batch_params_provider,
                chain_id,
                state,
                io,
            },
            task,
        ))
    }
Creates a new VM runner storage using provided Postgres pool and RocksDB path.
core/node/vm_runner/src/storage.rs