Skip to content

Commit

Permalink
docs: move rpc info to rpc docs (solana-labs#33723)
Browse files Browse the repository at this point in the history
docs: link fixes

docs: link fixes

docs: link fixes
  • Loading branch information
jacobcreech authored and nickfrosty committed Nov 15, 2023
1 parent 6601960 commit 357e574
Show file tree
Hide file tree
Showing 2 changed files with 16 additions and 22 deletions.
21 changes: 0 additions & 21 deletions docs/src/operations/guides/validator-start.md
Original file line number Diff line number Diff line change
Expand Up @@ -441,24 +441,3 @@ As mentioned earlier, be sure that if you use logrotate, any script you create
which starts the solana validator process uses "exec" to do so (example: "exec
solana-validator ..."); otherwise, when logrotate sends its signal to the
validator, the enclosing script will die and take the validator process with it.

### Account indexing

As the number of populated accounts on the cluster grows, account-data RPC
requests that scan the entire account set -- like
[`getProgramAccounts`](../api/http#getprogramaccounts) and
[SPL-token-specific requests](../api/http#gettokenaccountsbydelegate) -- may
perform poorly. If your validator needs to support any of these requests, you
can use the `--account-index` parameter to activate one or more in-memory
account indexes that significantly improve RPC performance by indexing accounts
by the key field. Currently supports the following parameter values:

- `program-id`: each account indexed by its owning program; used by
[getProgramAccounts](../api/http#getprogramaccounts)
- `spl-token-mint`: each SPL token account indexed by its token Mint; used by
[getTokenAccountsByDelegate](../api/http#gettokenaccountsbydelegate), and
[getTokenLargestAccounts](../api/http#gettokenlargestaccounts)
- `spl-token-owner`: each SPL token account indexed by the token-owner address;
used by [getTokenAccountsByOwner](../api/http#gettokenaccountsbyowner), and
[getProgramAccounts](../api/http#getprogramaccounts) requests that include an
spl-token-owner filter.
17 changes: 16 additions & 1 deletion docs/src/operations/setup-an-rpc-node.md
Original file line number Diff line number Diff line change
Expand Up @@ -68,4 +68,19 @@ The identities of the [known validators](./guides/validator-start.md#known-valid

Additional examples of other Solana cluster specific validator commands can be found on the [Clusters](../clusters/available.md) page.

Keep in mind, you will still need to customize these commands to operate as an RPC node, as well other operator specific configuration settings.
Keep in mind, you will still need to customize these commands to operate as an RPC node, as well other operator specific configuration settings.

## Account indexing

As the number of populated accounts on the cluster grows, account-data RPC
requests that scan the entire account set -- like
[`getProgramAccounts`](../../api/http#getprogramaccounts) and
[SPL-token-specific requests](../../api/http#gettokenaccountsbydelegate) --
may perform poorly. If your validator needs to support any of these requests,
you can use the `--account-index` parameter to activate one or more in-memory
account indexes that significantly improve RPC performance by indexing accounts
by the key field. Currently supports the following parameter values:

- `program-id`: each account indexed by its owning program; used by [getProgramAccounts](../../api/http#getprogramaccounts)
- `spl-token-mint`: each SPL token account indexed by its token Mint; used by [getTokenAccountsByDelegate](../../api/http#gettokenaccountsbydelegate), and [getTokenLargestAccounts](../../api/http#gettokenlargestaccounts)
- `spl-token-owner`: each SPL token account indexed by the token-owner address; used by [getTokenAccountsByOwner](../../api/http#gettokenaccountsbyowner), and [getProgramAccounts](../../api/http#getprogramaccounts) requests that include an spl-token-owner filter.

0 comments on commit 357e574

Please sign in to comment.