L1 JSON-RPC Method | Purpose |
---|---|
eth_getLogs | Discover L1 events (Batches, Confirmations, Executions, Messages, Keysets) |
eth_getBlockByNumber | Get L1 Block Timestamps, Chain Head/Safe Block info |
eth_getTransactionByHash | Get L1 Tx Calldata (Batches), Get L1 Tx Originator (L1->L2 Messages) |
eth_call | Get Keyset Creation Block from SequencerInbox contract (Used infrequently for Arbitrum chains only) |
eth_getLogs
INDEXER_ARBITRUM_BATCHES_TRACKING_RECHECK_INTERVAL
and INDEXER_ARBITRUM_TRACKING_MESSAGES_ON_L1_RECHECK_INTERVAL
for new events, faster polling for historical catch-up).
SequencerBatchDelivered
(from SequencerInbox
contract): To discover new L1 batches containing L2 block data. Polled periodically by the batch tracking worker (TrackingBatchesStatuses
).SendRootUpdated
(from Outbox
contract): To discover L2 block confirmations. Polled periodically by the batch tracking worker.OutBoxTransactionExecuted
(from Outbox
contract): To discover L2-to-L1 message executions on L1. Polled periodically by the batch tracking worker.MessageDelivered
(from Bridge
contract): To discover L1-to-L2 message initiations on L1. Polled periodically by the L1 message tracking worker (TrackingMessagesOnL1
).SetValidKeyset
(from SequencerInbox
contract): To retrieve details about AnyTrust Data Availability Committee keysets. This is triggered on-demand when processing an AnyTrust batch that references a keyset hash not yet seen in the database.eth_getBlockByNumber
eth_getLogs
. When a relevant event (like batch delivery, confirmation, or message execution) is found in a log, this method is called for the corresponding L1 block number to get its timestamp. This happens in batches triggered by the periodic log polling.recheck_interval
) with tags "latest"
and "safe"
to determine the current L1 chain head and the safe block for reorg protection and determining finality. Used by batch, confirmation, and execution workers.eth_getTransactionByHash
Called in response to processing events found via eth_getLogs
:
SequencerBatchDelivered
event is processed, this method is called for the L1 transaction hash associated with the event to retrieve the transaction’s input
data (calldata). This calldata contains essential batch information, especially for non-blob batches.MessageDelivered
event (for an L1->L2 message) is processed, this method is called for the L1 transaction hash to retrieve the originator (from
) address.eth_call
Used less frequently than the other calls.
eth_call
is made to the SequencerInbox
contract’s getKeysetCreationBlock
function to determine the L1 block where the keyset became active. This is triggered on-demand during batch processing.eth_getLogs
(driven by INDEXER_OPTIMISM_L1_ETH_GET_LOGS_RANGE_SIZE
for catchup mode) - one request per block in realtime modeeth_getBlockByNumber
for each block within eth_getLogs
response to get block timestamp. Batch request is used, so one batch request per one eth_getLogs
callOptimismPortal
’s respectedGameType()
public getter (every 60 seconds)DisputeGameFactory
’s gameCount
public getter (every 60 seconds)DisputeGameFactory
’s gameAtIndex
public getter (max 50 items per batch request) and the corresponding batch calls to extraData
, resolvedAt
, status
public getters for each dispute gameDisputeGameFactory
’s resolvedAt
public getter (max 50 items per batch request) for max 1000 last unresolved gamesDisputeGameFactory
’s status
public getter (max 50 items per batch request) for max 1000 last resolved gameseth_getLogs
(driven by INDEXER_OPTIMISM_L1_ETH_GET_LOGS_RANGE_SIZE
for catchup mode) - one request per block in realtime modeeth_getBlockByNumber
(batch RPC calls containing up to INDEXER_OPTIMISM_L1_BATCH_BLOCKS_CHUNK_SIZE
requests per batch in catchup mode starting from the start block defined in SystemConfig
contract) - one request per block in realtime modeeth_getLogs
(driven by INDEXER_OPTIMISM_L1_ETH_GET_LOGS_RANGE_SIZE
for catchup mode) - one request per block in realtime modeeth_getBlockByNumber
for each block within eth_getLogs
response to get block timestamp. Batch request is used, so one batch request per one eth_getLogs
callBatchesStatusTracker
. This tracker performs periodic checks based on the INDEXER_ZKSYNC_BATCHES_STATUS_RECHECK_INTERVAL
ENV variable setting.:check_committed
, :check_proven
, :check_executed
) first queries the L2 node via RPC (zks_getL1BatchDetails
).eth_getTransactionReceipt
or eth_getTransactionByHash
) is called for that specific transaction hash.eth_getTransactionReceipt
BlockCommit
or BlockExecution
events) to confirm which batches were affected by that single L1 transaction.
Frequency:
BatchesStatusTracker
process.INDEXER_ZKSYNC_BATCHES_STATUS_RECHECK_INTERVAL
.zks_getL1BatchDetails
) for the oldest uncommitted/unexecuted batch.eth_getTransactionReceipt
is called on the L1 node for that specific transaction hash.eth_getTransactionByHash
input
(calldata) to decode the list of batches proven in that single L1 transaction.
Frequency:
BatchesStatusTracker
process, similar to eth_getTransactionReceipt
. It also runs within the tracker’s periodic INDEXER_ZKSYNC_BATCHES_STATUS_RECHECK_INTERVAL
.zks_getL1BatchDetails
) for the oldest unproven batch. If the L2 RPC response indicates a new prove L1 transaction hash, then eth_getTransactionByHash
is called on the L1 node for that specific transaction hash to retrieve its calldata.eth_getLogs
(max 1000 blocks in a range per request for catchup mode) - one request per block in realtime modeeth_getBlockByNumber
for each block within eth_getLogs
response to get block timestamp (batch request is used with max 50 items per request)eth_getBlockByNumber
to get latest block (every block time in seconds, divided by 2)symbol()
and decimals()
getters of token contracts) per one eth_getLogs
callsymbol()
and decimals()
getters of token contracts) per one set of logs taken in realtime mode from the L2 blockzkevm_batchNumber
, zkevm_virtualBatchNumber
, zkevm_verifiedBatchNumber
requests per INDEXER_POLYGON_ZKEVM_BATCHES_RECHECK_INTERVAL
secondszkevm_getBatchByNumber
requests per INDEXER_POLYGON_ZKEVM_BATCHES_CHUNK_SIZE
zkEVM batcheseth_getLogs
(driven by INDEXER_SCROLL_L1_ETH_GET_LOGS_RANGE_SIZE
for catchup mode) - one request per block in realtime modeeth_getBlockByNumber
for each block within eth_getLogs
response to get block timestamp (batch request is used with max 50 items per request)eth_getBlockByNumber
to get latest block (every block time in seconds, divided by 2)eth_getLogs
(driven by INDEXER_SCROLL_L1_ETH_GET_LOGS_RANGE_SIZE
for catchup mode) - one request per block in realtime modeeth_getBlockByNumber
for each block within eth_getLogs
response (taking into account SentMessage
events only) to get block timestamp (batch request is used with max 50 items per request)eth_getBlockByNumber
to get latest block (every block time in seconds, divided by 2)eth_getLogs
requests per chunk for catchup mode (max 1000 blocks in a chunk) - three requests per block in realtime modeeth_getBlockByNumber
for each block within eth_getLogs
responses (taking into account deposit events only) to get block timestamp (batch request is used with max 50 items per request)eth_getBlockByNumber
to get latest block (every block time in seconds, divided by 2)eth_getBlockByNumber
to get latest block (every block time in seconds, divided by 2)