Skip to content

Commit ba47d80

Browse files
authored
eth/tracers/js: drop duktape engine (#24934)
#23773 added a JS tracer which uses Goja as its engine. In this PR I remove the previous tracer which used duktape as well as remove the dependencies. This PR also comes with 2 fixes in the Goja tracer and one small behavioural change: I had handled errors in the native Go functions by panicing. My oversight was that Goja only handles panics with a Goja.Value as argument. The difference is panic(goja.Value) allows JS to catch the exception whereas Interrupt(error) doesn't. There was a race in how I handled Stop. Because of 1. some of the methods that simply return nil on error (like memory.slice) now throw an exception.
1 parent af02e97 commit ba47d80

File tree

6 files changed

+189
-1051
lines changed

6 files changed

+189
-1051
lines changed

eth/tracers/internal/tracetest/calltrace_test.go

Lines changed: 0 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -134,10 +134,6 @@ func TestCallTracerNative(t *testing.T) {
134134
testCallTracer("callTracer", "call_tracer", t)
135135
}
136136

137-
func TestCallTracerLegacyDuktape(t *testing.T) {
138-
testCallTracer("callTracerLegacyDuktape", "call_tracer_legacy", t)
139-
}
140-
141137
func testCallTracer(tracerName string, dirPath string, t *testing.T) {
142138
files, err := os.ReadDir(filepath.Join("testdata", dirPath))
143139
if err != nil {

0 commit comments

Comments
 (0)