Skip to content

Conversation

@dannywillems
Copy link
Member

@dannywillems dannywillems commented Dec 4, 2025

Summary

  • Add comprehensive RPC API documentation for the Mina Rust node's HTTP endpoints
  • Create new api-and-data section and reorganize existing API documentation
  • Add CI workflow to validate RPC endpoints against o1Labs node daily
  • Add rustdoc comments to Rust RPC response structs with links from documentation

Changes

  • New documentation: website/docs/developers/api-and-data/rpc-api.md with all RPC endpoints documented alphabetically
  • CI workflow: .github/workflows/test-rpc-remote.yml runs daily and on PR/push to validate endpoints
  • Curl scripts: 17 scripts in scripts/rpc-api/curl/ for endpoint examples
  • Rust docs: Added rustdoc comments to RPC response structs in node/src/rpc/mod.rs
  • Reorganization: Moved GraphQL and archive docs to api-and-data/ subdirectory
  • Link fixes: Updated broken links after reorganization

Closes #1743

New mandatory CI jobs

The following jobs should be added as required status checks on develop and main branches:

Job Name Workflow
Test Rust Node RPC Endpoints (ubuntu-latest) test-rpc-remote.yml
Test Rust Node RPC Endpoints (macos-latest) test-rpc-remote.yml

Commands to add branch protection rules

# Add required status checks for develop branch
gh api repos/o1-labs/mina-rust/branches/develop/protection \
  --method PUT \
  --field required_status_checks='{"strict":true,"contexts":["Test Rust Node RPC Endpoints (ubuntu-latest)","Test Rust Node RPC Endpoints (macos-latest)"]}' \
  --field enforce_admins=false \
  --field required_pull_request_reviews=null \
  --field restrictions=null

# Add required status checks for main branch
gh api repos/o1-labs/mina-rust/branches/main/protection \
  --method PUT \
  --field required_status_checks='{"strict":true,"contexts":["Test Rust Node RPC Endpoints (ubuntu-latest)","Test Rust Node RPC Endpoints (macos-latest)"]}' \
  --field enforce_admins=false \
  --field required_pull_request_reviews=null \
  --field restrictions=null

Note: To append these checks to existing branch protection rules (preserving current settings), use the GitHub web UI at:

@github-actions
Copy link

github-actions bot commented Dec 4, 2025

OCaml Reference Validation Results

Repository: https://github.com/MinaProtocol/mina.git
Branch: compatible
Status: ✓ Validation passed

Click to see full validation output
Checking OCaml references against https://github.com/MinaProtocol/mina.git (branch: compatible)
Fetching current commit from compatible...
Current OCaml commit: ecbf1132c1c05dddc4629dd1ecf0a31c1af6682c

Validating references...
========================
✓ VALID: ledger/src/account/account.rs -> src/lib/mina_base/account.ml L:201-224
  ⚠ STALE COMMIT: fc6be4c58091c761f827c858229c2edf9519e941 (current: ecbf1132c1c05dddc4629dd1ecf0a31c1af6682c)
✓ VALID: ledger/src/scan_state/transaction_logic/for_tests.rs -> src/lib/transaction_logic/mina_transaction_logic.ml L:2285-2285
  ⚠ STALE COMMIT: 5da42ccd72e791f164d4d200cf1ce300262873b3 (current: ecbf1132c1c05dddc4629dd1ecf0a31c1af6682c)
✓ VALID: ledger/src/scan_state/transaction_logic/for_tests.rs -> src/lib/transaction_logic/mina_transaction_logic.ml L:2351-2356
  ⚠ STALE COMMIT: 5da42ccd72e791f164d4d200cf1ce300262873b3 (current: ecbf1132c1c05dddc4629dd1ecf0a31c1af6682c)
✓ VALID: ledger/src/scan_state/transaction_logic/for_tests.rs -> src/lib/transaction_logic/mina_transaction_logic.ml L:2407
  ⚠ STALE COMMIT: 5da42ccd72e791f164d4d200cf1ce300262873b3 (current: ecbf1132c1c05dddc4629dd1ecf0a31c1af6682c)
✓ VALID: ledger/src/scan_state/transaction_logic/mod.rs -> src/lib/mina_base/transaction_status.ml L:9-51
  ⚠ STALE COMMIT: 5da42ccd72e791f164d4d200cf1ce300262873b3 (current: ecbf1132c1c05dddc4629dd1ecf0a31c1af6682c)
✓ VALID: ledger/src/scan_state/transaction_logic/mod.rs -> src/lib/mina_base/transaction_status.ml L:452-454
  ⚠ STALE COMMIT: 5da42ccd72e791f164d4d200cf1ce300262873b3 (current: ecbf1132c1c05dddc4629dd1ecf0a31c1af6682c)
✓ VALID: ledger/src/scan_state/transaction_logic/mod.rs -> src/lib/mina_base/with_status.ml L:6-10
  ⚠ STALE COMMIT: 5da42ccd72e791f164d4d200cf1ce300262873b3 (current: ecbf1132c1c05dddc4629dd1ecf0a31c1af6682c)
✓ VALID: ledger/src/scan_state/transaction_logic/mod.rs -> src/lib/mina_base/fee_transfer.ml L:76-80
  ⚠ STALE COMMIT: 5da42ccd72e791f164d4d200cf1ce300262873b3 (current: ecbf1132c1c05dddc4629dd1ecf0a31c1af6682c)
✓ VALID: ledger/src/scan_state/transaction_logic/mod.rs -> src/lib/mina_base/fee_transfer.ml L:68-69
  ⚠ STALE COMMIT: 5da42ccd72e791f164d4d200cf1ce300262873b3 (current: ecbf1132c1c05dddc4629dd1ecf0a31c1af6682c)
✓ VALID: ledger/src/scan_state/transaction_logic/mod.rs -> src/lib/mina_base/coinbase.ml L:17-21
  ⚠ STALE COMMIT: 5da42ccd72e791f164d4d200cf1ce300262873b3 (current: ecbf1132c1c05dddc4629dd1ecf0a31c1af6682c)
✓ VALID: ledger/src/scan_state/transaction_logic/mod.rs -> src/lib/transaction/transaction.ml L:8-11
  ⚠ STALE COMMIT: 5da42ccd72e791f164d4d200cf1ce300262873b3 (current: ecbf1132c1c05dddc4629dd1ecf0a31c1af6682c)
✓ VALID: ledger/src/scan_state/transaction_logic/signed_command.rs -> src/lib/mina_base/signed_command_payload.ml L:34-48
  ⚠ STALE COMMIT: 5da42ccd72e791f164d4d200cf1ce300262873b3 (current: ecbf1132c1c05dddc4629dd1ecf0a31c1af6682c)
✓ VALID: ledger/src/scan_state/transaction_logic/signed_command.rs -> src/lib/mina_base/stake_delegation.ml L:11-13
  ⚠ STALE COMMIT: 5da42ccd72e791f164d4d200cf1ce300262873b3 (current: ecbf1132c1c05dddc4629dd1ecf0a31c1af6682c)
✓ VALID: ledger/src/scan_state/transaction_logic/signed_command.rs -> src/lib/mina_base/signed_command_payload.ml L:179-181
  ⚠ STALE COMMIT: 5da42ccd72e791f164d4d200cf1ce300262873b3 (current: ecbf1132c1c05dddc4629dd1ecf0a31c1af6682c)
✓ VALID: ledger/src/scan_state/transaction_logic/signed_command.rs -> src/lib/mina_base/signed_command_payload.ml L:239-243
  ⚠ STALE COMMIT: 5da42ccd72e791f164d4d200cf1ce300262873b3 (current: ecbf1132c1c05dddc4629dd1ecf0a31c1af6682c)
✓ VALID: ledger/src/scan_state/transaction_logic/signed_command.rs -> src/lib/mina_base/signed_command_payload.ml L:352-362
  ⚠ STALE COMMIT: 5da42ccd72e791f164d4d200cf1ce300262873b3 (current: ecbf1132c1c05dddc4629dd1ecf0a31c1af6682c)

Summary
=======
Total references found: 16
Valid references: 16
Invalid references: 0
Stale commits: 16

⚠ Warning: 16 reference(s) have stale commits
Run with --update to update them automatically

@github-actions
Copy link

github-actions bot commented Dec 4, 2025

✓ Code Reference Verification Passed

All code references in the documentation have been verified successfully!

Total references checked: 1
Valid references: 1

The documentation is in sync with the codebase on the develop branch.

@dannywillems dannywillems force-pushed the dw/website-rpc-doc branch 10 times, most recently from c40a016 to 6a4017d Compare December 7, 2025 19:45
Add comprehensive documentation for the Mina Rust node's HTTP RPC endpoints,
separate from the GraphQL API:

- Create new api-and-data section and reorganize existing API documentation
- Add RPC API reference page with all endpoint documentation
- Add curl scripts for each RPC endpoint (17 scripts)
- Add CI workflow to validate RPC endpoints against O1Labs node
- Add rustdoc comments to RPC response structs in Rust code
- Link documentation to Rust API docs for response structures
- Fix broken links after documentation reorganization

Closes #1743
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

Status: In Review

Development

Successfully merging this pull request may close these issues.

Documentation: Add RPC endpoints reference to website

2 participants