graphprotocol / graphprotocol/graph-node

Subgraph failing on eth_call reverts despite handling reverts in mappings

Aperta
#5,534 1 commento 0 reazioni 0 assegnatari Vedi su GitHub

Nessuno ha ancora preso questa issue.

bug
Lingua principale
Rust
Stelle
3.2k
Fork
1.1k
Merge medio
4g 1h
PR unite (30g)
1

Descrizione

Bug report

This subgraph failed with the error below.

Handler skipped due to execution failure, transaction: 0x99dc…deec, address: 0x5200…2584, signature: Transfer(indexed address,indexed address,indexed uint256), error: transaction 99dcc8e858854ac580ad6a88b5cdefe0ae8d9e9dbef4d07b7f96418c5f17deec: error while executing at wasm backtrace: 0: 0x32b9 - <unknown>!~lib/@graphprotocol/graph-ts/chain/ethereum/ethereum.CallResult<~lib/array/Array<~lib/@graphprotocol/graph-ts/chain/ethereum/ethereum.Value>>#get:value 1: 0x3e17 - <unknown>!src/mapping/handleTransfer: Mapping aborted at ~lib/@graphprotocol/graph-ts/chain/ethereum.ts, line 714, column 7, with message: accessed value of a reverted call, please check the `reverted` field before accessing the `value` field, handler: handleTransfer

Relevant log output

{
    "jsonrpc": "2.0",
    "error": {
        "code": -32015,
        "message": "VM execution error.",
        "data": "revert"
    },
    "id": 2
}
{
    "jsonrpc": "2.0",
    "error": {
        "code": -32015,
        "message": "VM execution error.",
        "data": "Reverted ERC721: invalid token ID"
    },
    "id": 44
}
IPFS hash

No response

Subgraph name or link to explorer

No response

Some information to help us out
  • Tick this box if this bug is caused by a regression found in the latest release.
  • Tick this box if this bug is specific to the hosted service.
  • I have searched the issue tracker to make sure this issue is not a duplicate.
OS information

None

Guida per i contributori

Apri la guida per i contributori

Come iniziare

  1. Leggi tutta la issue e poi la guida ai contributi del progetto.
  2. Commenta sulla issue per dire che te ne occupi tu — evita che due persone facciano lo stesso lavoro.
  3. Fai un fork del repository e lavora su un branch.
  4. Apri una pull request che faccia riferimento al numero della issue.

Direzione di ricerca

Inizia dalla riga 714 segnalata di ethereum.ts e segui come CallResult gestisce i risultati eth_call revertiti durante handleTransfer. Usa gli errori JSON-RPC e il backtrace WASM forniti per riprodurre il problema; il lavoro è completato quando i mappings che gestiscono i reverts non si interrompono più accedendo al valore di una chiamata revertita.

Scritto dal modello di indicizzazione a partire dal testo della issue.

Valutazione

Stack tecnologico
rust, wasm
Ambito
backend, blockchain
Tipo di issue
Bug
Difficoltà
4/5
Tempo stimato
3-5 giorni
Stato di attività
Ferma
Chiarezza
Da chiarire
Idoneità per principianti
25/100

Ricevi le nuove issue nella tua casella

Un breve riepilogo di issue GitHub adatte ai principianti.