-
Notifications
You must be signed in to change notification settings - Fork 41
Description
⚠️ Auto-generated issue: This issue was automatically generated. Please review the description before assigning.
Summary
Add documentation for the node's HTTP RPC endpoints to the website, similar to the existing GraphQL API documentation and Archive Database Queries.
This documentation will complement the node dashboard documentation by explaining the RPC endpoints that the dashboard uses to retrieve node information.
Note: These RPC endpoints are specific to the Rust node implementation and differ from the OCaml node's RPC interface. The Rust node exposes its own set of HTTP endpoints designed for its state machine architecture.
Background
The node exposes RPC endpoints via HTTP (using warp) that are separate from the GraphQL server. These endpoints provide functionality like:
/status- Node status information/state/peers- Connected peers/healthz- Health check/readyz- Readiness check/stats/actions- Action statistics/stats/sync- Sync statistics/stats/block_producer- Block producer statistics/snark-pool/jobs- SNARK pool jobs/snarker/workers- SNARK workers/snarker/config- SNARK configuration/transaction-pool- Transaction pool/accounts- Ledger accounts/discovery/routing_table- Discovery routing table/discovery/bootstrap_stats- Bootstrap statistics/scan-state/summary- Scan state summary/state- Full state (with optional JSONPath filter)
Implementation details
The RPC endpoints are implemented in:
node/native/src/http_server.rs- HTTP route definitions (warp)node/src/rpc/mod.rs- Request/response types (RpcRequestenum)node/src/rpc/rpc_reducer.rs- Request processing logicnode/common/src/service/rpc/- Service layer
Suggested documentation structure
Create website/docs/developers/rpc-api.md covering:
- Overview and purpose (when to use RPC vs GraphQL)
- Clarification that these are Rust node-specific endpoints (not OCaml compatible)
- Endpoint reference table with methods, paths, and descriptions
- Request/response examples (curl commands)
- Common use cases:
- Health monitoring
- Peer discovery
- Sync status tracking
- SNARK pool management
- State filtering with JSONPath (for
/stateendpoint) - Integration with the node dashboard
CI validation
Similar to the GraphQL API documentation, add CI checks to validate that the documented RPC endpoints exist and are functional. This can be done by:
- Using the O1Labs-hosted node to test endpoint availability
- Running curl commands against the documented endpoints
- Verifying response format matches documentation
This ensures the documentation stays in sync with the actual implementation.
Acceptance criteria
- New documentation page at
website/docs/developers/rpc-api.md - Updated sidebar to include the new page
- Examples with curl commands for common endpoints
- Cross-references to GraphQL API where appropriate
- Clear note distinguishing from OCaml node RPC
- Reference to node dashboard usage
- CI workflow to validate RPC endpoints against O1Labs node
Metadata
Metadata
Assignees
Labels
Type
Projects
Status