Skip to content
This repository has been archived by the owner on Jan 22, 2025. It is now read-only.

Commit

Permalink
docs: document the limits on RPC API inputs and outputs
Browse files Browse the repository at this point in the history
  • Loading branch information
steveluscher committed Apr 16, 2022
1 parent 4023dec commit 6c5a3ca
Show file tree
Hide file tree
Showing 2 changed files with 8 additions and 7 deletions.
1 change: 1 addition & 0 deletions client/src/rpc_request.rs
Original file line number Diff line number Diff line change
Expand Up @@ -190,6 +190,7 @@ impl fmt::Display for RpcRequest {
}
}

// Changing any of these? Update the JSON RPC docs!
pub const MAX_GET_SIGNATURE_STATUSES_QUERY_ITEMS: usize = 256;
pub const MAX_GET_CONFIRMED_SIGNATURES_FOR_ADDRESS_SLOT_RANGE: u64 = 10_000;
pub const MAX_GET_CONFIRMED_BLOCKS_RANGE: u64 = 500_000;
Expand Down
14 changes: 7 additions & 7 deletions docs/src/developing/clients/jsonrpc-api.md
Original file line number Diff line number Diff line change
Expand Up @@ -776,7 +776,7 @@ Returns a list of confirmed blocks between two slots
#### Parameters:

- `<u64>` - start_slot, as u64 integer
- `<u64>` - (optional) end_slot, as u64 integer
- `<u64>` - (optional) end_slot, as u64 integer (must be no more than 500,000 blocks higher than the `start_slot`)
- (optional) [Commitment](jsonrpc-api.md#configuring-state-commitment); "processed" is not supported. If parameter not provided, the default is "finalized".

#### Results:
Expand Down Expand Up @@ -808,7 +808,7 @@ Returns a list of confirmed blocks starting at the given slot
#### Parameters:

- `<u64>` - start_slot, as u64 integer
- `<u64>` - limit, as u64 integer
- `<u64>` - limit, as u64 integer (must be no more than 500,000 blocks higher than the `start_slot`)
- (optional) [Commitment](jsonrpc-api.md#configuring-state-commitment); "processed" is not supported. If parameter not provided, the default is "finalized".

#### Results:
Expand Down Expand Up @@ -1732,11 +1732,11 @@ Result:

### getMultipleAccounts

Returns the account information for a list of Pubkeys
Returns the account information for a list of Pubkeys.

#### Parameters:

- `<array>` - An array of Pubkeys to query, as base-58 encoded strings
- `<array>` - An array of Pubkeys to query, as base-58 encoded strings (up to a maximum of 100).
- `<object>` - (optional) Configuration object containing the following optional fields:
- (optional) [Commitment](jsonrpc-api.md#configuring-state-commitment)
- `encoding: <string>` - encoding for Account data, either "base58" (_slow_), "base64", "base64+zstd", or "jsonParsed".
Expand Down Expand Up @@ -1887,7 +1887,7 @@ Returns all accounts owned by the provided program Pubkey
"base64+zstd" compresses the Account data using [Zstandard](https://facebook.github.io/zstd/) and base64-encodes the result.
"jsonParsed" encoding attempts to use program-specific state parsers to return more human-readable and explicit account state data. If "jsonParsed" is requested but a parser cannot be found, the field falls back to "base64" encoding, detectable when the `data` field is type `<string>`.
- (optional) `dataSlice: <object>` - limit the returned account data using the provided `offset: <usize>` and `length: <usize>` fields; only available for "base58", "base64" or "base64+zstd" encodings.
- (optional) `filters: <array>` - filter results using various [filter objects](jsonrpc-api.md#filters); account must meet all filter criteria to be included in results
- (optional) `filters: <array>` - filter results using up to 4 [filter objects](jsonrpc-api.md#filters); account must meet all filter criteria to be included in results
- (optional) `withContext: bool` - wrap the result in an RpcResponse JSON object.

##### Filters:
Expand Down Expand Up @@ -2135,7 +2135,7 @@ active slots plus `MAX_RECENT_BLOCKHASHES` rooted slots.

#### Parameters:

- `<array>` - An array of transaction signatures to confirm, as base-58 encoded strings
- `<array>` - An array of transaction signatures to confirm, as base-58 encoded strings (up to a maximum of 256)
- `<object>` - (optional) Configuration object containing the following field:
- `searchTransactionHistory: <bool>` - if true, a Solana node will search its ledger cache for any signatures not found in the recent status cache

Expand Down Expand Up @@ -2318,7 +2318,7 @@ Returns the slot leaders for a given slot range
#### Parameters:

- `<u64>` - Start slot, as u64 integer
- `<u64>` - Limit, as u64 integer
- `<u64>` - Limit, as u64 integer (between 1 and 5,000)

#### Results:

Expand Down

0 comments on commit 6c5a3ca

Please sign in to comment.