Skip to content

Snapshot mode: bundle SQLite snapshot for zero-infra usage #28

Description

@dkijania

Why

The README's roadmap already calls this out: snapshot mode currently requires the user to bring up Postgres via docker-compose, which is the single biggest onboarding cliff in the project. Bundling a SQLite snapshot inside the npm package would collapse snapshot mode into the same `npx`-and-go story as live mode.

Scope

  • Build a SQLite version of the archive schema that the snapshot-mode tools can read.
  • Add a CI job that periodically (weekly?) regenerates a fresh devnet snapshot from the existing Postgres dump and publishes it as a separate npm package (`@o1labs/mina-mcp-snapshot-devnet`) or a CDN/GCS download.
  • Wire snapshot mode to:
    • Prefer a bundled SQLite if present.
    • Fall back to Postgres if the user explicitly points at one (existing behavior).
  • Update the README so the snapshot-mode quick-start is one command, no Docker.
  • Per-network variants (mainnet, mesa) follow the same pattern.

Open questions

  • Snapshot file size — is a useful devnet slice within npm's package-size sanity limits, or does it have to be a separate download fetched on first run?
  • Read-side compatibility — does `query_archive_sql` need rewriting for SQLite dialect differences, or do we keep the queries small enough that they're portable?

Acceptance

  • `npx @o1labs/mina-mcp-server --mode snapshot --network devnet` works end-to-end with no Postgres, no Docker, no clone.
  • Snapshot freshness is documented ("data is at most N days old") and visible at runtime via a tool like `describe_state`.

Related

  • README `## Roadmap` section currently lists this as future work.

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Type

    No type

    Projects

    No projects

      Milestone

      No milestone

      Relationships

      None yet

      Development

      No branches or pull requests

      Issue actions