Skip to content

Latest commit

 

History

History
336 lines (268 loc) · 85.7 KB

backend-envs-chain-specific.md

File metadata and controls

336 lines (268 loc) · 85.7 KB
description
ENVS for specific chains and rollups

Backend ENVs: Chain-Specific

Chain Specific ENVs

The following ENVs are specific to different types of chains and rollups. To use these specific variables you will also need to set the CHAIN_TYPE variable to the appropriate value.

Variable Description Parameters
CHAIN_TYPE Specifies the model of data and enables fetchers specific to the chain.

Version: v5.3.0+
Default: default
Applications: API, Indexer

Runtime vs Compile-time Chain Types

{% hint style="warning" %}

Prior to v8.0.0, updating CHAIN_TYPE variable required recompilation. Starting with v8.0.0, many chain types can be configured at runtime.

{% endhint %}

Runtime-Configurable Chain Types

These chain types can be configured by simply setting an environment variable with the standard image:

  • default (standard EVM chain)
  • neon
  • stability
  • blackfort
  • shibarium
  • polygon_edge

Example:

docker run -e CHAIN_TYPE=shibarium ghcr.io/blockscout/blockscout:latest

Compile-time Chain Types

These specialized chain types still require recompilation and dedicated images:

  • ethereum
  • optimism
  • arbitrum
  • polygon_zkevm
  • rsk
  • scroll
  • suave
  • zetachain
  • filecoin

Example:

docker run -e CHAIN_TYPE=optimism ghcr.io/blockscout/blockscout-optimism:latest

{% hint style="info" %}

You can browse all available image variants in the Blockscout GitHub Packages repository. Each image variant includes specific tags and documentation for deployment options.

{% endhint %}

Time format

Can be set in format 1h for 1 hour, 1m for 1 minute, 1s or 1 for 1 second, 1ms for 1 millisecond

{% hint style="warning" %} Note: Before release 5.1.2, all environment variables of time format supported only integers in seconds (without dimensions) as values. {% endhint %}

Ethereum Management

Variable Description Parameters
INDEXER_BEACON_RPC_URL Beacon Chain RPC endpoint used to fetch blob sidecars. Required if INDEXER_OPTIMISM_L1_SYSTEM_CONFIG_CONTRACT is not empty. Implemented in #9168.

Version: v6.2.0+
Default: http://localhost:5052
Applications: Indexer

INDEXER_DISABLE_BEACON_BLOB_FETCHER If true the Beacon data blobs fetcher won't be started, new transaction and block fields will still be extracted. Implemented in #9168.

Version: v6.2.0+
Default: false
Applications: Indexer

INDEXER_BEACON_BLOB_FETCHER_SLOT_DURATION Slot duration in the Beacon Chain in seconds. Implemented in #9168. Prior to v6.2.0: required if INDEXER_OPTIMISM_L1_SYSTEM_CONFIG_CONTRACT is not empty.

Version: v6.2.0+
Default: 12
Applications: Indexer

INDEXER_BEACON_BLOB_FETCHER_REFERENCE_SLOT Any past finalized Beacon Chain slot number. Used as reference for blob inclusion slot calculations. Implemented in #9168. Prior to v6.2.0: required if INDEXER_OPTIMISM_L1_SYSTEM_CONFIG_CONTRACT is not empty.

Version: v6.2.0+
Default: 8000000
Applications: Indexer

INDEXER_BEACON_BLOB_FETCHER_REFERENCE_TIMESTAMP UTC timestamp of the Beacon Chain slot specified in INDEXER_BEACON_BLOB_FETCHER_REFERENCE_SLOT. Used as reference for blob inclusion slot calculations. Implemented in #9168. Prior to v6.2.0: required if INDEXER_OPTIMISM_L1_SYSTEM_CONFIG_CONTRACT is not empty.

Version: v6.2.0+
Default: 1702824023
Applications: Indexer

INDEXER_BEACON_BLOB_FETCHER_START_BLOCK Beacon Chain blob fetcher start block. On start-up, indexer will only look for missed blobs beyond this block number. It's recommended to set this block to the first block after the Dencun hardfork. Implemented in #9168.

Version: v6.2.0+
Default: 19200000
Applications: Indexer

INDEXER_BEACON_BLOB_FETCHER_END_BLOCK Beacon Chain blob fetcher end block. On start-up, indexer will only look for missed blobs before this block number. If set to 0, then all recent till latest will be traversed. Implemented in #9168.

Version: v6.2.0+
Default: 0
Applications: Indexer

Polygon Edge Management

{% hint style="info" %} Polygon edge is no longer supported by the Polygon team in favor of the Polygon CDK - more info {% endhint %}

Variable Description Parameters
INDEXER_POLYGON_EDGE_L1_RPC The RPC endpoint for L1 used to fetch deposit or withdrawal events. Implemented in #8180.

Version: v5.3.0+
Default: (empty)
Applications: Indexer

INDEXER_POLYGON_EDGE_L1_EXIT_HELPER_CONTRACT The address of ExitHelper contract on L1 (root chain) used to fetch withdrawal exits. Required for withdrawal events indexing. Implemented in #8180.

Version: v5.3.0+
Default: (empty)
Applications: Indexer

INDEXER_POLYGON_EDGE_L1_WITHDRAWALS_START_BLOCK The number of start block on L1 (root chain) to index withdrawal exits. If the table of withdrawal exits is not empty, the process will continue indexing from the last indexed message. If empty or not defined, the withdrawal exits are not indexed. Implemented in #8180.

Version: v5.3.0+
Default: (empty)
Applications: Indexer

INDEXER_POLYGON_EDGE_L1_STATE_SENDER_CONTRACT The address of StateSender contract on L1 (root chain) used to fetch deposits. Required for deposit events indexing. Implemented in #8180.

Version: v5.3.0+
Default: (empty)
Applications: Indexer

INDEXER_POLYGON_EDGE_L1_DEPOSITS_START_BLOCK The number of start block on L1 (root chain) to index deposits. If the table of deposits is not empty, the process will continue indexing from the last indexed message. If empty or not defined, the deposits are not indexed. Implemented in #8180.

Version: v5.3.0+
Default: (empty)
Applications: Indexer

INDEXER_POLYGON_EDGE_L2_STATE_SENDER_CONTRACT The address of L2StateSender contract on L2 (child chain) used to fetch withdrawals. Required for withdrawal events indexing. Implemented in #8180.

Version: v5.3.0+
Default: (empty)
Applications: Indexer

INDEXER_POLYGON_EDGE_L2_WITHDRAWALS_START_BLOCK The number of start block on L2 (child chain) to index withdrawals. If the table of withdrawals is not empty, the process will fill gaps and then continue indexing from the last indexed message. If empty or not defined, the withdrawals are not indexed. Implemented in #8180.

Version: v5.3.0+
Default: (empty)
Applications: Indexer

INDEXER_POLYGON_EDGE_L2_STATE_RECEIVER_CONTRACT The address of StateReceiver contract on L2 (child chain) used to fetch deposit executes. Required for deposit events indexing. Implemented in #8180.

Version: v5.3.0+
Default: (empty)
Applications: Indexer

INDEXER_POLYGON_EDGE_L2_DEPOSITS_START_BLOCK The number of start block on L2 (child chain) to index deposit executes. If the table of deposit executes is not empty, the process will fill gaps and then continue indexing from the last indexed message. If empty or not defined, the deposit executes are not indexed. Implemented in #8180.

Version: v5.3.0+
Default: (empty)
Applications: Indexer

INDEXER_POLYGON_EDGE_ETH_GET_LOGS_RANGE_SIZE Block range size for eth_getLogs request in Polygon Edge indexer modules. Implemented in #8180.

Version: v5.3.0+
Default: (empty)
Applications: Indexer

Rootstock Management

Variable Description Parameters
ROOTSTOCK_REMASC_ADDRESS The address hash of remasc address on Rootstock chain. Implemented in #8542.

Version: v5.3.0+
Default: (empty)
Applications: API

ROOTSTOCK_BRIDGE_ADDRESS The address hash of bridge address on Rootstock chain. Implemented in #8542.

Version: v5.3.0+
Default: (empty)
Applications: API

INDEXER_DISABLE_ROOTSTOCK_DATA_FETCHER If true the fetcher of Rootstock specific fields for blocks that are already in the database won't be started, fields from new blocks will be extracted. Implemented in #8742.

Version: v5.3.2+
Default: (empty)
Applications: Indexer

INDEXER_ROOTSTOCK_DATA_FETCHER_INTERVAL The interval between fetching the next INDEXER_ROOTSTOCK_DATA_FETCHER_DB_BATCH_SIZE blocks from the database and the node, used to configure the load on the database and JSON-RPC node. Implemented in #8742.

Version: v5.3.2+
Default: (empty)
Applications: Indexer

INDEXER_ROOTSTOCK_DATA_FETCHER_BATCH_SIZE The number of requests in one JSON-RPC batch request, used to configure the load or RPS on JSON-RPC node. Implemented in #8742.

Version: v5.3.2+
Default: (empty)
Applications: Indexer

INDEXER_ROOTSTOCK_DATA_FETCHER_CONCURRENCY The number of simultaneous requests to the JSON-RPC node, used to configure the load or RPS on JSON-RPC node. Implemented in #8742.

Version: v5.3.2+
Default: (empty)
Applications: Indexer

INDEXER_ROOTSTOCK_DATA_FETCHER_DB_BATCH_SIZE The number of blocks fetched from the database in one database query. Implemented in #8742.

Version: v5.3.2+
Default: (empty)
Applications: Indexer

Scroll management

Variable Description Parameters
INDEXER_SCROLL_L1_RPC The RPC endpoint for L1 used to fetch Deposit and Withdrawal messages. Implemented in #10484.

Version: v6.9.0+
Default: (empty)
Applications: Indexer

INDEXER_SCROLL_L1_CHAIN_CONTRACT The address of ScrollChain contract on L1. Used to fetch batch and bundle events. Implemented in #10819.

Version: v6.9.0+
Default: (empty)
Applications: Indexer

INDEXER_SCROLL_L1_BATCH_START_BLOCK The number of a start block on L1 to index L1 batches and bundles. If the table of batches is not empty, the process will continue indexing from the last indexed batch. Implemented in #10819.

Version: v6.9.0+
Default: (empty)
Applications: Indexer

INDEXER_SCROLL_L1_MESSENGER_CONTRACT The address of L1 Scroll Messenger contract on L1 used to fetch Deposit and Withdrawal messages. Implemented in #10484.

Version: v6.9.0+
Default: (empty)
Applications: Indexer

INDEXER_SCROLL_L1_MESSENGER_START_BLOCK The number of a start block on L1 to index L1 bridge messages. If the table of bridge operations is not empty, the process will continue indexing from the last indexed L1 message. Implemented in #10484.

Version: v6.9.0+
Default: (empty)
Applications: Indexer

INDEXER_SCROLL_L2_MESSENGER_CONTRACT The address of L2 Scroll Messenger contract on L2 used to fetch Deposit and Withdrawal messages. Implemented in #10484.

Version: v6.9.0+
Default: (empty)
Applications: Indexer

INDEXER_SCROLL_L2_MESSENGER_START_BLOCK The number of a start block on L2 to index L2 bridge messages. If the table of bridge operations is not empty, the process will continue indexing from the last indexed L2 message. Implemented in #10484.

Version: v6.9.0+
Default: FIRST_BLOCK
Applications: Indexer

INDEXER_SCROLL_L2_GAS_ORACLE_CONTRACT The address of L1 Gas Oracle contract on L2. Implemented in #10484.

Version: v6.9.0+
Default: (empty)
Applications: Indexer

INDEXER_SCROLL_L1_ETH_GET_LOGS_RANGE_SIZE Block range size for eth_getLogs request in Scroll indexer modules for Layer 1. Implemented in #10484.

Version: v6.9.0+
Default: 250
Applications: Indexer

INDEXER_SCROLL_L2_ETH_GET_LOGS_RANGE_SIZE Block range size for eth_getLogs request in Scroll indexer modules for Layer 2. Implemented in #10484.

Version: v6.9.0+
Default: 1000
Applications: Indexer

SCROLL_L2_CURIE_UPGRADE_BLOCK L2 block number of the Curie upgrade. Implemented in #10484.

Version: v6.9.0+
Default: 0
Applications: API

SCROLL_L1_SCALAR_INIT Initial value for scalar parameter. Implemented in #10484.

Version: v6.9.0+
Default: 0
Applications: API

SCROLL_L1_OVERHEAD_INIT Initial value for overhead parameter. Implemented in #10484.

Version: v6.9.0+
Default: 0
Applications: API

SCROLL_L1_COMMIT_SCALAR_INIT Initial value for commit_scalar parameter. Implemented in #10484.

Version: v6.9.0+
Default: 0
Applications: API

SCROLL_L1_BLOB_SCALAR_INIT Initial value for blob_scalar parameter. Implemented in #10484.

Version: v6.9.0+
Default: 0
Applications: API

SCROLL_L1_BASE_FEE_INIT Initial value for l1_base_fee parameter. Implemented in #10484.

Version: v6.9.0+
Default: 0
Applications: API

SCROLL_L1_BLOB_BASE_FEE_INIT Initial value for l1_blob_base_fee parameter. Implemented in #10484.

Version: v6.9.0+
Default: 0
Applications: API

Shibarium Management

Variable Description Parameters
INDEXER_SHIBARIUM_L1_RPC The RPC endpoint for L1 used to fetch deposit or withdrawal events. Implemented in #8929.

Version: v6.1.0+
Default: (empty)
Applications: Indexer

INDEXER_SHIBARIUM_L1_START_BLOCK The number of start block on L1 to index L1 events. If the table of bridge operations is not empty, the process will continue indexing from the last indexed L1 event. If empty or not defined, the L1 events are not handled. Implemented in #8929.

Version: v6.1.0+
Default: (empty)
Applications: Indexer

INDEXER_SHIBARIUM_L1_DEPOSIT_MANAGER_CONTRACT The address of DepositManagerProxy contract on L1 used to fetch BONE token deposits. Required for L1 events indexing. Implemented in #8929.

Version: v6.1.0+
Default: (empty)
Applications: Indexer

INDEXER_SHIBARIUM_L1_ETHER_PREDICATE_CONTRACT The address of EtherPredicateProxy contract on L1 used to fetch ETH deposits and withdrawals. Required for L1 events indexing. Implemented in #8929.

Version: v6.1.0+
Default: (empty)
Applications: Indexer

INDEXER_SHIBARIUM_L1_ERC20_PREDICATE_CONTRACT The address of ERC20PredicateProxy contract on L1 used to fetch ERC20 token deposits and withdrawals. Required for L1 events indexing. Implemented in #8929.

Version: v6.1.0+
Default: (empty)
Applications: Indexer

INDEXER_SHIBARIUM_L1_ERC721_PREDICATE_CONTRACT The address of ERC721PredicateProxy contract on L1 used to fetch ERC721 token deposits and withdrawals. Optional for L1 events indexing. Implemented in #8929.

Version: v6.1.0+
Default: (empty)
Applications: Indexer

INDEXER_SHIBARIUM_L1_ERC1155_PREDICATE_CONTRACT The address of ERC1155PredicateProxy contract on L1 used to fetch ERC1155 token deposits and withdrawals. Optional for L1 events indexing. Implemented in #8929.

Version: v6.1.0+
Default: (empty)
Applications: Indexer

INDEXER_SHIBARIUM_L1_WITHDRAW_MANAGER_CONTRACT The address of WithdrawManagerProxy contract on L1 used to fetch BONE token withdrawals. Required for L1 events indexing. Implemented in #8929.

Version: v6.1.0+
Default: (empty)
Applications: Indexer

INDEXER_SHIBARIUM_L2_START_BLOCK The number of start block on L2 to index L2 events. If the table of bridge operations is not empty, the process will continue indexing from the last indexed L2 event. If empty or not defined, the L2 events are not handled. Implemented in #8929.

Version: v6.1.0+
Default: (empty)
Applications: Indexer

INDEXER_SHIBARIUM_L2_CHILD_CHAIN_CONTRACT The address of ChildChain contract on L2 used to fetch BONE token deposits. Required for L2 events indexing. Implemented in #8929.

Version: v6.1.0+
Default: (empty)
Applications: Indexer

INDEXER_SHIBARIUM_L2_WETH_CONTRACT The address of WETH contract on L2 used to fetch ETH deposits and withdrawals. Required for L2 events indexing. Implemented in #8929.

Version: v6.1.0+
Default: (empty)
Applications: Indexer

INDEXER_SHIBARIUM_L2_BONE_WITHDRAW_CONTRACT The address of a contract which emits Withdraw event on L2. Used to fetch BONE token withdrawals. Required for L2 events indexing. Implemented in #8929.

Version: v6.1.0+
Default: (empty)
Applications: Indexer

Polygon zkEVM Rollup Management

Variable Description Parameters
INDEXER_POLYGON_ZKEVM_BATCHES_ENABLED Enables Polygon zkEVM batches fetcher. Implemented in #7584.

Version: v5.3.1+
Default: false
Applications: Indexer

INDEXER_POLYGON_ZKEVM_BATCHES_CHUNK_SIZE The number of Polygon zkEVM batches in one chunk when reading them from RPC. Implemented in #7584.

Version: v5.3.1+
Default: 20
Applications: Indexer

INDEXER_POLYGON_ZKEVM_BATCHES_RECHECK_INTERVAL The latest batch rechecking interval, seconds. Implemented in #7584.

Version: v5.3.1+
Default: 60
Applications: Indexer

INDEXER_POLYGON_ZKEVM_L1_RPC The RPC endpoint for L1 used to fetch Deposit or Withdrawal bridge events. Implemented in #9098.

Version: v6.2.0+
Default: (empty)
Applications: Indexer

INDEXER_POLYGON_ZKEVM_L1_BRIDGE_START_BLOCK The number of a start block on L1 to index L1 bridge events. If the table of bridge operations is not empty, the process will continue indexing from the last indexed L1 event. If empty or not defined, the L1 events are not handled. Implemented in #9098.

Version: v6.2.0+
Default: (empty)
Applications: Indexer

INDEXER_POLYGON_ZKEVM_L1_BRIDGE_CONTRACT The address of PolygonZkEVMBridgeV2 contract on L1 used to fetch L1 bridge events. Required for L1 bridge events indexing. Implemented in #9098.

Version: v6.2.0+
Default: (empty)
Applications: Indexer

INDEXER_POLYGON_ZKEVM_L1_BRIDGE_NETWORK_ID L1 Network ID in terms of Polygon zkEVM bridge (0 = Ethereum Mainnet, 1 = Polygon zkEVM, 2 = Astar zkEVM, etc.). Required if INDEXER_POLYGON_ZKEVM_L1_BRIDGE_START_BLOCK or INDEXER_POLYGON_ZKEVM_L2_BRIDGE_START_BLOCK is defined. Implemented in #9637.

Version: v6.4.0+
Default: (empty)
Applications: Indexer

INDEXER_POLYGON_ZKEVM_L1_BRIDGE_ROLLUP_INDEX L1 Rollup index in terms of Polygon zkEVM bridge (0 = Polygon zkEVM, 1 = Astar zkEVM, etc.). Not defined if L1 is Ethereum Mainnet. Required if L1 is not Ethereum Mainnet and INDEXER_POLYGON_ZKEVM_L1_BRIDGE_START_BLOCK or INDEXER_POLYGON_ZKEVM_L2_BRIDGE_START_BLOCK is defined. Implemented in #9637.

Version: v6.4.0+
Default: (empty)
Applications: Indexer

INDEXER_POLYGON_ZKEVM_L1_BRIDGE_NATIVE_SYMBOL The symbol of the native coin on L1 to display it in the table of the bridge Deposits and Withdrawals on UI. Implemented in #9098.

Version: v6.2.0+
Default: ETH
Applications: Indexer

INDEXER_POLYGON_ZKEVM_L1_BRIDGE_NATIVE_DECIMALS The number of decimals to correctly display an amount of native coins for some Deposit or Withdrawal bridge operations on UI. Implemented in #9098.

Version: v6.2.0+
Default: 18
Applications: Indexer

INDEXER_POLYGON_ZKEVM_L2_BRIDGE_START_BLOCK The number of a start block on L2 to index L2 bridge events. If the table of bridge operations is not empty, the process will continue indexing from the last indexed L2 event. If empty or not defined, the L2 events are not handled. Implemented in #9098.

Version: v6.2.0+
Default: (empty)
Applications: Indexer

INDEXER_POLYGON_ZKEVM_L2_BRIDGE_CONTRACT The address of PolygonZkEVMBridgeV2 contract on L2 used to fetch L2 bridge events. Required for L2 bridge events indexing. Implemented in #9098.

Version: v6.2.0+
Default: (empty)
Applications: Indexer

INDEXER_POLYGON_ZKEVM_L2_BRIDGE_NETWORK_ID L2 Network ID in terms of Polygon zkEVM bridge (1 = Polygon zkEVM, 2 = Astar zkEVM, etc.). Required if INDEXER_POLYGON_ZKEVM_L1_BRIDGE_START_BLOCK or INDEXER_POLYGON_ZKEVM_L2_BRIDGE_START_BLOCK is defined. Implemented in #9637.

Version: v6.4.0+
Default: (empty)
Applications: Indexer

INDEXER_POLYGON_ZKEVM_L2_BRIDGE_ROLLUP_INDEX L2 Rollup index in terms of Polygon zkEVM bridge (0 = Polygon zkEVM, 1 = Astar zkEVM, etc.). Required if INDEXER_POLYGON_ZKEVM_L1_BRIDGE_START_BLOCK or INDEXER_POLYGON_ZKEVM_L2_BRIDGE_START_BLOCK is defined. Implemented in #9637.

Version: v6.4.0+
Default: (empty)
Applications: Indexer

Optimism Rollup Management

{% hint style="info" %} Supported together with ENV setting CHAIN_TYPE=optimism {% endhint %}

Variable Description Parameters
INDEXER_OPTIMISM_L1_RPC The RPC endpoint for L1 used to fetch transaction batches, dispute games, output roots, deposits, or withdrawal events. Implemented in #6980.

Version: v6.3.0+
Default: (empty)
Applications: Indexer

INDEXER_OPTIMISM_L1_SYSTEM_CONFIG_CONTRACT The address of SystemConfig contract on L1 required for almost all Optimism fetchers. Implemented in #10199.

Version: v6.8.0+
Default: (empty)
Applications: Indexer

INDEXER_OPTIMISM_L1_BATCH_BLOCKSCOUT_BLOBS_API_URL Defines a URL to Blockscout Blobs API to retrieve L1 blobs from that. Example for Sepolia: https://eth-sepolia.blockscout.com/api/v2/blobs. Implemented in #9571.

Version: v6.3.0+
Default: (empty)
Applications: Indexer

INDEXER_OPTIMISM_L1_BATCH_CELESTIA_BLOBS_API_URL Defines a URL to Celestia blobs indexer to retrieve L1 blobs from that. Example: http://example.com/api/v1/celestia/blob. Implemented in #10199.

Version: v6.8.0+
Default: (empty)
Applications: Indexer

INDEXER_OPTIMISM_L1_BATCH_BLOCKS_CHUNK_SIZE Blocks chunk size to send batch RPC requests. Implemented in #6980.

Version: v6.3.0+
Default: 4
Applications: Indexer

INDEXER_OPTIMISM_L2_BATCH_GENESIS_BLOCK_NUMBER L2 genesis block number. This is the first block of Optimism BedRock upgrade. Equals to 0 if the new chain starts being already upgraded. The block number can be found at superchain registry. Example. Implemented in #9260.

Version: v6.3.0+
Default: (empty)
Applications: Indexer

INDEXER_OPTIMISM_L1_OUTPUT_ORACLE_CONTRACT The address of L2OutputOracle contract on L1 used to fetch output roots. Required for output roots indexing. Implemented in #6980.

Version: v6.3.0+
Default: (empty)
Applications: Indexer

INDEXER_OPTIMISM_L1_DEPOSITS_TRANSACTION_TYPE Defines OP Deposit transaction type (numeric value) which is needed for correct L2 transaction hash calculation by the Deposits indexing module. Implemented in #10674.

Version: v6.9.0+
Default: 126
Applications: Indexer

INDEXER_OPTIMISM_L2_WITHDRAWALS_START_BLOCK The number of start block on L2 to index withdrawals. If the table of withdrawals is not empty, the process will continue indexing from the last indexed withdrawal. Implemented in #6980.

Version: v6.3.0+
Default: 1
Applications: Indexer

INDEXER_OPTIMISM_L2_MESSAGE_PASSER_CONTRACT The address of L2ToL1MessagePasser contract on L2 to index withdrawals. Implemented in #6980.

Version: v6.3.0+
Default: 0x4200000000000000000000000000000000000016
Applications: Indexer

INDEXER_OPTIMISM_L1_ETH_GET_LOGS_RANGE_SIZE Block range size for eth_getLogs request in OP indexer modules for Layer 1. Implemented in #11073.

Version: v6.10.0+
Default: 250
Applications: Indexer

INDEXER_OPTIMISM_L2_ETH_GET_LOGS_RANGE_SIZE Block range size for eth_getLogs request in OP indexer modules for Layer 2. Implemented in #11073.

Version: v6.10.0+
Default: 250
Applications: Indexer

INDEXER_OPTIMISM_BLOCK_DURATION Block time in seconds for the OP chain. Used by the indexer modules. Implemented in #11073.

Version: v6.10.0+
Default: 2
Applications: Indexer

INDEXER_OPTIMISM_L1_PORTAL_CONTRACT Optional. The address of OptimismPortal contract on L1 used to fetch deposit and withdrawal events. Used as a fallback address (when it cannot be read from the SystemConfig contract) for deposit and withdrawal events indexing. Implemented in #11073.

Version: v6.10.0+
Default: (empty)
Applications: Indexer

INDEXER_OPTIMISM_L1_START_BLOCK Optional. The number of L1 block from which the logs (events) scanning should start by the indexer. Used as a fallback number (when it cannot be read from the SystemConfig contract). Implemented in #11073.

Version: v6.10.0+
Default: (empty)
Applications: Indexer

INDEXER_OPTIMISM_L1_BATCH_INBOX Optional. The inbox address to index transaction batches on L1. Used as a fallback address (when it cannot be read from the SystemConfig contract). Implemented in #11073.

Version: v6.10.0+
Default: (empty)
Applications: Indexer

INDEXER_OPTIMISM_L1_BATCH_SUBMITTER Optional. The batch submitter address to index transaction batches on L1. Used as a fallback address (when it cannot be read from the SystemConfig contract). Implemented in #11073.

Version: v6.10.0+
Default: (empty)
Applications: Indexer

INDEXER_OPTIMISM_L2_HOLOCENE_TIMESTAMP Holocene upgrade L2 block timestamp. If not defined, EIP-1559's denominator and multiplier are taken from EIP_1559_BASE_FEE_MAX_CHANGE_DENOMINATOR and EIP_1559_ELASTICITY_MULTIPLIER envs correspondingly. Implemented in #11355.

Version: v6.10.1+
Default: (empty)
Applications: Indexer

INDEXER_OPTIMISM_L2_HOLOCENE_BLOCKS_CHUNK_SIZE Max number of blocks in eth_getBlockByNumber batch request. Implemented in #11355.

Version: v6.10.1+
Default: 25
Applications: Indexer

INDEXER_OPTIMISM_L2_INTEROP_START_BLOCK Defines a start block number for indexing interop messages (usually 0). If not defined, the indexing is turned off. Implemented in #11903.

Version: v8.0.0+
Default: (empty)
Applications: Indexer

INDEXER_OPTIMISM_L2_INTEROP_BLOCKS_CHUNK_SIZE Adjusts blocks chunk size when indexing failed relay transactions. Implemented in #11903.

Version: v8.0.0+
Default: 4
Applications: Indexer

INDEXER_OPTIMISM_INTEROP_PRIVATE_KEY 32-byte private key in form of 0x... string. Required and used to secp256k1 sign data being sent to /api/v2/import/optimism/interop/ remote API endpoint. Implemented in #11903.

Version: v8.0.0+
Default: (empty)
Applications: API, Indexer

INDEXER_OPTIMISM_INTEROP_CONNECT_TIMEOUT Timeout in seconds for establishing HTTP connection to /api/v2/import/optimism/interop/ and /api/v2/optimism/interop/public-key remote API endpoints. Implemented in #11903.

Version: v8.0.0+
Default: 8
Applications: API, Indexer

INDEXER_OPTIMISM_INTEROP_RECV_TIMEOUT Timeout in seconds for receiving HTTP response from /api/v2/import/optimism/interop/ or /api/v2/optimism/interop/public-key API endpoint. Implemented in #11903.

Version: v8.0.0+
Default: 10
Applications: API, Indexer

INDEXER_OPTIMISM_INTEROP_EXPORT_EXPIRATION_DAYS Limits the number of incomplete messages being sent through API to remote instances. The source or relay transactions older than this number of days (starting from the latest block) won't be considered by the handler of incomplete messages. Implemented in #11903.

Version: v8.0.0+
Default: 10
Applications: Indexer

INDEXER_OPTIMISM_CHAINSCOUT_API_URL URL to Chainscout API to get instance info by chain ID. Must be omitted for local development. For production must be https://chains.blockscout.com/api/chains/. Implemented in #11903.

Version: v8.0.0+
Default: (empty)
Applications: API, Indexer

INDEXER_OPTIMISM_CHAINSCOUT_FALLBACK_MAP Defines chain_id -> instance_url map, for example: {"10": "https://optimism.blockscout.com/", "8453": "https://base.blockscout.com/"}. Supports extended format like {"123": {"api": "https://test.blockscout.com:4000/", "ui": "https://test.blockscout.com:3000/"}} (when backend and frontend have different URLs). Quotes usually are escaped when defining in config file, e.g.: INDEXER_OPTIMISM_CHAINSCOUT_FALLBACK_MAP="{\"420120000\":\"http://host.docker.internal:4100/\"}". Implemented in #11903.

Version: v8.0.0+
Default: (empty)
Applications: API, Indexer

zkSync Rollup Management

{% hint style="info" %} Supported together with setting CHAIN_TYPE=zksync {% endhint %}

Variable Description Parameters
INDEXER_ZKSYNC_BATCHES_ENABLED Enables Polygon zkEVM batches fetcher. Implemented in #9080.

Version: v6.3.0+
Default: false
Applications: Indexer

INDEXER_ZKSYNC_BATCHES_CHUNK_SIZE The number of RPC calls in one request when reading data from RPC. Implemented in #9080.

Version: v6.3.0+
Default: 50
Applications: Indexer

INDEXER_ZKSYNC_NEW_BATCHES_MAX_RANGE Maximum amount of batches requested if Blockscout does not have all batches synced. Implemented in #9080.

Version: v6.3.0+
Default: 50
Applications: Indexer

INDEXER_ZKSYNC_NEW_BATCHES_RECHECK_INTERVAL The latest batch rechecking interval, seconds. Implemented in #9080.

Version: v6.3.0+
Default: 60
Applications: Indexer

INDEXER_ZKSYNC_L1_RPC The RPC endpoint for L1 used to fetch status of batches. Implemented in #9080.

Version: v6.3.0+
Default: (empty)
Applications: Indexer

INDEXER_ZKSYNC_BATCHES_STATUS_RECHECK_INTERVAL The batches status rechecking interval, seconds. Implemented in #9080.

Version: v6.3.0+
Default: 50
Applications: Indexer

Arbitrum Management

{% hint style="info" %} Supported together with setting CHAIN_TYPE=arbitrum {% endhint %}

Variable Description Parameters
INDEXER_ARBITRUM_ARBSYS_CONTRACT The address of ArbSys contract on the rollup. Implemented in #9312.

Version: v6.7.0+
Default: 0x0000000000000000000000000000000000000064
Applications: Indexer

INDEXER_ARBITRUM_NODE_INTERFACE_CONTRACT The address of NodeInterface contract on the rollup. Implemented in #9312.

Version: v6.8.0+
Default: 0x00000000000000000000000000000000000000C8
Applications: Indexer

INDEXER_ARBITRUM_L1_RPC The RPC endpoint for L1 used to fetch transaction batches, block confirmations, and cross-chain messages. Implemented in #9312.

Version: v6.7.0+
Default: empty
Applications: Indexer

INDEXER_ARBITRUM_L1_RPC_CHUNK_SIZE The number of RPC calls in one request when reading data from RPC. Implemented in #9312.

Version: v6.7.0+
Default: 20
Applications: Indexer

INDEXER_ARBITRUM_L1_RPC_HISTORICAL_BLOCKS_RANGE The block range size for the eth_getLogs request. Implemented in #9312.

Version: v6.7.0+
Default: 1000
Applications: Indexer

INDEXER_ARBITRUM_L1_ROLLUP_CONTRACT The Arbitrum Rollup contract address on L1. Implemented in #9312.

Version: v6.7.0+
Default: empty
Applications: Indexer

INDEXER_ARBITRUM_L1_ROLLUP_INIT_BLOCK The block number where the Arbitrum rollup contract has been deployed. Implemented in #9312.

Version: v6.7.0+
Default: 1
Applications: Indexer

INDEXER_ARBITRUM_L1_COMMON_START_BLOCK The block number at which synchronization will commence. It will proceed in both directions: discovering new batches up to the chain head, and historical batches until INDEXER_ARBITRUM_L1_ROLLUP_INIT_BLOCK. If omitted, the synchronization starts from the latest block. Implemented in #9312.

Version: v6.7.0+
Default: latest block
Applications: Indexer

INDEXER_ARBITRUM_L1_FINALIZATION_THRESHOLD The number of blocks below the blockchain head that are considered not yet finalized in environments where the settlement layer is another rollup, or when the L1 node does not support safe block retrieval. Implemented in #10482.

Version: v6.8.0+
Default: 1000
Applications: Indexer

INDEXER_ARBITRUM_ROLLUP_CHUNK_SIZE The number of RPC calls in one request when reading data from RPC. Implemented in #9312.

Version: v6.7.0+
Default: 20
Applications: Indexer

INDEXER_ARBITRUM_BRIDGE_MESSAGES_TRACKING_ENABLED Enables monitoring on L1 of cross-chain messages directed to L2 and catchup on L2 of historical cross-chain messages. Implemented in #9312.

Version: v6.7.0+
Default: (empty)
Applications: Indexer

INDEXER_ARBITRUM_MISSED_MESSAGES_RECHECK_INTERVAL Interval to re-check on the rollup historical messages directed to and from the rollup, in seconds. Implemented in #9312.

Version: v6.7.0+
Default: 3600
Applications: Indexer

INDEXER_ARBITRUM_MISSED_MESSAGES_BLOCKS_DEPTH Amount of L2 blocks to revisit to identify historical cross-chain messages in the messages catchup task. Implemented in #10374.

Version: v6.8.0+
Default: 10000
Applications: Indexer

INDEXER_ARBITRUM_TRACKING_MESSAGES_ON_L1_RECHECK_INTERVAL Interval to re-check on L1 new messages directed to the rollup, in seconds. Implemented in #9312.

Version: v6.7.0+
Default: 20
Applications: Indexer

INDEXER_ARBITRUM_BATCHES_TRACKING_ENABLED Enables monitoring of transaction batches, block confirmations, and L2-to-L1 messages executions. Implemented in #9312.

Version: v6.7.0+
Default: (empty)
Applications: Indexer

INDEXER_ARBITRUM_BATCHES_TRACKING_RECHECK_INTERVAL Interval to re-check on L1 new and historical batches, confirmations, and executions, in seconds. Implemented in #9312.

Version: v6.7.0+
Default: 20
Applications: Indexer

INDEXER_ARBITRUM_BATCHES_TRACKING_L1_FINALIZATION_CHECK_ENABLED Whether L1 transactions related to batches, confirmations, and executions need to be monitored for finalization or not. Implemented in #9312.

Version: v6.7.0+
Default: false
Applications: Indexer

INDEXER_ARBITRUM_BATCHES_TRACKING_MESSAGES_TO_BLOCKS_SHIFT Difference between the message count and actual rollup block numbers in the SequencerBatchDelivered event on L1. Applicable for ArbitrumOne only. Implemented in #9312.

Version: v6.7.0+
Default: 0
Applications: Indexer

INDEXER_ARBITRUM_BATCHES_TRACKING_FAILURE_THRESHOLD The time threshold for transaction batch monitoring tasks. If a task has not run successfully within this threshold, it is marked as failed and enters a cooldown period before retrying. Implemented in #12192.

Version: v8.0.0+
Default: 10m
Applications: Indexer

INDEXER_ARBITRUM_MISSING_BATCHES_RANGE Size of each batch range which will be inspected for the missing batches. Since it is not expected that batches are missed often, it is OK to have this value relatively large. Implemented in #10466.

Version: v6.8.0+
Default: 10000
Applications: Indexer

INDEXER_ARBITRUM_CONFIRMATIONS_TRACKING_FINALIZED Whether to choose safe (true) or latest (false) block to discover new confirmations. This setting is required to reduce latency between the actual confirmation transaction and its discovery. Recommended to have true on rollups which use Ethereum Mainnet as L1. Determines how fast new confirmations will be discovered. Implemented in #9312.

Version: v6.7.0+
Default: true
Applications: Indexer

INDEXER_ARBITRUM_NEW_BATCHES_LIMIT The number of batches to be handled and imported at once. This is applicable for cases when dozens of batches are found in one discovery iteration, and it is necessary to import them in chunks to avoid the entire process being aborted if any errors occur. Implemented in #9312.

Version: v6.7.0+
Default: 10
Applications: Indexer

INDEXER_ARBITRUM_DATA_BACKFILL_ENABLED Enables a process to backfill the blocks and transaction with Arbitrum specific data. This should only be enabled for Arbitrum chains where blocks were indexed before upgrading to a version that includes Arbitrum-specific data indexing features. Implemented in #11163.

Version: v7.0.0+
Default: false
Applications: Indexer

INDEXER_ARBITRUM_DATA_BACKFILL_UNINDEXED_BLOCKS_RECHECK_INTERVAL The number of L2 blocks to look back in one iteration of the backfill process. Implemented in #11163.

Version: v7.0.0+
Default: 120s
Applications: Indexer

INDEXER_ARBITRUM_DATA_BACKFILL_BLOCKS_DEPTH Interval to retry the backfill task for unindexed blocks. Implemented in #11163.

Version: v7.0.0+
Default: 500
Applications: Indexer

MIGRATION_ARBITRUM_DA_RECORDS_NORMALIZATION_BATCH_SIZE Specifies the number of address records processed per batch during normalization of batch-to-blob associations by moving them from arbitrum_da_multi_purpose to a dedicated arbitrum_batches_to_da_blobs table. Implemented in #11798.

Version: v7.0.0+
Default: 500
Applications: Indexer

MIGRATION_ARBITRUM_DA_RECORDS_NORMALIZATION_CONCURRENCY Specifies the number of concurrent processes used during normalization of batch-to-blob associations by moving them from arbitrum_da_multi_purpose to a dedicated arbitrum_batches_to_da_blobs table. Implemented in #11798.

Version: v7.0.0+
Default: 1
Applications: Indexer

Celo Management

{% hint style="info" %} Supported together with setting CHAIN_TYPE=celo {% endhint %}

Variable Description Parameters
CELO_CORE_CONTRACTS JSON dictionary containing the addresses and metadata of core CELO network contracts. Read detailed description down below. Implemented in #9713.

Version: v6.8.0+
Default: (empty)
Applications: API, Indexer

CELO_L2_MIGRATION_BLOCK Specifies the block number at which Celo transitioned from L1 to L2, disabling legacy L1 mechanisms (e.g., L1 epochs, old precompiles) once the migration block is indexed. Implemented in #11949.

Version: v8.0.0+
Applications: API, Indexer

INDEXER_DISABLE_CELO_EPOCH_FETCHER If set to true, the epoch rewards fetcher will not be started. However, epoch blocks pending to fetch will still be imported into the database. Implemented in #9944.

Version: v6.8.0+
Default: false
Applications: Indexer

INDEXER_DISABLE_CELO_VALIDATOR_GROUP_VOTES_FETCHER If set to true, the validator group votes fetcher will not be started. Implemented in #10673.

Version: v6.9.0+
Default: false
Applications: Indexer

INDEXER_CELO_VALIDATOR_GROUP_VOTES_BATCH_SIZE Specifies the block range size for the eth_getLogs request, determining the number of blocks included between toBlock and fromBlock. Implemented in #9944.

Version: v6.8.0+
Default: 200000
Applications: Indexer

Details on `CELO_CORE_CONTRACTS`

The CELO network includes several core contracts that are central to its operation. These core contracts manage various aspects of the Celo network, including its stablecoins, governance, identity, and more.

All these contracts can be obtained by querying the Registry contract, which is deployed at the genesis block with the address 0x000000000000000000000000000000000000ce10. This contract serves as a repository for the addresses of all core contracts on the Celo network.

Fortunately, core contracts are not updated frequently, so we store information about core contracts statically under the CELO_CORE_CONTRACTS variable, which is a JSON object of a specified structure.

In case the contracts are updated, maintaining the Blockscout instance will require updating the CELO_CORE_CONTRACTS variable and manually setting blocks for refetch (all blocks produced after the core contracts' update).

The structure of the JSON value for the CELO_CORE_CONTRACTS variable is detailed in this gist.

The JSON structure may change. To assemble the CELO_CORE_CONTRACTS environment variable, run mix fetch_celo_core_contracts in the root of the Blockscout repository. This task will index the chain from block 0 to the latest block number, providing the most up-to-date values.

The JSON structure in the gist contains two main sections: addresses and events.

  • addresses: This section maps contract names to the list of respective addresses and the block number at which they were updated. For example:
    • "Accounts": [{ "address": "0xed7f51a34b4e71fbe69b3091fcf879cd14bd73a9", "updated_at_block_number": 574 }]
    • "Election": [{ "address": "0x1c3edf937cfc2f6f51784d20deb1af1f9a8655fa", "updated_at_block_number": 592 }]
  • events: This section maps contract addresses to the events associated with them, including any parameters and the block numbers at which these events were emitted. For example:
    • "EpochRewards": { "0xb10ee11244526b94879e1956745ba2e35ae2ba20": { "CarbonOffsettingFundSet": [{ "address": "0x22579ca45ee22e2e16ddf72d955d6cf4c767b0ef", "updated_at_block_number": 15049265 }] } }
    • "FeeHandler": { "0x90d94229623a0a38826a4a7557a6d79acde43f76": { "BurnFractionSet": [{ "updated_at_block_number": 19732579, "value": 0.7999999999999999 }] } }

Filecoin Management

{% hint style="info" %} Supported together with setting CHAIN_TYPE=filecoin {% endhint %}

Variable Description Parameters
FILECOIN_NETWORK_PREFIX Specifies the expected network prefix for Filecoin addresses. For more details, refer to the Filecoin Spec. Available values: f (for the mainnet), t (for testnets). Implemented in #10468.

Version: v6.9.0+
Default: f
Applications: API, Indexer

BERYX_API_TOKEN Beryx API token, used for retrieving Filecoin native addressing information. Implemented in #10468.

Required: ✅
Version: v6.9.0+
Default: (empty)
Applications: Indexer

BERYX_API_BASE_URL Beryx API base URL. Implemented in #10468.

Version: v6.9.0+
Default: https://api.zondax.ch/fil/data/v3/mainnet
Applications: Indexer

FILFOX_API_BASE_URL Filfox API base URL. Implemented in #11412.

Version: v7.0.0+
Default: https://filfox.info/api/v1
Applications: Indexer

INDEXER_DISABLE_FILECOIN_ADDRESS_INFO_FETCHER When set to true, Filecoin native addressing information will not be fetched, but addresses pending fetch will still be recorded in the database. Implemented in #10468.

Version: v6.9.0+
Default: false
Applications: Indexer

INDEXER_FILECOIN_ADDRESS_INFO_CONCURRENCY Sets the maximum number of concurrent requests made to fetch Filecoin native addressing information. Implemented in #10468.

Version: v6.9.0+
Default: 1
Applications: Indexer

MIGRATION_FILECOIN_PENDING_ADDRESS_OPERATIONS_BATCH_SIZE Specifies the number of address records processed per batch during the backfill of pending address fetch operations. Implemented in #11798.

Version: v7.0.0+
Default: 100
Applications: Indexer

MIGRATION_FILECOIN_PENDING_ADDRESS_OPERATIONS_CONCURRENCY Specifies the number of concurrent processes used during the backfill of pending address fetch operations. Implemented in #11798.

Version: v7.0.0+
Default: 1
Applications: Indexer

Blackfort Management

{% hint style="info" %} Supported together with setting CHAIN_TYPE=blackfort {% endhint %}

Variable Description Parameters
BLACKFORT_VALIDATOR_API_URL Variable to define the URL of the Blackfort Validator API. Implemented in #10744.

Version: v6.9.0+
Default: (empty)
Applications: API, Indexer