Optimism txn batches are not indexed without blobs API URL
arshsingh opened this issue · comments
Description
It looks like the env var INDEXER_OPTIMISM_L1_BATCH_BLOCKSCOUT_BLOBS_API_URL
is required. If not set I see the following error in the logs and txn batches are not indexed:
{"time":"2024-04-30T01:56:10.166Z","severity":"error","message":"L2 genesis block number is undefined or invalid.","metadata":{"fetcher":"optimism_txn_batches"}}
However, using blobs for submitting batches is not required and a chain might opt to continue using calldata instead.
In some cases a blobs API might not even make sense, for e.g. if the chain is an L3 that rolls up to an L2 like OP mainnet.
Type of the installation
Docker
Type of the JSON RPC archive node
Geth
Type of the chain
L2
Link to the page
No response
Steps to reproduce
No response
Backend version
v6.4.0
Frontend version
v1.28.0
Elixir & Erlang/OTP versions
..
Operating system
No response
Additional information
No response
Hi, Yes, INDEXER_OPTIMISM_L1_BATCH_BLOCKSCOUT_BLOBS_API_URL
is required, but your error message tells that you haven't defined another env: INDEXER_OPTIMISM_L2_BATCH_GENESIS_BLOCK_NUMBER
(defines the block number of BedRock upgrade, so if your OP chain starts from scratch with BedRock, the block number should be 0
).
If your OP chain uses calldata instead of EIP-4844 blobs, you can workaround that by defining some dummy INDEXER_OPTIMISM_L1_BATCH_BLOCKSCOUT_BLOBS_API_URL
(e.g. https://eth-sepolia.blockscout.com/api/v2/blobs
). It won't be used if your batcher transactions don't have type 3
(EIP-4844 transactions).
But the env INDEXER_OPTIMISM_L2_BATCH_GENESIS_BLOCK_NUMBER
is required anyway. Please, see the full list of env variables for Optimism Rollup: https://docs.blockscout.com/for-developers/information-and-settings/env-variables#optimism-rollup-management
Ah sorry, pasted the incorrect log :|
you can workaround that by defining some dummy INDEXER_OPTIMISM_L1_BATCH_BLOCKSCOUT_BLOBS_API_URL
Thanks for the suggestion. This is what I ended up doing and it works. Would be nice to make it optional though.