Skip to content

Commit

Permalink
eth/tracers/js: drop duktape engine (ethereum#24934)
Browse files Browse the repository at this point in the history
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.
  • Loading branch information
s1na authored and cp-wjhan committed Dec 2, 2022
1 parent 5633f3c commit 7f7613f
Show file tree
Hide file tree
Showing 6 changed files with 189 additions and 1,051 deletions.
4 changes: 0 additions & 4 deletions eth/tracers/internal/tracetest/calltrace_test.go
Original file line number Diff line number Diff line change
Expand Up @@ -134,10 +134,6 @@ func TestCallTracerNative(t *testing.T) {
testCallTracer("callTracer", "call_tracer", t)
}

func TestCallTracerLegacyDuktape(t *testing.T) {
testCallTracer("callTracerLegacyDuktape", "call_tracer_legacy", t)
}

func testCallTracer(tracerName string, dirPath string, t *testing.T) {
files, err := os.ReadDir(filepath.Join("testdata", dirPath))
if err != nil {
Expand Down
Loading

0 comments on commit 7f7613f

Please sign in to comment.