Skip to content

firehose: fix optimism check in extended blocks check#6662

Merged
lutter merged 1 commit into
graphprotocol:masterfrom
YaroShkvorets:yaro/fix-optimism-extended
Jul 2, 2026
Merged

firehose: fix optimism check in extended blocks check#6662
lutter merged 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
@lutter lutter force-pushed the yaro/fix-optimism-extended branch from 4532448 to 2e925ca Compare July 2, 2026 17:27
@lutter

lutter commented Jul 2, 2026

Copy link
Copy Markdown
Collaborator

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.

Either is fine by me; I'll merge this, feel free to open another PR if that's needed.

In the long run, I'd like to get rid of firehose support entirely, since it's barely used

@lutter lutter merged commit 2e925ca into graphprotocol:master Jul 2, 2026
6 checks passed
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.

2 participants