Rewrite Rosetta API docs and fix devnet crash#1168
Conversation
Fixes: MinaProtocol/mina#18600 Rewrite the Rosetta page to be more useful and fix the devnet crash caused by an incorrect MINA_GENESIS_LEDGER_URL in the docs: - Remove MINA_GENESIS_LEDGER_URL from devnet example (was causing "Tarball hash mismatch" crash — the image already has the correct genesis config baked in) - Update image versions: mainnet 3.3.0 -> 3.3.1, add devnet tag - Add architecture overview explaining the 4 components and their ports - Add three installation methods: all-in-one Docker (getting started), Docker Compose (production), and Debian packages (manual) - Document supported environment variables with defaults - Add offline mode and demo mode sections - Add API verification examples (network/list, network/status, account/balance) - Add available images table with current tags - Fix code snippets from indented blocks to fenced code blocks Co-Authored-By: Claude Opus 4.6 (1M context) <noreply@anthropic.com>
|
The latest updates on your projects. Learn more about Vercel for GitHub.
|
…PI examples - Target master branch for all Mina repo links instead of develop - Replace focal/bullseye with noble/bookworm in Docker images and apt repo - Split verifying API section into individual command snippets - Update Rosetta link to coinbase/mesh-specifications Co-Authored-By: Claude Opus 4.6 (1M context) <noreply@anthropic.com>
Co-Authored-By: Claude Opus 4.6 (1M context) <noreply@anthropic.com>
| </Subhead> | ||
|
|
||
| [Rosetta API](https://www.rosetta-api.org/) is an open-source specification and set of tools that make deploying and interacting with the blockchain quickly and easily. | ||
| [Rosetta API](https://github.com/coinbase/mesh-specifications) is an open-source specification and set of tools that make deploying and interacting with blockchains quick and easy. Mina's Rosetta implementation provides a standard interface for: |
There was a problem hiding this comment.
I think it's a bad idea to point people to mesh, even if it's just rebranded.
There was a problem hiding this comment.
Can you give some reasoning, why you think we shouldn't point to repo ?
There was a problem hiding this comment.
I don't have a good enough argument, but I do think it'll be better to point out that we implement a subset of rosetta. And rosetta is rebranded by coinbase to mesh.
This will make user beaware of some API endpoints are not implemented by us at all.
There was a problem hiding this comment.
Ok additional information make sense
| - Building blockchain applications, such as explorers and wallets | ||
| - **Exchanges** — integrate MINA deposits, withdrawals, and balance queries | ||
| - **Explorers and wallets** — query historical block and transaction data | ||
| - **Infrastructure operators** — build and submit transactions programmatically |
There was a problem hiding this comment.
I mean, there's really nothing you can't do with GraphQL and Archive alone, the sole reason we have Rosetta is so exchange is happy.
There was a problem hiding this comment.
I would be grateful if a comment was shaped in a way to tell me if i need to remove it or not? From above i need to deduct that it should be removed but it's not clear if this is general comment or criticism of rosetta alone or action point for the docs ?
There was a problem hiding this comment.
I guess we can leave it as is, but extend the fact that Rosetta API is an auxilary to our existing GraphQL API.
| | `MINA_ARCHIVE_DUMP_URL` | `https://storage.googleapis.com/mina-archive-dumps` | Base URL for archive database dumps | | ||
| | `MINA_CONFIG_DIR` | `/data/.mina-config` | Mina configuration directory | | ||
|
|
||
| ### Option 2: Docker Compose (Recommended for production) |
There was a problem hiding this comment.
There was a docker compose under this repo in markdown, I suggest we should unify the compose file here with the one we have in repo.
There was a problem hiding this comment.
Was this implemented? I see no modification on docs/exchange-operators/rosetta/docker-compose.mdx and it's not removed either.
There was a problem hiding this comment.
ups. I think i didn't commit this part. let me fix it
|
|
||
| | Variable | Default | Description | | ||
| |---|---|---| | ||
| | `MINA_NETWORK` | `mainnet` | Network to connect to (`mainnet` or `devnet`) | |
There was a problem hiding this comment.
It's very bad, that we have this env var. I would consider just removing this. Because currently profile are compiled into the binary, no?
There was a problem hiding this comment.
Also, I would consider moving these from a bash script into OCaml's end, there's no good reason to have a different interface in docker and in debian/native executable. It simply doesn't make sense to me.
There was a problem hiding this comment.
Agree, but this is more a comment to mina code not docs. with current implementation we must set MINA_NETWORK if we want to operate on devnet network.
However, agree 100% we need to fix it in mina repo. Will create sufficient pr/issue
There was a problem hiding this comment.
If we intend to fix them later, maybe just don't expose it so end-user will not be relying on it?
There was a problem hiding this comment.
but MINA_NETWORK must be set if we want to deal with devnet data, otherwise you can use configuration : devnet docker with mainnet network and this will cause a crash
There was a problem hiding this comment.
Let's keep it as is for now, I guess
| The Rosetta stack consists of four components that work together: | ||
|
|
||
| | Component | Port | Description | | ||
| | Component | Default Port | Description | |
There was a problem hiding this comment.
It might also worth pointing out these ports are the port inside the docker.
- Clarify Mina implements a subset of Rosetta spec, mention Mesh rebrand - Add note that Rosetta is auxiliary to GraphQL API, exists for exchanges - Note that ports are defaults inside Docker container - Keep sync time estimation (20min-1hr) - Remove environment variables section to avoid exposing internal config that users should not rely on Co-Authored-By: Claude Opus 4.6 (1M context) <noreply@anthropic.com>
Co-Authored-By: Claude Opus 4.6 (1M context) <noreply@anthropic.com>
|
@glyh can you rereview ? |
| [Rosetta API](https://www.rosetta-api.org/) (rebranded as [Mesh](https://docs.cdp.coinbase.com/mesh/docs/welcome/) by Coinbase) is an open-source specification and set of tools that make deploying and interacting with blockchains quick and easy. Mina implements a subset of the Rosetta specification — not all endpoints defined in the spec are available. Mina's Rosetta implementation is primarily used by exchanges to integrate MINA deposits, withdrawals, and balance queries. | ||
|
|
||
| :::note | ||
| The Rosetta API is auxiliary to Mina's existing [GraphQL API](/node-operators/mina-cli-reference). Everything achievable through Rosetta can also be done with GraphQL and the Archive Node directly. Rosetta exists primarily to satisfy exchange integration requirements. |
There was a problem hiding this comment.
That's not true though. GraphQL API doesn't have persistence information that's only retrivable via Archive database or Rosetta.
Could you implement this? If not, could you provide some reasoning? |
@glyh I've added it in commit: a3fc81c .
|
|
Opps, sorry I must've missed that section |
GraphQL only provides current network state; historical/persistence data requires the Archive database or Rosetta. Co-Authored-By: Claude Opus 4.6 (1M context) <noreply@anthropic.com>
Summary
MINA_GENESIS_LEDGER_URLin the docsChanges
MINA_GENESIS_LEDGER_URLfrom devnet example — the image already contains the correct genesis config; overriding it with an outdated URL causes the crash3.3.0->3.3.1, add correct devnet tag)Test plan
docker run ... minaprotocol/mina-rosetta:3.3.1-7b34378-focal-mainnetMINA_GENESIS_LEDGER_URL🤖 Generated with Claude Code