Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Optimism txn batches are not indexed without blobs API URL #9982

Open
arshsingh opened this issue Apr 30, 2024 · 2 comments
Open

Optimism txn batches are not indexed without blobs API URL #9982

arshsingh opened this issue Apr 30, 2024 · 2 comments
Assignees

Comments

@arshsingh
Copy link

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

@varasev
Copy link
Contributor

varasev commented Apr 30, 2024

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

@arshsingh
Copy link
Author

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.

@vbaranov vbaranov removed the triage label May 1, 2024
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

3 participants