Skip to content

[docs-agent] Add Solana getProgramAccountsV2 to JSON-RPC spec + CU pricing - #1587

Open
alchemy-bot wants to merge 2 commits into
mainfrom
docs/solana-get-program-accounts-v2
Open

[docs-agent] Add Solana getProgramAccountsV2 to JSON-RPC spec + CU pricing#1587
alchemy-bot wants to merge 2 commits into
mainfrom
docs/solana-get-program-accounts-v2

Conversation

@alchemy-bot

Copy link
Copy Markdown
Contributor

Summary

Adds the Helius-compatible getProgramAccountsV2 method to the Alchemy Solana JSON-RPC surface, priced identically to getProgramAccounts (20 CU / 117 throughput CU per the request).

Changes:

  • src/openrpc/chains/_components/solana/cluster-program.yaml — new GetProgramAccountsV2Config schema. Backward-compatible with V1 (commitment, minContextSlot, withContext, encoding, dataSlice, filters) plus new fields: limit (1-10,000, default 1000), paginationKey (base-58 cursor), and changedSinceSlot.
  • src/openrpc/chains/_components/solana/account.yaml — new ProgramAccountsV2Page (accounts[] + nullable paginationKey) and ProgramAccountsV2Result (oneOf: bare page when withContext is false or omitted, or {context, value} envelope when withContext is true).
  • src/openrpc/chains/_components/solana/methods.yaml — new getProgramAccountsV2 method: x-compute-units: 20, x-rate-limit-cus: 117. Description covers the V2 additions (pagination, incremental updates via changedSinceSlot, optional wrapped result). Example uses the SPL Token program with dataSize: 165 filter (base64 encoding, limit: 1000) — the standard get-all-token-accounts pattern.
  • src/openrpc/chains/solana/solana.yaml — reference getProgramAccountsV2 alongside getProgramAccounts.
  • content/api-reference/pricing-resources/pricing/compute-unit-costs.mdx — add getProgramAccountsV2 row under the Solana Standard JSON-RPC block at 20 CU / 117 throughput CU (immediately after getProgramAccounts).

Ran pnpm run generate:rpc and pnpm run validate:rpc; both pass. The regenerated content/api-specs/chains/solana.json includes the new method and schemas.

The CU costs table sits inside a {/* cu:auto product="solana" */} block that Daikon regenerates from topconfig_v2/solana.yml in OMGWINNING/chain-config. A companion PR on that repo (linked below) adds the matching getProgramAccountsV2 entry so the manual row here stays consistent when Daikon next regenerates.

Linear

DOCS-212 — https://linear.app/alchemyapi/issue/DOCS-212/add-solana-getprogramaccountsv2-to-json-rpc-spec-cu-costs

Companion PR

OMGWINNING/chain-config PR (coming in the next post) mirrors the same 20 CU / 117 rate-limit-CU / fragile:getProgramAccounts rate-limit group entry in topconfig_v2/solana.yml (prod + staging).

Requested by

@dimitriedavid (via Slack thread)

…icing

Adds the Helius-compatible `getProgramAccountsV2` method to the Alchemy Solana JSON-RPC surface:

- `_components/solana/cluster-program.yaml`: new `GetProgramAccountsV2Config` schema (V1 fields plus `limit`, `paginationKey`, `changedSinceSlot`)
- `_components/solana/account.yaml`: new `ProgramAccountsV2Page` + `ProgramAccountsV2Result` schemas; `result` shape depends on `withContext`
- `_components/solana/methods.yaml`: new method definition (x-compute-units 20, x-rate-limit-cus 117, same rate-limit group as `getProgramAccounts`)
- `chains/solana/solana.yaml`: reference the new method alongside `getProgramAccounts`
- Compute Unit Costs page: add `getProgramAccountsV2` at 20 CU / 117 throughput CU, matching `getProgramAccounts`

The CU pricing entry mirrors `getProgramAccounts` per the request. A companion PR on OMGWINNING/chain-config updates `topconfig_v2/solana.yml` so the pricing table stays consistent once Daikon regenerates the `cu:auto` block.

Refs DOCS-212

Requested-by: @dimitriedavid
@alchemy-bot
alchemy-bot requested a review from a team as a code owner September 1, 2026 09:37
@github-actions

github-actions Bot commented Sep 1, 2026

Copy link
Copy Markdown

🔗 Preview Mode

Name Status Preview Updated (UTC)
Alchemy Docs ✅ Ready 🔗 Visit Preview Sep 1, 2026, 9:52 AM

@chatgpt-codex-connector chatgpt-codex-connector Bot left a comment

Copy link
Copy Markdown

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

💡 Codex Review

Here are some automated review suggestions for this pull request.

Reviewed commit: bf68189679

ℹ️ About Codex in GitHub

Codex has been enabled to automatically review pull requests in this repo. Reviews are triggered when you

  • Open a pull request for review
  • Mark a draft as ready
  • Comment "@codex review".

If Codex has suggestions, it will comment; otherwise it will react with 👍.

When you sign up for Codex through ChatGPT, Codex can also answer questions or update the PR, like "@codex address that feedback".

unchanged; only the JSON shape of `result` differs.
encoding:
$ref: "./base-types.yaml#/components/schemas/Encoding"
default: json

Copy link
Copy Markdown

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

P2 Badge Remove the unsupported json encoding default

When generated documentation or a client applies this default, it will send encoding: "json", but the referenced Encoding schema permits only base58, base64, base64+zstd, and jsonParsed (base-types.yaml:23-27). Use a supported encoding as the default or omit the default so the new method does not advertise an invalid request value.

Useful? React with 👍 / 👎.

…nts + V2

Per follow-up on DOCS-212 Slack thread: both methods should use normal
throughput (throughput CU defaults to the base CU).

- Drop `x-rate-limit-cus: 117` from `getProgramAccounts` and
  `getProgramAccountsV2` in `_components/solana/methods.yaml`.
- Clear the Throughput CU column for both rows in
  `compute-unit-costs.mdx` so they render blank (i.e., defaults to
  the 20 CU base cost per the Compute Units page).

Companion chain-config PR (OMGWINNING/chain-config#7149) drops
`rateLimitComputeUnits: 117` from the same two methods in
`topconfig_v2/solana.yml` and the legacy `topconfig/topconfig.yml`
(prod + staging in both layouts).

The `rateLimitGroup: fragile:getProgramAccounts` grouping is
untouched (the request was only to remove the throughput CU). If that
group should also be removed, that's a separate one-liner.

Refs DOCS-212

Requested-by: @dimitriedavid
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant