Suppose I have a substreams-based subgraph that's consuming events from a substreams module that has initialBlock: 0.
In my subgraph manifest I'm setting startBlock: 1000000 for my substreams data source, so I want it to stream events starting from that block. But graph-node only looks at the substreams module initialBlock and starts streaming from block 0.
I don't see why it shouldn't just take startBlock from subgraph manifest or use max(substreams_initialBlock, subgraph_startBlock) instead.
Use case: substreams-based subgraphs that use general-purpose foundational modules to stream only events emitted by a smart contract. They always have initialBlock: 0 but for each subgraph we would want to use start block when our smart contract was deployed.
Relevant log output
No response
IPFS hash
No response
Subgraph name or link to explorer
No response
Some information to help us out
[ ] Tick this box if this bug is caused by a regression found in the latest release.
[ ] Tick this box if this bug is specific to the hosted service.
[X] I have searched the issue tracker to make sure this issue is not a duplicate.
Bug report
Suppose I have a substreams-based subgraph that's consuming events from a substreams module that has
initialBlock: 0
.In my subgraph manifest I'm setting
startBlock: 1000000
for my substreams data source, so I want it to stream events starting from that block. But graph-node only looks at the substreams moduleinitialBlock
and starts streaming from block 0.Relevant code: https://github.com/graphprotocol/graph-node/blob/e2e69250062f7cf5c8c38d1f6b4dcf9398140f72/chain/substreams/src/data_source.rs#L209-L211
I don't see why it shouldn't just take
startBlock
from subgraph manifest or usemax(substreams_initialBlock, subgraph_startBlock)
instead.Use case: substreams-based subgraphs that use general-purpose foundational modules to stream only events emitted by a smart contract. They always have
initialBlock: 0
but for each subgraph we would want to use start block when our smart contract was deployed.Relevant log output
No response
IPFS hash
No response
Subgraph name or link to explorer
No response
Some information to help us out
OS information
None