Skip to content

Core Reads

This page defines trusted-mode core reads and marks the subset that is also available in light mode.

Normative sources: docs/specs/prd.md and docs/specs/json-rpc-contract.md.

This page is an operational summary. For API-contract disputes, follow those normative sources.

TypeContract
BlockTaglatest, earliest, pending, safe, finalized, or numeric quantity
TrustedBlockSelectorany BlockTag
FeeHistoryResultobject with oldestBlock, baseFeePerGas, gasUsedRatio, and optional reward
SelectorMeaning
latestcurrent canonical local head
pendingalias of latest
safealias of latest
finalizedalias of latest
earliestblock 0
numeric quantityexact local block number

Malformed selectors return -32602.

For trusted-mode state-backed reads (eth_getBalance, eth_getCode, eth_getStorageAt, and eth_getTransactionCount), selectors must resolve to the current local head. latest, pending, safe, and finalized are accepted because they alias the head; earliest is accepted only while the current head is genesis; numeric selectors are accepted only when equal to the current head. Other resolved non-head selectors return -32602.

These methods exist in both modes.

For this table, the Errors column is trusted-mode scoped. In light mode, these same methods follow the separate light-mode contract, including readiness and proof-verification errors (-32011, -32014, -32015 where applicable), in Verified Light-Mode Reads.

MethodExact paramsExact resultErrors
eth_chainId[] or omittedQuantityHextrusted mode: -32602 for non-empty params; light mode: see Verified Light-Mode Reads
eth_blockNumber[] or omittedQuantityHextrusted mode: -32602 for non-empty params; light mode: see Verified Light-Mode Reads
eth_getBalance[address, block]QuantityHextrusted mode: -32602 malformed address or selector; light mode: see Verified Light-Mode Reads
eth_getCode[address, block]HexDatatrusted mode: -32602 malformed address or selector; light mode: see Verified Light-Mode Reads
eth_getStorageAt[address, slot, block]Bytes32trusted mode: -32602 malformed address, slot, or selector; light mode: see Verified Light-Mode Reads
eth_getTransactionCount[address, block]QuantityHextrusted mode: -32602 malformed address or selector; light mode: see Verified Light-Mode Reads

Trusted-mode state-backed read selectors follow the current-head-only constraint above.

These methods are trusted-mode only and return -32010 in light mode.

MethodExact paramsExact resultErrors
eth_accounts[] or omittedarray of 10 managed dev-account addresses in ascending index order-32602 for non-empty params
eth_coinbase[] or omittedAddress-32602 for non-empty params
eth_gasPrice[] or omittedQuantityHex-32602 for non-empty params
eth_maxPriorityFeePerGas[] or omittedQuantityHex-32602 for non-empty params
eth_blobBaseFee[] or omittedQuantityHex-32602 for non-empty params
eth_feeHistory[blockCount, newestBlock] or [blockCount, newestBlock, rewardPercentiles]FeeHistoryResult-32602 malformed block count, selector, or percentiles
  • eth_accounts returns the 10 deterministic managed dev-account addresses in ascending index order.
  • eth_coinbase returns the current trusted-mode coinbase (default managed account index 0).
  • For mnemonic, derivation root, full address/private-key table, and signing behavior, see Managed Dev Wallet (Trusted Mode).

Shape:

{
"oldestBlock": "0x0",
"baseFeePerGas": ["0x3b9aca00", "0x3b9aca00"],
"gasUsedRatio": [0.0],
"reward": [["0x0"]]
}

Rules:

  • oldestBlock: QuantityHex
  • baseFeePerGas: length N + 1
  • gasUsedRatio: length N
  • reward: optional; when present, length N, each inner array length equals requested percentile count
  • when reward is present, each reward entry for an empty block is 0x0
  • N is the number of returned blocks after truncation

Supported params:

  • [blockCount, newestBlock]
  • [blockCount, newestBlock, rewardPercentiles]

Validation:

  • tuple length must be 2 or 3
  • blockCount must decode as QuantityHex and be >= 1
  • newestBlock must resolve as a trusted selector
  • if rewardPercentiles is present, it must be an array with length <= 100
  • each percentile value must be finite and within 0 <= p <= 100
  • percentile values must be non-decreasing

Bounds and truncation:

  • max effective blockCount is 1024
  • range is truncated at genesis when needed
  • truncation does not produce an error

Result rules:

  • oldestBlock is QuantityHex
  • baseFeePerGas length is N + 1
  • gasUsedRatio length is N
  • reward is omitted when percentiles are omitted
  • when reward is present, outer length is N; each inner array length equals requested percentile count
  • when reward is present, each reward entry for an empty block is 0x0

N is the number of returned blocks after truncation.

  • eth_accounts, eth_coinbase, eth_gasPrice, eth_maxPriorityFeePerGas, eth_blobBaseFee, and eth_feeHistory are trusted-mode only and return -32010 in light mode.
  • eth_chainId, eth_blockNumber, eth_getBalance, eth_getCode, eth_getStorageAt, and eth_getTransactionCount are also available in light mode with a separate contract and distinct error surface: Verified Light-Mode Reads.

Request:

{
"jsonrpc": "2.0",
"id": 1,
"method": "eth_getBalance",
"params": ["0xf39Fd6e51aad88F6F4ce6aB8827279cffFb92266", "latest"]
}

Response:

{
"jsonrpc": "2.0",
"id": 1,
"result": "0x21e19e0c9bab2400000"
}

Request:

{
"jsonrpc": "2.0",
"id": 2,
"method": "eth_feeHistory",
"params": ["0x2", "latest", [25, 75]]
}

Response shape:

{
"jsonrpc": "2.0",
"id": 2,
"result": {
"oldestBlock": "0x0",
"baseFeePerGas": ["0x3b9aca00", "0x3b9aca00", "0x3b9aca00"],
"gasUsedRatio": [0.0, 0.0],
"reward": [["0x0", "0x0"], ["0x0", "0x0"]]
}
}