graphprotocol / graphprotocol/graph-node

[Feature Request] Substrate Frontier runtime upgrade Compatibility

オープン
#2,919 コメント 2 件 リアクション 0 件 担当者 0 名 GitHub で見る

まだ誰も着手していません。

chains/ethereum
主要言語
Rust
スター
3.2k
フォーク
1.1k
平均マージ
4日 1時間
マージ済み PR(30日)
1

説明

Do you want to request a feature or report a bug?

Feature

What is the current behavior?

In a polkadot parachain where it uses Frontier for their WASM runtime, evm feature sometimes does not start from day 1(i.e. block 0). It might add EVM for testing its connection between relay chain or go through necessary tests before they add evm integration. Due to this, current graph node is not able to index evm since current code is set to index from block 0 here. I would like to suggest to get input from config to set genesis block of evm to index.

If the current behavior is a bug, please provide the steps to reproduce and if possible a minimal demo of the problem.

The error shows in shiden with "Ethereum node could not find genesis block" with the following log

Oct 13 16:30:16.455 DEBG Trying again after eth_getBlockByNumber(0, false) RPC call failed (attempt #1) with result Err(Ethereum node could not find genesis block), provider: shiden-rpc-0
Oct 13 16:30:16.811 DEBG Trying again after eth_getBlockByNumber(0, false) RPC call failed (attempt #2) with result Err(Ethereum node could not find genesis block), provider: shiden-rpc-0
Oct 13 16:30:17.177 DEBG Trying again after eth_getBlockByNumber(0, false) RPC call failed (attempt #3) with result Err(Ethereum node could not find genesis block), provider: shiden-rpc-0

What is the expected behavior?

I expect adding gen_block input in config and add that in ChainSection or stores so that genesis block argument can be used in ethereum_adapter.rs

コントリビューションガイド

コントリビューションガイドを開く

はじめの一歩

  1. issue を最後まで読み、次にプロジェクトのコントリビューションガイドを読みます。
  2. 着手することを issue にコメントします — 二人が同じ作業をするのを防げます。
  3. リポジトリをフォークし、ブランチを切って変更します。
  4. issue 番号を参照したプルリクエストを送ります。

調査の方向性

参照されている genesis-block lookup の箇所である chain/ethereum/src/ethereum_adapter.rs から始め、chain configuration が ChainSection または stores にどのように到達するかを追跡します。設定可能な gen_block をどのように表現し、adapter に渡すべきかを判断します。完了条件は、EVM が block 0 より後から開始する Frontier runtimes が、missing-genesis error を発生させずに設定された block からインデックスできることです。

索引モデルが issue の本文から書いたものです。

評価

技術スタック
rust
領域
backend, blockchain
issue の種類
機能追加
難易度
4/5
見積もり時間
3〜5日
活発さ
停滞
明瞭さ
おおむね明確
初心者へのやさしさ
35/100

新しい issue をメールで受け取る

初心者向けの GitHub issue を短くまとめたダイジェスト。