graphprotocol / graphprotocol/graph-node
[Feature Request] Substrate Frontier runtime upgrade Compatibility
Nessuno ha ancora preso questa issue.
- Lingua principale
- Rust
- Stelle
- 3.2k
- Fork
- 1.1k
- Merge medio
- 4g 1h
- PR unite (30g)
- 1
Descrizione
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
Guida per i contributori
Apri la guida per i contributori
Come iniziare
- Leggi tutta la issue e poi la guida ai contributi del progetto.
- Commenta sulla issue per dire che te ne occupi tu — evita che due persone facciano lo stesso lavoro.
- Fai un fork del repository e lavora su un branch.
- Apri una pull request che faccia riferimento al numero della issue.
Direzione di ricerca
Inizia dalla ricerca del blocco genesis indicata in chain/ethereum/src/ethereum_adapter.rs, quindi traccia il modo in cui la configurazione della chain arriva a ChainSection o agli store. Determina come debba essere rappresentato un gen_block configurabile e come debba essere passato all’adapter. Il lavoro è completo quando i runtime Frontier il cui EVM inizia dopo il blocco 0 possono indicizzare a partire dal blocco configurato senza generare l’errore di genesis mancante.
Scritto dal modello di indicizzazione a partire dal testo della issue.
Valutazione
- Stack tecnologico
- rust
- Ambito
- backend, blockchain
- Tipo di issue
- Funzionalità
- Difficoltà
- 4/5
- Tempo stimato
- 3-5 giorni
- Stato di attività
- Ferma
- Chiarezza
- Abbastanza chiara
- Idoneità per principianti
- 35/100