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

Return syncing status (latest block synced) in header of subgraph query responses #494

Open
fordN opened this issue Nov 18, 2024 · 1 comment
Labels

Comments

@fordN
Copy link

fordN commented Nov 18, 2024

Problem statement

Currently the Gateway uses query rewrites to keep track of block numbers on each chain.

Expectation proposal

Include header with latestSyncedBlockNumber and chainHeadBlock information: chainHeadBlocknumber, chainheadBlockHash, and chainHeadBlocktimestamp.

@gusinacio gusinacio added type:feature New or enhanced functionality repo:indexer-rs pgk:service labels Nov 18, 2024 — with Linear
@gusinacio gusinacio changed the title [Feat.Req] - Return syncing status (latest block synced) in header of subgraph query responses Return syncing status (latest block synced) in header of subgraph query responses Nov 18, 2024
@Theodus
Copy link
Member

Theodus commented Nov 20, 2024

The requirements can be limited to the block hash, number, and timestamp for the latest indexed block for the subgraph deployment being queried. It's unnecessary for any client to get block info for any block that cannot be queried yet.

Theodus added a commit to graphprotocol/graph-node that referenced this issue Nov 25, 2024
This adds a `graph-indexed` header to query responses. The header value contains the block hash, number, and timestamp for the most recently processed block in the subgraph. This avoids the need to rewrite all queries to include `_meta { block { hash number timestamp } }` in either the indexer-service or gateway.

Related: edgeandnode/gateway#900, graphprotocol/indexer-rs#494
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
Projects
None yet
Development

No branches or pull requests

3 participants