Skip to content

firehose: fix optimism check in extended blocks check#6662

Open
YaroShkvorets wants to merge 1 commit into
graphprotocol:masterfrom
YaroShkvorets:yaro/fix-optimism-extended
Open

firehose: fix optimism check in extended blocks check#6662
YaroShkvorets wants to merge 1 commit into
graphprotocol:masterfrom
YaroShkvorets:yaro/fix-optimism-extended

Conversation

@YaroShkvorets

@YaroShkvorets YaroShkvorets commented Jun 30, 2026

Copy link
Copy Markdown
Contributor

Problem

provides_extended_blocks() matches on optimism-mainnet, while on Firehose endpoints by convention we are using optimism id from the Networks Registry. Same as in Graph Explorer and elsewhere in The Graph ecosystem.

❯ grpcurl optimism.firehose.pinax.network:443 sf.firehose.v2.EndpointInfo/Info
{
  "chainName": "optimism",
  "chainNameAliases": [
    "evm-10",
    "op-mainnet",
    "optimism-mainnet"
  ],
  "firstStreamableBlockId": "7ca38a1916c42007829c55e69d3e9a73265554b586a499015373241b8a3fa48b",
  "blockIdEncoding": "BLOCK_ID_ENCODING_HEX",
  "blockFeatures": [
    "hybrid",
    "extended@105235064"
  ]
}

❯ grpcurl -H "X-Api-Key: $SF_API_KEY" mainnet.optimism.streamingfast.io:443 sf.firehose.v2.EndpointInfo/Info
{
  "chainName": "optimism",
  "chainNameAliases": [
    "evm-10",
    "op-mainnet",
    "optimism-mainnet"
  ],
  "firstStreamableBlockId": "7ca38a1916c42007829c55e69d3e9a73265554b586a499015373241b8a3fa48b",
  "blockIdEncoding": "BLOCK_ID_ENCODING_HEX",
  "blockFeatures": [
    "hybrid",
    "extended@105235064"
  ]
}

This PR just changes the hardcoded value for Optimism but IMO the cleaner way would be to just check for starts_with("extended") without hardcoding Optimism and Arbitrum ONE chain names at all.

Can change to that if needed.

@YaroShkvorets YaroShkvorets marked this pull request as ready for review June 30, 2026 14:06
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

Successfully merging this pull request may close these issues.

1 participant