`Scanning blocks [0, 0]` with `GRAPH_ETHEREUM_GENESIS_BLOCK_NUMBE`R set to > 0 and dataSource without startBlock
还没有人认领这个 Issue。
评估
- 难度
- 3/5
- 预计耗时
- 1-2 天
- 新手友好度
- 45/100
- Issue 类型
- 缺陷
- 描述清晰度
- 基本清楚
- 活跃度
- 停滞
- 技术栈
- blockchain, docker, rust
- 领域
- backend, blockchain
调研方向
从 graph/src/blockchain/polling_block_stream.rs 的第 329-331 行附近开始,然后使用 docker-compose 设置,在将 GRAPH_ETHEREUM_GENESIS_BLOCK_NUMBER 设置为大于 0 的值并使用不带 startBlock 的 dataSource 的情况下重现。跟踪起始区块的选择方式,并验证扫描从配置的 genesis 区块开始,而不是从区块 0 开始。
由索引模型根据 Issue 内容生成。
描述
Do you want to request a feature or report a bug?
Bug
What is the current behavior?
Running the graph-node from the docker-compose file (v0.28.2) and have set the genesis block to 1 with GRAPH_ETHEREUM_GENESIS_BLOCK_NUMBER.
I'm deploying a subgraph without a start block and i get this log:
Nov 25 15:11:26.939 INFO Scanning blocks [0, 0], range_size: 1, sgd: 1, subgraph_id: QmeR431sHevtNDUq8LgHTJms9KHYEvzE5pA9kyYgWdkerr, component: BlockStream
Nov 25 15:11:26.939 DEBG Requesting logs for blocks [0, 0], contract 0x8a7fa94487d0d0460550e5f3f80a663c39ac8b10, 2 events, sgd: 1, subgraph_id: QmeR431sHevtNDUq8LgHTJms9KHYEvzE5pA9kyYgWdkerr, component: BlockStream
Nov 25 15:11:27.159 DEBG Block stream produced a non-fatal error, error: Failed to infer hash for block 0, sgd: 1, subgraph_id: QmeR431sHevtNDUq8LgHTJms9KHYEvzE5pA9kyYgWdkerr, component: SubgraphInstanceManager
I'm not sure if I'm looking at the right place, but here https://github.com/graphprotocol/graph-node/blob/master/graph/src/blockchain/polling_block_stream.rs#L329-L331 it states that it should start from the genesin block if (i assume) a start block is not set in the subgraph.yaml file, but on the next line the genesis block seem to be hardcoded to 0 and ignores the block set with GRAPH_ETHEREUM_GENESIS_BLOCK_NUMBER.
If the current behavior is a bug, please provide the steps to reproduce and if possible a minimal demo of the problem.
Set GRAPH_ETHEREUM_GENESIS_BLOCK_NUMBER to > 0 in the docker-compose file
Deploy a subgraph with a dataSource without a startBlock
What is the expected behavior?
It should start scanning from the genesis block set with GRAPH_ETHEREUM_GENESIS_BLOCK_NUMBER instead of always starting from block 0
- 主要语言
- Rust
- 星标
- 3.2k
- 派生
- 1.1k
- 平均合并
- 4 天 1 小时
- 30 天内合并 PR
- 1
贡献指南
从这里开始
- 先读完整个 Issue,再读项目的贡献指南。
- 在 Issue 下留言说明你要接手 —— 这能避免两个人做同样的事。
- Fork 仓库,在一个分支上完成修改。
- 提交 Pull Request,并在描述里引用这个 Issue 编号。
graphprotocol/graph-node 的其他 Issue
-
current: include emits an all-null bucket for dimensionless aggregations, nulling the whole response 未关闭
难度 2/5 1-3 小时 新手友好度 78/100
graphprotocol/graph-node#6719 ·
-
难度 2/5 1-3 小时 新手友好度 68/100
graphprotocol/graph-node#6673 ·
-
难度 2/5 1-3 小时 新手友好度 70/100
graphprotocol/graph-node#6650 · 1 条评论 ·
-
难度 4/5 3-5 天 新手友好度 48/100
graphprotocol/graph-node#6722 ·
-
难度 3/5 1-2 天 新手友好度 68/100
graphprotocol/graph-node#6721 ·
查看 graphprotocol/graph-node 的全部 Issue
相似的 Issue
-
risk:low runtime status:in-progress type:test
难度 1/5 1 小时以内 新手友好度 92/100
zeroclaw-labs/zeroclaw#11023 ·
-
good first issue refactor
难度 2/5 1-3 小时 新手友好度 72/100
-
难度 2/5 1-3 小时 新手友好度 86/100
kwakseongjae/auto-hwp#319 ·
-
area:cli bug filter-quality good first issue priority:medium
难度 2/5 1-3 小时 新手友好度 84/100
-
难度 1/5 1 小时以内 新手友好度 72/100
bevyengine/bevy#25861 ·