erigon-pulse/eth
오웬 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
..
calltracer Convert *vm.EVM to vm.VMInterface in Tracers (#6590) 2023-01-16 22:28:50 +00:00
ethconfig added --experimental.modular (#7925) 2023-07-24 18:04:36 +02:00
ethconsensusconfig Bor span testing (#7897) 2023-07-18 09:47:04 +01:00
ethutils reference hash, address, and chain config from lib (#6536) 2023-01-13 18:12:18 +00:00
filters reference hash, address, and chain config from lib (#6536) 2023-01-13 18:12:18 +00:00
gasprice moved cmd/rpcdaemon/commands -> turbo/jsonrpc (#7858) 2023-07-08 19:01:26 +02:00
integrity go 1.19 atomics (#7164) 2023-03-23 05:11:28 +00:00
protocols/eth e3: release chain maker changes (#7787) 2023-06-23 10:07:42 +07:00
stagedsync Protyped consensus separated engine api (untested) (#7942) 2023-07-29 00:22:38 +02:00
tracers fix: prevent index out of range during call trace (#7951) 2023-08-02 08:09:28 +07:00
api_backend.go reference hash, address, and chain config from lib (#6536) 2023-01-13 18:12:18 +00:00
api.go Embed rpcdaemon: prepared direct clients (#3492) 2022-02-12 19:47:19 +07:00
backend.go Most hive tests fixed in --experimental.modular (#7950) 2023-08-01 02:08:15 +02:00
bloombits.go remove database field from Ethereum object (#1750) 2021-04-19 14:56:44 +07:00
discovery.go rename (#1978) 2021-05-20 19:25:53 +01:00