Skip to content

Flashblocks Specification

The Flashblocks RPC provider extends standard Ethereum JSON-RPC methods to query preconfirmed flashblock state via the pending tag. The methods, parameters, and return types are specified below.

All types used in these RPC methods are identical to the standard OP Stack RPC types. No modifications have been made to the existing type definitions.

The following standard Ethereum JSON-RPC methods are enhanced to support the pending tag for querying preconfirmed state.

Returns block information for the specified block number.

NameTypeDescription
blockNumberStringBlock number (hex) or tag. Use "pending" for preconfirmed state.
fullTransactionsBooleanIf true, returns full transaction objects; if false, returns transaction hashes.

Object — Block object, or null if the block does not exist.

// Request
{
"method": "eth_getBlockByNumber",
"params": ["pending", false],
"id": 1,
"jsonrpc": "2.0"
}
// Response
{
"id": 1,
"jsonrpc": "2.0",
"result": {
"hash": "0x0000000000000000000000000000000000000000000000000000000000000000",
"parentHash": "0x...",
"stateRoot": "0x...",
"transactionsRoot": "0x...",
"receiptsRoot": "0x...",
"number": "0x123",
"gasUsed": "0x5208",
"gasLimit": "0x1c9c380",
"timestamp": "0x...",
"extraData": "0x",
"mixHash": "0x...",
"nonce": "0x0",
"transactions": ["0x..."]
}
}
FieldDescription
hashBlock hash calculated from the current flashblock header.
parentHashHash of the parent block.
stateRootCurrent state root from the latest flashblock.
transactionsRootTransactions trie root.
receiptsRootReceipts trie root.
numberBlock number being built.
gasUsedCumulative gas used by all transactions.
gasLimitBlock gas limit.
timestampBlock timestamp.
extraDataExtra data bytes.
mixHashMix hash value.
nonceBlock nonce value.
transactionsArray of transaction hashes or full transaction objects.

Returns the receipt for a transaction. When the transaction exists only in the preconfirmed (flashblock) state, the receipt is still returned — enabling callers to confirm inclusion before the block is finalized.

NameTypeDescription
transactionHashStringHash of the transaction.

Object — Transaction receipt, or null if the transaction is not found.

// Request
{
"method": "eth_getTransactionReceipt",
"params": ["0x..."],
"id": 1,
"jsonrpc": "2.0"
}
// Response
{
"id": 1,
"jsonrpc": "2.0",
"result": {
"transactionHash": "0x...",
"blockHash": "0x0000000000000000000000000000000000000000000000000000000000000000",
"blockNumber": "0x123",
"transactionIndex": "0x0",
"from": "0x...",
"to": "0x...",
"gasUsed": "0x5208",
"cumulativeGasUsed": "0x5208",
"effectiveGasPrice": "0x...",
"status": "0x1",
"contractAddress": null,
"logs": [],
"logsBloom": "0x..."
}
}
FieldDescription
transactionHashHash of the transaction.
blockHashZero hash (0x000...000) for preconfirmed transactions.
blockNumberBlock number containing the transaction.
transactionIndexIndex of the transaction in the block.
fromSender address.
toRecipient address.
gasUsedGas used by this transaction.
cumulativeGasUsedTotal gas used up to and including this transaction.
effectiveGasPriceEffective gas price paid.
status0x1 for success, 0x0 for failure.
contractAddressAddress of created contract (for contract creation transactions), otherwise null.
logsArray of log objects emitted by the transaction.
logsBloomBloom filter for the logs.

Returns the balance of an account.

NameTypeDescription
addressStringAddress to query.
blockNumberStringBlock number (hex) or tag. Use "pending" for preconfirmed state.

String — Account balance in wei, hex-encoded.

// Request
{
"method": "eth_getBalance",
"params": ["0x...", "pending"],
"id": 1,
"jsonrpc": "2.0"
}
// Response
{
"id": 1,
"jsonrpc": "2.0",
"result": "0x1bc16d674ec80000"
}

Returns the number of transactions sent from an address (the account nonce).

NameTypeDescription
addressStringAddress to query.
blockNumberStringBlock number (hex) or tag. Use "pending" for preconfirmed state.

String — Transaction count (nonce), hex-encoded.

// Request
{
"method": "eth_getTransactionCount",
"params": ["0x...", "pending"],
"id": 1,
"jsonrpc": "2.0"
}
// Response
{
"id": 1,
"jsonrpc": "2.0",
"result": "0x5"
}

  • When "pending" is used as the block tag, the method queries preconfirmed state from the flashblocks cache.
  • If no preconfirmed data is available, the method falls back to the latest confirmed state.
  • For non-pending queries (e.g., "latest", "finalized", or a specific block number), the method behaves identically to standard Ethereum JSON-RPC.
  • Standard JSON-RPC error responses are returned for invalid requests.
  • null is returned for non-existent transactions or blocks.
  • When flashblocks are disabled or unavailable, the RPC falls back to standard behavior transparently.

Canonical specification: docs/specs/flashblocks.md