graphprotocol / graphprotocol/graph-node

[Feature Request] Substrate Frontier runtime upgrade Compatibility

Offen
#2,919 2 Kommentare 0 Reaktionen 0 zugewiesene Personen Auf GitHub ansehen

Dieses Issue hat noch niemand übernommen.

chains/ethereum
Vorherrschende Sprache
Rust
Sterne
3.2k
Forks
1.1k
Ø Merge
4 T. 1 Std.
Gemergte PRs (30 T.)
1

Beschreibung

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

Beitragsleitfaden

Beitragsleitfaden öffnen

Erste Schritte

  1. Lies das ganze Issue und danach den Beitragsleitfaden des Projekts.
  2. Schreib ins Issue, dass du es übernimmst — das erspart doppelte Arbeit.
  3. Forke das Repository und arbeite in einem Branch.
  4. Öffne einen Pull Request, der die Issue-Nummer nennt.

Rechercherichtung

Beginne bei der referenzierten Suche nach dem Genesis-Block in chain/ethereum/src/ethereum_adapter.rs und verfolge anschließend, wie die Chain-Konfiguration ChainSection oder Stores erreicht. Bestimme, wie ein konfigurierbarer gen_block dargestellt und an den Adapter übergeben werden soll. Als erledigt gilt die Aufgabe, wenn Frontier-Runtimes, deren EVM nach Block 0 startet, ab dem konfigurierten Block indizieren können, ohne den Fehler wegen des fehlenden Genesis-Blocks zu erhalten.

Vom Indexierungsmodell aus dem Issue-Text verfasst.

Bewertung

Tech-Stack
rust
Bereich
backend, blockchain
Issue-Typ
Feature
Schwierigkeit
4/5
Geschätzter Aufwand
3-5 Tage
Aktivitätsstatus
Veraltet
Klarheit
Größtenteils klar
Anfängerfreundlichkeit
35/100

Neue Issues direkt in Ihr Postfach

Eine kurze Übersicht über anfängerfreundliche GitHub-Issues.