`Scanning blocks [0, 0]` with `GRAPH_ETHEREUM_GENESIS_BLOCK_NUMBE`R set to > 0 and dataSource without startBlock
まだ誰も着手していません。
評価
- 難易度
- 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 で再現します。開始ブロックがどのように選択されるかを追跡し、スキャンがブロック0ではなく設定された genesis ブロックから始まることを確認します。
索引モデルが 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時間
- マージ済み PR(30日)
- 1
コントリビューションガイド
はじめの一歩
- issue を最後まで読み、次にプロジェクトのコントリビューションガイドを読みます。
- 着手することを issue にコメントします — 二人が同じ作業をするのを防げます。
- リポジトリをフォークし、ブランチを切って変更します。
- 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時間 初心者へのやさしさ 84/100
EricSpencer00/Resilient#4835 · コメント 1 件 ·
-
agent:ready documentation
難易度 2/5 1〜3時間 初心者へのやさしさ 88/100
cesarferreira/stax#890 ·
-
bug
難易度 1/5 1時間未満 初心者へのやさしさ 90/100