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

e2: fix regression in json encoding of stack values in traces due to chan… #11810

Merged
merged 1 commit into from
Aug 31, 2024
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
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
2 changes: 1 addition & 1 deletion eth/tracers/logger/json_stream.go
Original file line number Diff line number Diff line change
Expand Up @@ -139,7 +139,7 @@ func (l *JsonStreamLogger) CaptureState(pc uint64, op vm.OpCode, gas, cost uint6
if i > 0 {
l.stream.WriteMore()
}
l.stream.WriteString(stackValue.String())
l.stream.WriteString(stackValue.Hex())
}
l.stream.WriteArrayEnd()
}
Expand Down
6 changes: 3 additions & 3 deletions turbo/jsonrpc/trace_adhoc.go
Original file line number Diff line number Diff line change
Expand Up @@ -492,7 +492,7 @@ func (ot *OeTracer) CaptureState(pc uint64, op vm.OpCode, gas, cost uint64, scop
}
for i := showStack - 1; i >= 0; i-- {
if st.Len() > i {
ot.lastVmOp.Ex.Push = append(ot.lastVmOp.Ex.Push, st.Back(i).String())
ot.lastVmOp.Ex.Push = append(ot.lastVmOp.Ex.Push, st.Back(i).Hex())
}
}
// Set the "mem" of the last operation
Expand All @@ -512,7 +512,7 @@ func (ot *OeTracer) CaptureState(pc uint64, op vm.OpCode, gas, cost uint64, scop
if ot.lastOffStack != nil {
ot.lastOffStack.Ex.Used = int(gas)
if st.Len() > 0 {
ot.lastOffStack.Ex.Push = []string{st.Back(0).String()}
ot.lastOffStack.Ex.Push = []string{st.Back(0).Hex()}
} else {
ot.lastOffStack.Ex.Push = []string{}
}
Expand Down Expand Up @@ -584,7 +584,7 @@ func (ot *OeTracer) CaptureState(pc uint64, op vm.OpCode, gas, cost uint64, scop
ot.memLenStack = append(ot.memLenStack, 0)
case vm.SSTORE:
if st.Len() > 1 {
ot.lastVmOp.Ex.Store = &VmTraceStore{Key: st.Back(0).String(), Val: st.Back(1).String()}
ot.lastVmOp.Ex.Store = &VmTraceStore{Key: st.Back(0).Hex(), Val: st.Back(1).Hex()}
}
}
if ot.lastVmOp.Ex.Used < 0 {
Expand Down
Loading