erigon-pulse/eth/tracers/native
오웬 3c62adcfe0
fix: prevent index out of range during call trace (#7951)
Previously the call tracer failed on this Ethereum transaction
[0xecfc724f75e39fa9e882ec44a4d0985e099b7a3ac9415466196128770def5bc2](https://etherscan.io/tx/0xecfc724f75e39fa9e882ec44a4d0985e099b7a3ac9415466196128770def5bc2)

Querying with this request
```shell
curl  http://localhost:8545  -X POST  -H "Content-Type: application/json"  --data '{"method":"debug_traceTransaction","params":["0xecfc724f75e39fa9e882ec44a4d0985e099b7a3ac9415466196128770def5bc2", {"tracer": "callTracer",  "tracerConfig": {"withLog": true}}],"id":1,"jsonrpc":"2.0"}
```

Resulted in this response
```json
{"jsonrpc":"2.0","id":1,"result":null,"error":{"code":-32000,"message":"method handler crashed"}}
```

With this error message in the console:
`RPC method debug_traceTransaction crashed: runtime error: index out of
range [-1]
[service.go:217 panic.go:884 panic.go:113 call.go:177 interpreter.go:234
interpreter.go:262 evm.go:55 evm.go:260 evm.go:303 instructions.go:800
interpreter.go:304 evm.go:55 evm.go:260 evm.go:283
state_transition.go:382 state_transition.go:186 tracing.go:206
tracing.go:263 value.go:584 value.go:368 service.go:222 handler.go:511
handler.go:444 handler.go:392 handler.go:223 handler.go:316
asm_arm64.s:1172]`
2023-08-02 08:09:28 +07:00
..
4byte.go Convert *vm.EVM to vm.VMInterface in Tracers (#6590) 2023-01-16 22:28:50 +00:00
call.go fix: prevent index out of range during call trace (#7951) 2023-08-02 08:09:28 +07:00
gen_account_json.go Move hexutil.Bytes to erigon-lib (#7305) 2023-04-13 11:19:02 +00:00
gen_callframe_json.go Move hexutil.Bytes to erigon-lib (#7305) 2023-04-13 11:19:02 +00:00
mux.go Convert *vm.EVM to vm.VMInterface in Tracers (#6590) 2023-01-16 22:28:50 +00:00
noop.go Convert *vm.EVM to vm.VMInterface in Tracers (#6590) 2023-01-16 22:28:50 +00:00
prestate.go Move hexutil.Bytes to erigon-lib (#7305) 2023-04-13 11:19:02 +00:00
tracer.go Native tracers step 9 - add native tracers (#6434) 2022-12-25 07:28:41 +00:00