streamingfast / substreams

Powerful Blockchain streaming data engine, based on StreamingFast Firehose technology.
Apache License 2.0
166 stars 46 forks source link

Add prometheus counter to count number of eth_call failures #545

Open matthewdarwin opened 1 month ago

matthewdarwin commented 1 month ago

Add a new prometheus counter to count every time eth_call fails. Example failure:

Error: rpc error: code = Internal desc = error during init_stores_and_backprocess: run_parallel_process failed: parallel processing run: scheduler run: segment starting at block 20860000 timed out 3 times, giving up. Last error: receiving stream resp: rpc error: code = DeadlineExceeded desc = execute modules: applying executor results "graph_out" on block 20860000 (cb24c704e29d459e84d0bf027e18cfb94b89ad446a2ccbda50bfe6741ee850d6): execute: maps wasm call: block 20860000: module "graph_out": general wasm execution failed: call: running wasm extension "rpc::eth_call": timeout while doing eth_call: [{"params":[{"to":"c5ba042bf8832999b17c9036e8212f49dce0501a","gas":50000000,"data":"MTzlZw=="},{}],"method":"eth_call","jsonrpc":"2.0","id":1},{"params":[{"to":"c5ba042bf8832999b17c9036e8212f49dce0501a","gas":50000000,"data":"Bv3eAw=="},{}],"method":"eth_call","jsonrpc":"2.0","id":2},{"params":[{"to":"c5ba042bf8832999b17c9036e8212f49dce0501a","gas":50000000,"data":"ldibQQ=="},{}],"method":"eth_call","jsonrpc":"2.0","id":3}], context deadline exceeded (recovered by wazero)
wasm stack trace:
        rpc.eth_call(i32,i32,i32)
        ._ZN24substreams_ethereum_core3rpc8eth_call17haa384aebc85373deE(i32,i32)
        ._ZN24substreams_ethereum_core3rpc8RpcBatch7execute17hfc0a1fcb8ab7adc1E(i32,i32)
        ._ZN5erc205utils6helper15get_erc20_token17hc2028d690ee74b3eE(i32,i32)
        .graph_out(i32,i32,i32), context deadline exceeded