-
Notifications
You must be signed in to change notification settings - Fork 20.2k
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
debug_traceTransaction missing traces after upgrade to v1.10.9 or higher #23811
Comments
I'm looking into the issue but until it's found and fixed you can use |
Thanks for your help, but the The new eg: the tx 0xb2ea30bf6f263b3170d6da0e0dc1b9008eeb6f94115bb7f3cc72981dced89af4 of trace_address {
"action": {
"callType": "delegatecall",
"from": "0xa0b86991c6218b36c1d19d4a2e9eb0ce3606eb48",
"gas": "0x7a62d",
"input": "0x70a08231000000000000000000000000998497ffc64240d6a70c38e544521d09dcd23293",
"to": "0x0882477e7895bdc5cea7cb1552ed914ab157fe56",
"value": "0x0"
},
"blockHash": "0x3048db4430ef76712f1ff136a85ba4715e73fe375de1bc8414c905c5aa88829a",
"blockNumber": 10000220,
"result": {
"gasUsed": "0x5d1",
"output": "0x000000000000000000000000000000000000000000000000000000025f67045e"
},
"subtraces": 0,
"traceAddress": [
0,
3,
0
],
"transactionHash": "0xb2ea30bf6f263b3170d6da0e0dc1b9008eeb6f94115bb7f3cc72981dced89af4",
"transactionPosition": 68,
"type": "call"
}, But the result of Geth's as below(convert into flat format): |
Yeah |
So a bunch of these traces are calls to non-existent accounts, e.g.:
And because the value of the call is 0, no account is created and basically nothing is done so we should decide whether we want to include those in the trace. |
It's my pleasure to help locate the problem. Do you mean trace like that? curl 'http://127.0.0.1:9545/' \
-X POST \
-H 'Content-Type: application/json' \
-d '{"jsonrpc": "2.0", "method": "debug_traceTransaction", "params": ["0xb2ea30bf6f263b3170d6da0e0dc1b9008eeb6f94115bb7f3cc72981dced89af4"], "id": "1"}]
|
Thanks for the tips, I'll try to find more differ transaction hashes. |
@s1na I've found some more transaction hashes, and who's behavior is the same
Seems its related to the contract address 0x693c188e40f760ecf00d2946ef45260b84fbc43e |
Something that also could help, would be if you could run the That would make it easier to repro |
We do ping the opcode-tracer : https://github.com/ethereum/go-ethereum/blob/master/core/vm/evm.go#L184 EDIT: My bad, that code doesn't ping the opcode tracer, it just ping the start/end, but that's where we'd have to add a ping. --- a/core/vm/evm.go
+++ b/core/vm/evm.go
@@ -182,9 +182,14 @@ func (evm *EVM) Call(caller ContractRef, addr common.Address, input []byte, gas
if !evm.StateDB.Exist(addr) {
if !isPrecompile && evm.chainRules.IsEIP158 && value.Sign() == 0 {
// Calling a non existing account, don't do anything, but ping the tracer
- if evm.Config.Debug && evm.depth == 0 {
- evm.Config.Tracer.CaptureStart(evm, caller.Address(), addr, false, input, gas, value)
- evm.Config.Tracer.CaptureEnd(ret, 0, 0, nil)
+ if evm.Config.Debug {
+ if evm.depth == 0 {
+ evm.Config.Tracer.CaptureStart(evm, caller.Address(), addr, false, input, gas, value)
+ evm.Config.Tracer.CaptureEnd(ret, 0, 0, nil)
+ } else {
+ evm.Config.Tracer.CaptureEnter(CALL, caller.Address(), addr, input, gas, value)
+ evm.Config.Tracer.CaptureExit(nil, 0, nil)
+ }
}
return nil, gas, nil
}
|
@s1na Sorry for the late reply, I've run it again, and this issue was solved. |
System information
Geth version:
geth version
OS & Version: Windows/Linux/OSX
Commit hash : (if
develop
)Expected behaviour
The number of traces in v1.10.9+ should be equal or more to v1.10.8.
Actual behaviour
Some traces after
suicide
in v1.10.9+ are missing, so the number of traces is litter than v1.10.8Steps to reproduce the behaviour
debug_traceTransaction
to v1.10.8 and v1.10.9:The response of v1.10.8 as below(488 lines):
The response of v1.10.11 as below(427 lines):
I used a tool to convert the nested trace information into a Parity-like flat structure, and found that the previous trace of the missing trace was
suicide
, like below:Or
After some
git bisect
, seems the issue was introduced in #23087Backtrace
When submitting logs: please submit them as text and not screenshots.
The text was updated successfully, but these errors were encountered: