Skip to content
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

eth/tracers: support for golang tracers + add golang callTracer #23708

Merged
merged 31 commits into from
Nov 5, 2021
Merged
Changes from 1 commit
Commits
Show all changes
31 commits
Select commit Hold shift + click to select a range
af67e1d
eth/tracers: add basic native loader
s1na Oct 11, 2021
57c993b
eth/tracers: add GetResult to tracer interface
s1na Oct 11, 2021
c9c1dc9
eth/tracers: add native call tracer
s1na Oct 11, 2021
340c773
eth/tracers: fix call tracer json result
s1na Oct 12, 2021
bf165bb
eth/tracers: minor fix
s1na Oct 12, 2021
4ea0d15
eth/tracers: fix
s1na Oct 12, 2021
75c6aff
eth/tracers: fix benchTracer
s1na Oct 13, 2021
7b10534
eth/tracers: test native call tracer
s1na Oct 13, 2021
ca5427a
eth/tracers: fix
s1na Oct 13, 2021
d9371f3
eth/tracers: rm extra make
s1na Oct 13, 2021
aff90d3
eth/tracers: rm extra make
s1na Oct 13, 2021
a2b0d3d
eth/tracers: make callFrame private
s1na Oct 13, 2021
18c4c17
eth/tracers: clean-up and comments
s1na Oct 13, 2021
0946623
eth/tracers: add license
s1na Oct 26, 2021
5db19c5
eth/tracers: rework the model a bit
holiman Oct 26, 2021
360e3ba
eth/tracers: move tracecall tests to subpackage
holiman Oct 28, 2021
c55a903
cmd/geth: load native tracers
s1na Nov 2, 2021
a9c2051
eth/tracers: minor fix
s1na Nov 2, 2021
c242c82
eth/tracers: impl stop
s1na Nov 2, 2021
60f5734
eth/tracers: add native noop tracer
s1na Nov 2, 2021
89bac76
renamings
s1na Nov 3, 2021
91a7c09
eth/tracers: more renamings
s1na Nov 3, 2021
2a69a37
eth/tracers: make jstracer non-exported, avoid cast
holiman Nov 3, 2021
4e2de46
eth/tracers, core/vm: rename vm.Tracer to vm.EVMLogger for clarity
holiman Nov 3, 2021
de953f5
eth/tracers: minor comment fix
s1na Nov 4, 2021
2af565b
eth/tracers/testing: lint nitpicks
holiman Nov 4, 2021
a839259
Merge branch 'master' into drop-in-plugin
holiman Nov 4, 2021
01bb908
core,eth: cancel evm on nativecalltracer stop
s1na Nov 4, 2021
2de2d6c
Revert "core,eth: cancel evm on nativecalltracer stop"
s1na Nov 4, 2021
a9b91d7
eth/tracers: linter nits
holiman Nov 4, 2021
8a5d5f0
eth/tracers: fix output on err
s1na Nov 5, 2021
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
6 changes: 5 additions & 1 deletion eth/tracers/native/call.go
Original file line number Diff line number Diff line change
Expand Up @@ -77,10 +77,14 @@ func (t *callTracer) CaptureStart(env *vm.EVM, from common.Address, to common.Ad
}

func (t *callTracer) CaptureEnd(output []byte, gasUsed uint64, _ time.Duration, err error) {
t.callstack[0].Output = bytesToHex(output)
t.callstack[0].GasUsed = uintToHex(gasUsed)
if err != nil {
t.callstack[0].Error = err.Error()
if err.Error() == "execution reverted" && len(output) > 0 {
t.callstack[0].Output = bytesToHex(output)
}
} else {
t.callstack[0].Output = bytesToHex(output)
Comment on lines +83 to +87
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

LGTM. However, apparently this is not covered by the tests, think you can add a test that flags this?

Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Not required for this PR though

}
}

Expand Down