From 00a42ee1c2333c47ee54fca6db7b58c9cf30a16d Mon Sep 17 00:00:00 2001 From: Sina Mahmoodi Date: Tue, 22 Jun 2021 09:57:21 +0200 Subject: [PATCH 01/47] core,eth: call frame tracing prototype --- core/vm/access_list_tracer.go | 5 ++ core/vm/evm.go | 48 +++++++++++++++++ core/vm/logger.go | 18 +++++++ core/vm/logger_json.go | 8 +++ eth/tracers/tracer.go | 97 +++++++++++++++++++++++++++++++++++ eth/tracers/tracer_test.go | 34 ++++++++++++ 6 files changed, 210 insertions(+) diff --git a/core/vm/access_list_tracer.go b/core/vm/access_list_tracer.go index cc5461d1c310..e6a39a69a64a 100644 --- a/core/vm/access_list_tracer.go +++ b/core/vm/access_list_tracer.go @@ -166,6 +166,11 @@ func (*AccessListTracer) CaptureFault(env *EVM, pc uint64, op OpCode, gas, cost func (*AccessListTracer) CaptureEnd(output []byte, gasUsed uint64, t time.Duration, err error) {} +func (*AccessListTracer) CaptureEnter(env *EVM, type_ CallFrameType, from common.Address, to common.Address, input []byte, gas uint64, value *big.Int) { +} + +func (*AccessListTracer) CaptureExit(env *EVM, output []byte, gasUsed uint64) {} + // AccessList returns the current accesslist maintained by the tracer. func (a *AccessListTracer) AccessList() types.AccessList { return a.list.accessList() diff --git a/core/vm/evm.go b/core/vm/evm.go index 8964766736fb..7942c858a2ea 100644 --- a/core/vm/evm.go +++ b/core/vm/evm.go @@ -31,6 +31,18 @@ import ( // deployed contract addresses (relevant after the account abstraction). var emptyCodeHash = crypto.Keccak256Hash(nil) +// Type of an executing call frame +type CallFrameType int + +const ( + CallType CallFrameType = iota + CallCodeType + DelegateCallType + StaticCallType + // Init code execution for both CREATE and CREATE2 + CreateType +) + type ( // CanTransferFunc is the signature of a transfer guard function CanTransferFunc func(StateDB, common.Address, *big.Int) bool @@ -198,6 +210,12 @@ func (evm *EVM) Call(caller ContractRef, addr common.Address, input []byte, gas defer func(startGas uint64, startTime time.Time) { // Lazy evaluation of the parameters evm.Config.Tracer.CaptureEnd(ret, startGas-gas, time.Since(startTime), err) }(gas, time.Now()) + } else if evm.Config.Debug && evm.depth > 0 { + // Handle tracer events for entering and exiting a call frame + evm.Config.Tracer.CaptureEnter(evm, CallType, caller.Address(), addr, input, gas, value) + defer func(startGas uint64) { + evm.Config.Tracer.CaptureExit(evm, ret, startGas-gas) + }(gas) } if isPrecompile { @@ -257,6 +275,14 @@ func (evm *EVM) CallCode(caller ContractRef, addr common.Address, input []byte, } var snapshot = evm.StateDB.Snapshot() + // Invoke tracer hooks that signal entering/exiting a call frame + if evm.Config.Debug { + evm.Config.Tracer.CaptureEnter(evm, CallCodeType, caller.Address(), addr, input, gas, value) + defer func(startGas uint64) { + evm.Config.Tracer.CaptureExit(evm, ret, startGas-gas) + }(gas) + } + // It is allowed to call precompiles, even via delegatecall if p, isPrecompile := evm.precompile(addr); isPrecompile { ret, gas, err = RunPrecompiledContract(p, input, gas) @@ -293,6 +319,14 @@ func (evm *EVM) DelegateCall(caller ContractRef, addr common.Address, input []by } var snapshot = evm.StateDB.Snapshot() + // Invoke tracer hooks that signal entering/exiting a call frame + if evm.Config.Debug { + evm.Config.Tracer.CaptureEnter(evm, DelegateCallType, caller.Address(), addr, input, gas, nil) + defer func(startGas uint64) { + evm.Config.Tracer.CaptureExit(evm, ret, startGas-gas) + }(gas) + } + // It is allowed to call precompiles, even via delegatecall if p, isPrecompile := evm.precompile(addr); isPrecompile { ret, gas, err = RunPrecompiledContract(p, input, gas) @@ -338,6 +372,14 @@ func (evm *EVM) StaticCall(caller ContractRef, addr common.Address, input []byte // future scenarios evm.StateDB.AddBalance(addr, big0) + // Invoke tracer hooks that signal entering/exiting a call frame + if evm.Config.Debug { + evm.Config.Tracer.CaptureEnter(evm, StaticCallType, caller.Address(), addr, input, gas, nil) + defer func(startGas uint64) { + evm.Config.Tracer.CaptureExit(evm, ret, startGas-gas) + }(gas) + } + if p, isPrecompile := evm.precompile(addr); isPrecompile { ret, gas, err = RunPrecompiledContract(p, input, gas) } else { @@ -417,7 +459,11 @@ func (evm *EVM) create(caller ContractRef, codeAndHash *codeAndHash, gas uint64, if evm.Config.Debug && evm.depth == 0 { evm.Config.Tracer.CaptureStart(evm, caller.Address(), address, true, codeAndHash.code, gas, value) + } else if evm.Config.Debug && evm.depth > 0 { + // TODO: Make sure we should capture init code's call frame for the tracer + evm.Config.Tracer.CaptureEnter(evm, CreateType, caller.Address(), address, codeAndHash.code, gas, value) } + start := time.Now() ret, err := evm.interpreter.Run(contract, nil, false) @@ -457,6 +503,8 @@ func (evm *EVM) create(caller ContractRef, codeAndHash *codeAndHash, gas uint64, if evm.Config.Debug && evm.depth == 0 { evm.Config.Tracer.CaptureEnd(ret, gas-contract.Gas, time.Since(start), err) + } else if evm.Config.Debug && evm.depth > 0 { + evm.Config.Tracer.CaptureExit(evm, ret, gas-contract.Gas) } return ret, address, contract.Gas, err } diff --git a/core/vm/logger.go b/core/vm/logger.go index 900a5e58543a..a034c4c84b69 100644 --- a/core/vm/logger.go +++ b/core/vm/logger.go @@ -106,6 +106,8 @@ func (s *StructLog) ErrorString() string { type Tracer interface { CaptureStart(env *EVM, from common.Address, to common.Address, create bool, input []byte, gas uint64, value *big.Int) CaptureState(env *EVM, pc uint64, op OpCode, gas, cost uint64, scope *ScopeContext, rData []byte, depth int, err error) + CaptureEnter(env *EVM, type_ CallFrameType, from common.Address, to common.Address, input []byte, gas uint64, value *big.Int) + CaptureExit(env *EVM, output []byte, gasUsed uint64) CaptureFault(env *EVM, pc uint64, op OpCode, gas, cost uint64, scope *ScopeContext, depth int, err error) CaptureEnd(output []byte, gasUsed uint64, t time.Duration, err error) } @@ -225,6 +227,14 @@ func (l *StructLogger) CaptureEnd(output []byte, gasUsed uint64, t time.Duration } } +func (l *StructLogger) CaptureEnter(env *EVM, type_ CallFrameType, from common.Address, to common.Address, input []byte, gas uint64, value *big.Int) { + // TODO +} + +func (l *StructLogger) CaptureExit(env *EVM, output []byte, gasUsed uint64) { + // TODO +} + // StructLogs returns the captured log entries. func (l *StructLogger) StructLogs() []StructLog { return l.logs } @@ -342,3 +352,11 @@ func (t *mdLogger) CaptureEnd(output []byte, gasUsed uint64, tm time.Duration, e fmt.Fprintf(t.out, "\nOutput: `0x%x`\nConsumed gas: `%d`\nError: `%v`\n", output, gasUsed, err) } + +func (t *mdLogger) CaptureEnter(env *EVM, type_ CallFrameType, from common.Address, to common.Address, input []byte, gas uint64, value *big.Int) { + // TODO +} + +func (t *mdLogger) CaptureExit(env *EVM, output []byte, gasUsed uint64) { + // TODO +} diff --git a/core/vm/logger_json.go b/core/vm/logger_json.go index 5210f479fe61..eea35632586b 100644 --- a/core/vm/logger_json.go +++ b/core/vm/logger_json.go @@ -87,3 +87,11 @@ func (l *JSONLogger) CaptureEnd(output []byte, gasUsed uint64, t time.Duration, } l.encoder.Encode(endLog{common.Bytes2Hex(output), math.HexOrDecimal64(gasUsed), t, errMsg}) } + +func (l *JSONLogger) CaptureEnter(env *EVM, type_ CallFrameType, from common.Address, to common.Address, input []byte, gas uint64, value *big.Int) { + // TODO +} + +func (l *JSONLogger) CaptureExit(env *EVM, output []byte, gasUsed uint64) { + // TODO +} diff --git a/eth/tracers/tracer.go b/eth/tracers/tracer.go index 2c52761f5e4d..3ca97bf83e25 100644 --- a/eth/tracers/tracer.go +++ b/eth/tracers/tracer.go @@ -312,6 +312,7 @@ type Tracer struct { reason error // Textual reason for the interruption activePrecompiles []common.Address // Updated on CaptureStart based on given rules + traceCallFrames bool // When true, will invoke enter() and exit() js funcs } // Context contains some contextual infos for a transaction execution that is not @@ -465,6 +466,18 @@ func New(code string, ctx *Context) (*Tracer, error) { } tracer.vm.Pop() + hasEnter := tracer.vm.GetPropString(tracer.tracerObject, "enter") + tracer.vm.Pop() + hasExit := tracer.vm.GetPropString(tracer.tracerObject, "exit") + tracer.vm.Pop() + if hasEnter != hasExit { + return nil, fmt.Errorf("trace object must expose either both or none of enter() and exit()") + } + // Maintain backwards-compatibility with old tracing scripts + if hasEnter { + tracer.traceCallFrames = true + } + // Tracer is valid, inject the big int library to access large numbers tracer.vm.EvalString(bigIntegerJS) tracer.vm.PutGlobalString("bigInt") @@ -649,6 +662,90 @@ func (jst *Tracer) CaptureEnd(output []byte, gasUsed uint64, t time.Duration, er } } +func (jst *Tracer) CaptureEnter(env *vm.EVM, type_ vm.CallFrameType, from common.Address, to common.Address, input []byte, gas uint64, value *big.Int) { + // TODO: Do we need env? + + if !jst.traceCallFrames { + return + } + if jst.err != nil { + return + } + // If tracing was interrupted, set the error and stop + if atomic.LoadUint32(&jst.interrupt) > 0 { + jst.err = jst.reason + return + } + + frame := make(map[string]interface{}) + //frame["type"] = type_ + frame["from"] = from + frame["to"] = to + frame["input"] = input + frame["gas"] = gas + frame["value"] = value + // Transform the context into a JavaScript object and inject into the state + obj := jst.vm.PushObject() + + for key, val := range frame { + switch val := val.(type) { + case uint64: + jst.vm.PushUint(uint(val)) + + case string: + jst.vm.PushString(val) + + case []byte: + ptr := jst.vm.PushFixedBuffer(len(val)) + copy(makeSlice(ptr, uint(len(val))), val) + + case common.Address: + ptr := jst.vm.PushFixedBuffer(20) + copy(makeSlice(ptr, 20), val[:]) + + case *big.Int: + pushBigInt(val, jst.vm) + + default: + panic(fmt.Sprintf("unsupported type: %T", val)) + } + jst.vm.PutPropString(obj, key) + } + jst.vm.PutPropString(jst.stateObject, "frame") + + if _, err := jst.call(true, "enter", "frame"); err != nil { + jst.err = wrapError("enter", err) + } +} + +func (jst *Tracer) CaptureExit(env *vm.EVM, output []byte, gasUsed uint64) { + if !jst.traceCallFrames { + return + } + if jst.err != nil { + return + } + // If tracing was interrupted, set the error and stop + if atomic.LoadUint32(&jst.interrupt) > 0 { + jst.err = jst.reason + return + } + + obj := jst.vm.PushObject() + + ptr := jst.vm.PushFixedBuffer(len(output)) + copy(makeSlice(ptr, uint(len(output))), output) + jst.vm.PutPropString(obj, "output") + + jst.vm.PushUint(uint(gasUsed)) + jst.vm.PutPropString(obj, "gasUsed") + + jst.vm.PutPropString(jst.stateObject, "frameResult") + if _, err := jst.call(true, "exit", "frameResult"); err != nil { + jst.err = wrapError("exit", err) + } +} + // GetResult calls the Javascript 'result' function and returns its value, or any accumulated error func (jst *Tracer) GetResult() (json.RawMessage, error) { // Transform the context into a JavaScript object and inject into the state diff --git a/eth/tracers/tracer_test.go b/eth/tracers/tracer_test.go index d2d3e57c4a57..53866011f384 100644 --- a/eth/tracers/tracer_test.go +++ b/eth/tracers/tracer_test.go @@ -236,3 +236,37 @@ func TestIsPrecompile(t *testing.T) { t.Errorf("Tracer should consider blake2f as precompile in istanbul") } } + +func TestEnterExit(t *testing.T) { + vmctx := testCtx() + // test that either both or none of enter() and exit() are defined + if _, err := New("{step: function() {}, fault: function() {}, result: function() { return null; }, enter: function() {}}", new(Context)); err == nil { + t.Fatal("tracer creation should've failed without exit() definition") + } + if _, err := New("{step: function() {}, fault: function() {}, result: function() { return null; }, enter: function() {}, exit: function() {}}", new(Context)); err != nil { + t.Fatal(err) + } + + // test that the enter and exit method are correctly invoked and the values passed + tracer, err := New("{enters: 0, exits: 0, enterGas: 0, gasUsed: 0, step: function() {}, fault: function() {}, result: function() { return {enters: this.enters, exits: this.exits, enterGas: this.enterGas, gasUsed: this.gasUsed} }, enter: function(frame) { this.enters++; this.enterGas = frame.gas; }, exit: function(res) { this.exits++; this.gasUsed = res.gasUsed; }}", new(Context)) + if err != nil { + t.Fatal(err) + } + + env := vm.NewEVM(vmctx.blockCtx, vmctx.txCtx, &dummyStatedb{}, params.TestChainConfig, vm.Config{Debug: true, Tracer: tracer}) + scope := &vm.ScopeContext{ + Contract: vm.NewContract(&account{}, &account{}, big.NewInt(0), 0), + } + + tracer.CaptureEnter(env, vm.CallType, scope.Contract.Caller(), scope.Contract.Address(), []byte{}, 1000, new(big.Int)) + tracer.CaptureExit(env, []byte{}, 400) + + have, err := tracer.GetResult() + if err != nil { + t.Fatal(err) + } + want := `{"enters":1,"exits":1,"enterGas":1000,"gasUsed":400}` + if string(have) != want { + t.Errorf("Number of invocations of enter() and exit() is wrong. Have %s, want %s\n", have, want) + } +} From d7463393ad3fe2d6dcb7cccd14911915b906eb3c Mon Sep 17 00:00:00 2001 From: Sina Mahmoodi Date: Wed, 23 Jun 2021 12:23:34 +0200 Subject: [PATCH 02/47] core/vm: add create2 frame type --- core/vm/evm.go | 11 ++++++----- 1 file changed, 6 insertions(+), 5 deletions(-) diff --git a/core/vm/evm.go b/core/vm/evm.go index 7942c858a2ea..c25c4641bedb 100644 --- a/core/vm/evm.go +++ b/core/vm/evm.go @@ -39,8 +39,9 @@ const ( CallCodeType DelegateCallType StaticCallType - // Init code execution for both CREATE and CREATE2 + // Init code execution CreateType + Create2Type ) type ( @@ -419,7 +420,7 @@ func (c *codeAndHash) Hash() common.Hash { } // create creates a new contract using code as deployment code. -func (evm *EVM) create(caller ContractRef, codeAndHash *codeAndHash, gas uint64, value *big.Int, address common.Address) ([]byte, common.Address, uint64, error) { +func (evm *EVM) create(caller ContractRef, codeAndHash *codeAndHash, gas uint64, value *big.Int, address common.Address, type_ CallFrameType) ([]byte, common.Address, uint64, error) { // Depth check execution. Fail if we're trying to execute above the // limit. if evm.depth > int(params.CallCreateDepth) { @@ -461,7 +462,7 @@ func (evm *EVM) create(caller ContractRef, codeAndHash *codeAndHash, gas uint64, evm.Config.Tracer.CaptureStart(evm, caller.Address(), address, true, codeAndHash.code, gas, value) } else if evm.Config.Debug && evm.depth > 0 { // TODO: Make sure we should capture init code's call frame for the tracer - evm.Config.Tracer.CaptureEnter(evm, CreateType, caller.Address(), address, codeAndHash.code, gas, value) + evm.Config.Tracer.CaptureEnter(evm, type_, caller.Address(), address, codeAndHash.code, gas, value) } start := time.Now() @@ -512,7 +513,7 @@ func (evm *EVM) create(caller ContractRef, codeAndHash *codeAndHash, gas uint64, // Create creates a new contract using code as deployment code. func (evm *EVM) Create(caller ContractRef, code []byte, gas uint64, value *big.Int) (ret []byte, contractAddr common.Address, leftOverGas uint64, err error) { contractAddr = crypto.CreateAddress(caller.Address(), evm.StateDB.GetNonce(caller.Address())) - return evm.create(caller, &codeAndHash{code: code}, gas, value, contractAddr) + return evm.create(caller, &codeAndHash{code: code}, gas, value, contractAddr, CreateType) } // Create2 creates a new contract using code as deployment code. @@ -522,7 +523,7 @@ func (evm *EVM) Create(caller ContractRef, code []byte, gas uint64, value *big.I func (evm *EVM) Create2(caller ContractRef, code []byte, gas uint64, endowment *big.Int, salt *uint256.Int) (ret []byte, contractAddr common.Address, leftOverGas uint64, err error) { codeAndHash := &codeAndHash{code: code} contractAddr = crypto.CreateAddress2(caller.Address(), salt.Bytes32(), codeAndHash.Hash().Bytes()) - return evm.create(caller, codeAndHash, gas, endowment, contractAddr) + return evm.create(caller, codeAndHash, gas, endowment, contractAddr, Create2Type) } // ChainConfig returns the environment's chain configuration From 5a253beb677416f3dabcd72aa339295d85b1d6d2 Mon Sep 17 00:00:00 2001 From: Sina Mahmoodi Date: Tue, 6 Jul 2021 16:40:56 +0200 Subject: [PATCH 03/47] eth/tracers: use helper fn for pushing fields to js object --- eth/tracers/tracer.go | 90 +++++++++++++++++++++++-------------------- 1 file changed, 49 insertions(+), 41 deletions(-) diff --git a/eth/tracers/tracer.go b/eth/tracers/tracer.go index 3ca97bf83e25..619cae352eb1 100644 --- a/eth/tracers/tracer.go +++ b/eth/tracers/tracer.go @@ -677,40 +677,14 @@ func (jst *Tracer) CaptureEnter(env *vm.EVM, type_ vm.CallFrameType, from common return } - frame := make(map[string]interface{}) - //frame["type"] = type_ - frame["from"] = from - frame["to"] = to - frame["input"] = input - frame["gas"] = gas - frame["value"] = value - // Transform the context into a JavaScript object and inject into the state + // Transform the frame into a JavaScript object and inject into the state obj := jst.vm.PushObject() - - for key, val := range frame { - switch val := val.(type) { - case uint64: - jst.vm.PushUint(uint(val)) - - case string: - jst.vm.PushString(val) - - case []byte: - ptr := jst.vm.PushFixedBuffer(len(val)) - copy(makeSlice(ptr, uint(len(val))), val) - - case common.Address: - ptr := jst.vm.PushFixedBuffer(20) - copy(makeSlice(ptr, 20), val[:]) - - case *big.Int: - pushBigInt(val, jst.vm) - - default: - panic(fmt.Sprintf("unsupported type: %T", val)) - } - jst.vm.PutPropString(obj, key) - } + jst.addToObj(obj, "type", callFrameType(type_)) + jst.addToObj(obj, "from", from) + jst.addToObj(obj, "to", to) + jst.addToObj(obj, "input", input) + jst.addToObj(obj, "gas", gas) + jst.addToObj(obj, "value", value) jst.vm.PutPropString(jst.stateObject, "frame") if _, err := jst.call(true, "enter", "frame"); err != nil { @@ -732,14 +706,8 @@ func (jst *Tracer) CaptureExit(env *vm.EVM, output []byte, gasUsed uint64) { } obj := jst.vm.PushObject() - - ptr := jst.vm.PushFixedBuffer(len(output)) - copy(makeSlice(ptr, uint(len(output))), output) - jst.vm.PutPropString(obj, "output") - - jst.vm.PushUint(uint(gasUsed)) - jst.vm.PutPropString(obj, "gasUsed") - + jst.addToObj(obj, "output", output) + jst.addToObj(obj, "gasUsed", gasUsed) jst.vm.PutPropString(jst.stateObject, "frameResult") if _, err := jst.call(true, "exit", "frameResult"); err != nil { jst.err = wrapError("exit", err) @@ -795,3 +763,43 @@ func (jst *Tracer) GetResult() (json.RawMessage, error) { return result, jst.err } + +// addToObj pushes a field to a JS object. +func (jst *Tracer) addToObj(obj int, key string, val interface{}) { + switch val := val.(type) { + case uint64: + jst.vm.PushUint(uint(val)) + case string: + jst.vm.PushString(val) + case []byte: + ptr := jst.vm.PushFixedBuffer(len(val)) + copy(makeSlice(ptr, uint(len(val))), val) + case common.Address: + ptr := jst.vm.PushFixedBuffer(20) + copy(makeSlice(ptr, 20), val[:]) + case *big.Int: + pushBigInt(val, jst.vm) + default: + panic(fmt.Sprintf("unsupported type: %T", val)) + } + jst.vm.PutPropString(obj, key) +} + +func callFrameType(type_ vm.CallFrameType) string { + switch type_ { + case vm.CallType: + return "call" + case vm.CallCodeType: + return "callcode" + case vm.DelegateCallType: + return "delegatecall" + case vm.StaticCallType: + return "staticcall" + case vm.CreateType: + return "create" + case vm.Create2Type: + return "create2" + default: + panic(fmt.Sprintf("unsupported call frame type: %T", type_)) + } +} From b5b17433c1aa64810aee8ab814edc913c2e29d6d Mon Sep 17 00:00:00 2001 From: Sina Mahmoodi Date: Tue, 6 Jul 2021 16:41:52 +0200 Subject: [PATCH 04/47] eth/tracers: use addToObj in GetResult --- eth/tracers/tracer.go | 35 ++++++----------------------------- 1 file changed, 6 insertions(+), 29 deletions(-) diff --git a/eth/tracers/tracer.go b/eth/tracers/tracer.go index 619cae352eb1..d1b3d9073af5 100644 --- a/eth/tracers/tracer.go +++ b/eth/tracers/tracer.go @@ -720,35 +720,7 @@ func (jst *Tracer) GetResult() (json.RawMessage, error) { obj := jst.vm.PushObject() for key, val := range jst.ctx { - switch val := val.(type) { - case uint64: - jst.vm.PushUint(uint(val)) - - case string: - jst.vm.PushString(val) - - case []byte: - ptr := jst.vm.PushFixedBuffer(len(val)) - copy(makeSlice(ptr, uint(len(val))), val) - - case common.Address: - ptr := jst.vm.PushFixedBuffer(20) - copy(makeSlice(ptr, 20), val[:]) - - case *big.Int: - pushBigInt(val, jst.vm) - - case int: - jst.vm.PushInt(val) - - case common.Hash: - ptr := jst.vm.PushFixedBuffer(32) - copy(makeSlice(ptr, 32), val[:]) - - default: - panic(fmt.Sprintf("unsupported type: %T", val)) - } - jst.vm.PutPropString(obj, key) + jst.addToObj(obj, key, val) } jst.vm.PutPropString(jst.stateObject, "ctx") @@ -779,6 +751,11 @@ func (jst *Tracer) addToObj(obj int, key string, val interface{}) { copy(makeSlice(ptr, 20), val[:]) case *big.Int: pushBigInt(val, jst.vm) + case int: + jst.vm.PushInt(val) + case common.Hash: + ptr := jst.vm.PushFixedBuffer(32) + copy(makeSlice(ptr, 32), val[:]) default: panic(fmt.Sprintf("unsupported type: %T", val)) } From 24932b98c9b32729e8765de624aded0c709268b5 Mon Sep 17 00:00:00 2001 From: Sina Mahmoodi Date: Thu, 8 Jul 2021 11:54:58 +0200 Subject: [PATCH 05/47] core/vm: capture frames in struct and json logger --- core/vm/evm.go | 20 ++++++++++++++++++++ core/vm/logger.go | 28 ++++++++++++++++++++++++++-- core/vm/logger_json.go | 16 ++++++++++++++-- 3 files changed, 60 insertions(+), 4 deletions(-) diff --git a/core/vm/evm.go b/core/vm/evm.go index c25c4641bedb..570504d8ecb2 100644 --- a/core/vm/evm.go +++ b/core/vm/evm.go @@ -17,6 +17,7 @@ package vm import ( + "fmt" "math/big" "sync/atomic" "time" @@ -44,6 +45,25 @@ const ( Create2Type ) +func (t CallFrameType) String() string { + switch t { + case CallType: + return "call" + case CallCodeType: + return "callcode" + case DelegateCallType: + return "delegatecall" + case StaticCallType: + return "staticcall" + case CreateType: + return "create" + case Create2Type: + return "create2" + default: + panic(fmt.Sprintf("unsupported call frame type: %T", t)) + } +} + type ( // CanTransferFunc is the signature of a transfer guard function CanTransferFunc func(StateDB, common.Address, *big.Int) bool diff --git a/core/vm/logger.go b/core/vm/logger.go index a034c4c84b69..d9af77a6355c 100644 --- a/core/vm/logger.go +++ b/core/vm/logger.go @@ -98,6 +98,18 @@ func (s *StructLog) ErrorString() string { return "" } +// StructFrame is emitted to the EVM upon stepping into a new call frame. +type StructFrame struct { + Type_ string `json:"type"` + From common.Address `json:"from"` + To common.Address `json:"to"` + Input []byte `json:"input"` + Gas uint64 `json:"gas"` + Value *big.Int `json:"value"` + GasUsed uint64 `json:"gasUsed"` + Output []byte `json:"output"` +} + // Tracer is used to collect execution traces from an EVM transaction // execution. CaptureState is called for each step of the VM with the // current VM state. @@ -122,6 +134,7 @@ type StructLogger struct { storage map[common.Address]Storage logs []StructLog + frames []StructFrame output []byte err error } @@ -228,16 +241,27 @@ func (l *StructLogger) CaptureEnd(output []byte, gasUsed uint64, t time.Duration } func (l *StructLogger) CaptureEnter(env *EVM, type_ CallFrameType, from common.Address, to common.Address, input []byte, gas uint64, value *big.Int) { - // TODO + in := make([]byte, len(input)) + copy(in, input) + // TODO: should we honor `l.Cfg.Limit` for frames too? + frame := StructFrame{type_.String(), from, to, in, gas, new(big.Int).Set(value), 0, nil} + l.frames = append(l.frames, frame) } func (l *StructLogger) CaptureExit(env *EVM, output []byte, gasUsed uint64) { - // TODO + frame := l.frames[len(l.frames)-1] + frame.GasUsed = gasUsed + out := make([]byte, len(output)) + copy(out, output) + frame.Output = out } // StructLogs returns the captured log entries. func (l *StructLogger) StructLogs() []StructLog { return l.logs } +// StructFrames returns the captured call frames. +func (l *StructLogger) StructFrames() []StructFrame { return l.frames } + // Error returns the VM error captured by the trace. func (l *StructLogger) Error() error { return l.err } diff --git a/core/vm/logger_json.go b/core/vm/logger_json.go index eea35632586b..6d5fdb1c72ef 100644 --- a/core/vm/logger_json.go +++ b/core/vm/logger_json.go @@ -89,9 +89,21 @@ func (l *JSONLogger) CaptureEnd(output []byte, gasUsed uint64, t time.Duration, } func (l *JSONLogger) CaptureEnter(env *EVM, type_ CallFrameType, from common.Address, to common.Address, input []byte, gas uint64, value *big.Int) { - // TODO + frame := StructFrame{ + Type_: type_.String(), + From: from, + To: to, + Input: input, + Gas: gas, + Value: value, + } + l.encoder.Encode(frame) } func (l *JSONLogger) CaptureExit(env *EVM, output []byte, gasUsed uint64) { - // TODO + type exitLog struct { + Output string `json:"output"` + GasUsed math.HexOrDecimal64 `json:"gasUsed"` + } + l.encoder.Encode(exitLog{common.Bytes2Hex(output), math.HexOrDecimal64(gasUsed)}) } From 92c0af96810c61b05eedde4ad640978d128224d2 Mon Sep 17 00:00:00 2001 From: Sina Mahmoodi Date: Thu, 8 Jul 2021 15:20:22 +0200 Subject: [PATCH 06/47] eth/tracers: use String method of callFrameType --- eth/tracers/tracer.go | 21 +-------------------- 1 file changed, 1 insertion(+), 20 deletions(-) diff --git a/eth/tracers/tracer.go b/eth/tracers/tracer.go index d1b3d9073af5..fae622706d96 100644 --- a/eth/tracers/tracer.go +++ b/eth/tracers/tracer.go @@ -679,7 +679,7 @@ func (jst *Tracer) CaptureEnter(env *vm.EVM, type_ vm.CallFrameType, from common // Transform the frame into a JavaScript object and inject into the state obj := jst.vm.PushObject() - jst.addToObj(obj, "type", callFrameType(type_)) + jst.addToObj(obj, "type", type_.String()) jst.addToObj(obj, "from", from) jst.addToObj(obj, "to", to) jst.addToObj(obj, "input", input) @@ -761,22 +761,3 @@ func (jst *Tracer) addToObj(obj int, key string, val interface{}) { } jst.vm.PutPropString(obj, key) } - -func callFrameType(type_ vm.CallFrameType) string { - switch type_ { - case vm.CallType: - return "call" - case vm.CallCodeType: - return "callcode" - case vm.DelegateCallType: - return "delegatecall" - case vm.StaticCallType: - return "staticcall" - case vm.CreateType: - return "create" - case vm.Create2Type: - return "create2" - default: - panic(fmt.Sprintf("unsupported call frame type: %T", type_)) - } -} From 22d4520e418e150a4d642000f486d8225c055e27 Mon Sep 17 00:00:00 2001 From: Sina Mahmoodi Date: Thu, 8 Jul 2021 16:27:37 +0200 Subject: [PATCH 07/47] core/vm: fix frame marshaling in json logger --- core/vm/logger_json.go | 24 ++++++++++++++++++------ 1 file changed, 18 insertions(+), 6 deletions(-) diff --git a/core/vm/logger_json.go b/core/vm/logger_json.go index 6d5fdb1c72ef..69215fd427d5 100644 --- a/core/vm/logger_json.go +++ b/core/vm/logger_json.go @@ -23,6 +23,7 @@ import ( "time" "github.com/ethereum/go-ethereum/common" + "github.com/ethereum/go-ethereum/common/hexutil" "github.com/ethereum/go-ethereum/common/math" ) @@ -89,21 +90,32 @@ func (l *JSONLogger) CaptureEnd(output []byte, gasUsed uint64, t time.Duration, } func (l *JSONLogger) CaptureEnter(env *EVM, type_ CallFrameType, from common.Address, to common.Address, input []byte, gas uint64, value *big.Int) { - frame := StructFrame{ - Type_: type_.String(), + type structFrameMarshalling struct { + Type string `json:"type"` + From common.Address `json:"from"` + To common.Address `json:"to"` + Input hexutil.Bytes `json:"input"` + Gas math.HexOrDecimal64 `json:"gas"` + Value *math.HexOrDecimal256 `json:"value"` + GasUsed math.HexOrDecimal64 `json:"gasUsed"` + Output hexutil.Bytes `json:"output"` + } + + frame := structFrameMarshalling{ + Type: type_.String(), From: from, To: to, Input: input, - Gas: gas, - Value: value, + Gas: math.HexOrDecimal64(gas), + Value: (*math.HexOrDecimal256)(value), } l.encoder.Encode(frame) } func (l *JSONLogger) CaptureExit(env *EVM, output []byte, gasUsed uint64) { type exitLog struct { - Output string `json:"output"` + Output hexutil.Bytes `json:"output"` GasUsed math.HexOrDecimal64 `json:"gasUsed"` } - l.encoder.Encode(exitLog{common.Bytes2Hex(output), math.HexOrDecimal64(gasUsed)}) + l.encoder.Encode(exitLog{output, math.HexOrDecimal64(gasUsed)}) } From 611d084968601cbc0156fed06f9f7bcad64e96c3 Mon Sep 17 00:00:00 2001 From: Sina Mahmoodi Date: Wed, 21 Jul 2021 17:56:35 +0200 Subject: [PATCH 08/47] core/vm: generate StructFrame marshaling via gencodec --- core/vm/gen_structframe.go | 81 ++++++++++++++++++++++++++++++++++++++ core/vm/logger.go | 16 ++++++-- core/vm/logger_json.go | 17 ++------ 3 files changed, 97 insertions(+), 17 deletions(-) create mode 100644 core/vm/gen_structframe.go diff --git a/core/vm/gen_structframe.go b/core/vm/gen_structframe.go new file mode 100644 index 000000000000..366af96896de --- /dev/null +++ b/core/vm/gen_structframe.go @@ -0,0 +1,81 @@ +// Code generated by github.com/fjl/gencodec. DO NOT EDIT. + +package vm + +import ( + "encoding/json" + "math/big" + + "github.com/ethereum/go-ethereum/common" + "github.com/ethereum/go-ethereum/common/hexutil" + "github.com/ethereum/go-ethereum/common/math" +) + +var _ = (*structFrameMarshaling)(nil) + +// MarshalJSON marshals as JSON. +func (s StructFrame) MarshalJSON() ([]byte, error) { + type StructFrame struct { + Type string `json:"type"` + From common.Address `json:"from"` + To common.Address `json:"to"` + Input hexutil.Bytes `json:"input"` + Gas math.HexOrDecimal64 `json:"gas"` + Value *math.HexOrDecimal256 `json:"value"` + GasUsed uint64 `json:"-"` + Output []byte `json:"-"` + } + var enc StructFrame + enc.Type = s.Type + enc.From = s.From + enc.To = s.To + enc.Input = s.Input + enc.Gas = math.HexOrDecimal64(s.Gas) + enc.Value = (*math.HexOrDecimal256)(s.Value) + enc.GasUsed = s.GasUsed + enc.Output = s.Output + return json.Marshal(&enc) +} + +// UnmarshalJSON unmarshals from JSON. +func (s *StructFrame) UnmarshalJSON(input []byte) error { + type StructFrame struct { + Type *string `json:"type"` + From *common.Address `json:"from"` + To *common.Address `json:"to"` + Input *hexutil.Bytes `json:"input"` + Gas *math.HexOrDecimal64 `json:"gas"` + Value *math.HexOrDecimal256 `json:"value"` + GasUsed *uint64 `json:"-"` + Output []byte `json:"-"` + } + var dec StructFrame + if err := json.Unmarshal(input, &dec); err != nil { + return err + } + if dec.Type != nil { + s.Type = *dec.Type + } + if dec.From != nil { + s.From = *dec.From + } + if dec.To != nil { + s.To = *dec.To + } + if dec.Input != nil { + s.Input = *dec.Input + } + if dec.Gas != nil { + s.Gas = uint64(*dec.Gas) + } + if dec.Value != nil { + s.Value = (*big.Int)(dec.Value) + } + if dec.GasUsed != nil { + s.GasUsed = *dec.GasUsed + } + if dec.Output != nil { + s.Output = dec.Output + } + return nil +} diff --git a/core/vm/logger.go b/core/vm/logger.go index d9af77a6355c..418ea8ff08b3 100644 --- a/core/vm/logger.go +++ b/core/vm/logger.go @@ -57,6 +57,7 @@ type LogConfig struct { } //go:generate gencodec -type StructLog -field-override structLogMarshaling -out gen_structlog.go +//go:generate gencodec -type StructFrame -field-override structFrameMarshaling -out gen_structframe.go // StructLog is emitted to the EVM each cycle and lists information about the current internal state // prior to the execution of the statement. @@ -100,14 +101,23 @@ func (s *StructLog) ErrorString() string { // StructFrame is emitted to the EVM upon stepping into a new call frame. type StructFrame struct { - Type_ string `json:"type"` + Type string `json:"type"` From common.Address `json:"from"` To common.Address `json:"to"` Input []byte `json:"input"` Gas uint64 `json:"gas"` Value *big.Int `json:"value"` - GasUsed uint64 `json:"gasUsed"` - Output []byte `json:"output"` + GasUsed uint64 `json:"-"` + Output []byte `json:"-"` +} + +type structFrameMarshaling struct { + Type string `json:"type"` + From common.Address `json:"from"` + To common.Address `json:"to"` + Input hexutil.Bytes `json:"input"` + Gas math.HexOrDecimal64 `json:"gas"` + Value *math.HexOrDecimal256 `json:"value"` } // Tracer is used to collect execution traces from an EVM transaction diff --git a/core/vm/logger_json.go b/core/vm/logger_json.go index 69215fd427d5..a9e3d47ac9c7 100644 --- a/core/vm/logger_json.go +++ b/core/vm/logger_json.go @@ -90,24 +90,13 @@ func (l *JSONLogger) CaptureEnd(output []byte, gasUsed uint64, t time.Duration, } func (l *JSONLogger) CaptureEnter(env *EVM, type_ CallFrameType, from common.Address, to common.Address, input []byte, gas uint64, value *big.Int) { - type structFrameMarshalling struct { - Type string `json:"type"` - From common.Address `json:"from"` - To common.Address `json:"to"` - Input hexutil.Bytes `json:"input"` - Gas math.HexOrDecimal64 `json:"gas"` - Value *math.HexOrDecimal256 `json:"value"` - GasUsed math.HexOrDecimal64 `json:"gasUsed"` - Output hexutil.Bytes `json:"output"` - } - - frame := structFrameMarshalling{ + frame := StructFrame{ Type: type_.String(), From: from, To: to, Input: input, - Gas: math.HexOrDecimal64(gas), - Value: (*math.HexOrDecimal256)(value), + Gas: gas, + Value: value, } l.encoder.Encode(frame) } From 481839d72c2b3291ca41bcc88a3079f642d3de4c Mon Sep 17 00:00:00 2001 From: Sina Mahmoodi Date: Wed, 28 Jul 2021 16:13:05 +0200 Subject: [PATCH 09/47] eth/tracers: Add js call frame tracer --- eth/tracers/internal/tracers/assets.go | 59 ++++++++++----- .../internal/tracers/callframe_tracer.js | 74 +++++++++++++++++++ 2 files changed, 115 insertions(+), 18 deletions(-) create mode 100644 eth/tracers/internal/tracers/callframe_tracer.js diff --git a/eth/tracers/internal/tracers/assets.go b/eth/tracers/internal/tracers/assets.go index 7f45ab286e75..ea7d1771ea0b 100644 --- a/eth/tracers/internal/tracers/assets.go +++ b/eth/tracers/internal/tracers/assets.go @@ -3,6 +3,7 @@ // 4byte_tracer.js (2.933kB) // bigram_tracer.js (1.712kB) // call_tracer.js (8.956kB) +// callframe_tracer.js (2.745kB) // evmdis_tracer.js (4.195kB) // noop_tracer.js (1.271kB) // opcount_tracer.js (1.372kB) @@ -137,6 +138,26 @@ func call_tracerJs() (*asset, error) { return a, nil } +var _callframe_tracerJs = []byte("\x1f\x8b\x08\x00\x00\x00\x00\x00\x00\xff\xd4\x54\xc1\x6e\x22\x39\x14\xbc\xf3\x15\xb5\xa7\x10\x2d\xa1\xc3\xac\x34\x07\x66\x19\x89\x8d\x92\x09\x52\x36\x89\x80\x68\x14\x45\x39\x18\xfa\x75\xb7\xb5\xc6\x6e\xd9\xcf\x10\x14\xe5\xdf\x57\x76\x43\xa0\x3b\x24\x9b\xdb\x6a\x38\x35\x76\x55\x3d\xbb\x5e\x3d\x27\x09\xce\x4c\xb9\xb6\x32\x2f\x18\x5f\x4e\xbf\xf4\x30\x2d\x08\xb9\x39\x21\x2e\xc8\x92\x5f\x60\xe8\xb9\x30\xd6\xb5\x92\x04\xd3\x42\x3a\x64\x52\x11\xa4\x43\x29\x2c\xc3\x64\xe0\x06\x5e\xc9\x99\x15\x76\xdd\x6d\x25\x49\xc5\x39\xb8\x1d\x14\x32\x4b\x04\x67\x32\x5e\x09\x4b\x7d\xac\x8d\xc7\x5c\x68\x58\x4a\xa5\x63\x2b\x67\x9e\x09\x92\x21\x74\x9a\x18\x8b\x85\x49\x65\xb6\x0e\x92\x92\xe1\x75\x4a\x36\x96\x66\xb2\x0b\xb7\x3d\xc7\x8f\xeb\x3b\x5c\x91\x73\x64\xf1\x83\x34\x59\xa1\x70\xeb\x67\x4a\xce\x71\x25\xe7\xa4\x1d\x41\x38\x94\x61\xc5\x15\x94\x62\x16\xe5\x02\xf1\x22\x1c\x65\xb2\x39\x0a\x2e\x8c\xd7\xa9\x60\x69\x74\x07\x24\xc3\xc9\xb1\x24\xeb\xa4\xd1\xf8\x63\x5b\x6a\x23\xd8\x81\xb1\x41\xa4\x2d\x38\x5c\xc0\xc2\x94\x81\x77\x0c\xa1\xd7\x50\x82\x77\xd4\x4f\x18\xb2\xbb\x77\x0a\xa9\x63\x99\xc2\x94\x04\x2e\x04\x87\x5b\xaf\xa4\x52\x98\x11\xbc\xa3\xcc\xab\x4e\x50\x9b\x79\xc6\xcf\xd1\xf4\xf2\xe6\x6e\x8a\xe1\xf5\x3d\x7e\x0e\xc7\xe3\xe1\xf5\xf4\xfe\x1b\x56\x92\x0b\xe3\x19\xb4\xa4\x4a\x4a\x2e\x4a\x25\x29\xc5\x4a\x58\x2b\x34\xaf\x61\xb2\xa0\xf0\xf7\xf9\xf8\xec\x72\x78\x3d\x1d\xfe\x35\xba\x1a\x4d\xef\x61\x2c\x2e\x46\xd3\xeb\xf3\xc9\x04\x17\x37\x63\x0c\x71\x3b\x1c\x4f\x47\x67\x77\x57\xc3\x31\x6e\xef\xc6\xb7\x37\x93\xf3\x2e\x26\x14\x4e\x45\x81\xff\xdf\x9e\x67\xb1\x7b\x96\x90\x12\x0b\xa9\xdc\xd6\x89\x7b\xe3\xe1\x0a\xe3\x55\x8a\x42\x2c\x09\x96\xe6\x24\x97\x94\x42\x60\x6e\xca\xf5\xa7\x9b\x1a\xb4\x84\x32\x3a\x8f\x77\x7e\x37\x90\x18\x65\xd0\x86\x3b\x70\x44\xf8\xb3\x60\x2e\xfb\x49\xb2\x5a\xad\xba\xb9\xf6\x5d\x63\xf3\x44\x55\x72\x2e\xf9\xde\x6d\xb5\x82\xe8\x5c\x28\x75\x61\xc5\x82\xa6\x56\xcc\xc9\x06\xdf\x5d\x94\xd7\xb4\x8a\x9b\xc8\xc2\x2e\xd8\x8a\xb9\xd4\x39\x16\xc4\x85\x49\x1d\xd8\xc0\x52\x69\x2c\x6f\x3a\x05\xa9\x33\x63\x17\x31\x51\xf1\xb0\xb3\xd0\x18\xa9\x99\xac\x16\x0a\x0b\x72\x4e\xe4\x14\x53\x2c\x82\x98\x76\x62\xce\x31\x32\xcf\x2d\x00\xb1\x94\x63\x31\xff\xa7\x8f\x87\xe7\x97\xc7\x4e\x5c\x74\x4c\x65\x1f\x99\xd7\x11\xda\x56\x26\xef\x20\x9d\x1d\xe3\xf9\xa5\xda\xcf\x84\x57\x7c\x10\x10\xb7\xc3\x6f\x29\x2c\x14\x69\x0c\xc0\x85\x74\xdd\xd7\x32\x5d\x45\x3a\xe7\xe2\x15\x27\x33\xb4\x03\xee\x3b\x7a\xfb\xf4\xad\x44\x74\xe2\x8d\x46\x69\xca\xf6\x71\x0d\x1b\x64\xea\xa0\x07\x45\xfa\xa4\xf7\x58\x2d\x60\x30\x18\xc4\xc1\xce\xa4\xa6\xb4\x59\x28\xfc\x3e\x24\xe3\xe1\xb1\x46\x78\x69\x7d\x92\xda\x2d\xbd\x2b\xda\xe1\x73\x77\xdc\x8a\xbc\x71\xd2\x92\xab\x5b\x39\xe7\xa7\xa6\x95\x49\x82\x5b\x4b\x65\x78\x3d\x8c\x0f\x53\xbf\x69\x6a\x6c\x7d\xeb\x80\x5b\xf5\xdb\xf1\xba\xa4\x7e\x6c\x35\x3f\x75\xc3\x9f\x4e\x6d\x3b\xb3\x66\x11\xb7\xd9\x5c\xd2\x53\xa8\xdf\x0d\x4b\xc7\x75\x14\x9b\xfe\xf6\x63\x8b\x62\xd3\xc0\x2c\x85\xf2\xb1\xd2\xd1\xe9\xd3\x11\x7e\x8f\xf5\xe2\x5a\x97\xcd\x84\xad\xd4\x79\xbb\xf7\xb5\xc1\xc9\x85\xab\x84\x37\x9c\x99\xcc\x47\x9a\xa3\x7e\x2e\xdc\xf1\xc7\xcc\x3b\x47\x69\xff\x30\x33\x6c\x7d\xc4\x96\xba\xf4\xdc\xaf\xdd\x27\x2e\x35\x60\xc6\x73\x85\xdb\xc1\xaa\xa5\x3d\xdc\x4b\x2d\xcb\x8d\x30\x9c\x6e\x33\xf4\xdb\xfb\x01\x0c\x80\xd7\xa4\xbd\xc3\xff\x76\xa0\x9c\x25\xf6\x56\x57\x4d\xdf\xcf\x14\x85\xe1\xdf\x8b\x54\x7c\x48\x9a\xb3\xf9\x41\x54\x22\xfe\xdd\xa4\x54\x4e\x54\x98\x77\x82\xb2\x0f\x79\x93\x92\x8d\xf3\xfb\x98\x43\xce\xc7\x60\xd4\x5b\x5b\x81\xeb\xb1\x38\xea\x7d\x3d\x3a\x1c\xc3\x0d\xb7\x22\x35\x62\xd8\x60\xed\x2c\x6d\xbe\x33\xf5\xe9\xdd\xfa\xfb\x24\xb9\x69\xef\x38\xce\xf1\xff\xf8\x00\xc6\x10\xe5\xc2\x79\x47\x29\x06\x87\x9c\xab\x8e\x78\x60\x38\xa2\x1b\x6f\xc5\xaa\xa0\x87\xda\xbb\x56\x6d\x34\x36\x33\x50\xe3\x84\x3b\x9c\x0c\xd0\xfb\xe5\x9f\xe5\x97\xd6\xbf\x01\x00\x00\xff\xff\x3a\xea\x31\x74\xb9\x0a\x00\x00") + +func callframe_tracerJsBytes() ([]byte, error) { + return bindataRead( + _callframe_tracerJs, + "callframe_tracer.js", + ) +} + +func callframe_tracerJs() (*asset, error) { + bytes, err := callframe_tracerJsBytes() + if err != nil { + return nil, err + } + + info := bindataFileInfo{name: "callframe_tracer.js", size: 0, mode: os.FileMode(0), modTime: time.Unix(0, 0)} + a := &asset{bytes: bytes, info: info, digest: [32]uint8{0xfa, 0xe5, 0xd3, 0xcd, 0xd5, 0x31, 0x27, 0x1a, 0x59, 0xe8, 0x8d, 0xdb, 0x7a, 0xb9, 0xcb, 0x69, 0xf4, 0x1e, 0x1a, 0x1b, 0x9d, 0x25, 0xaf, 0xb3, 0x12, 0x7e, 0x8a, 0x37, 0x37, 0xe1, 0x8b, 0x42}} + return a, nil +} + var _evmdis_tracerJs = []byte("\x1f\x8b\x08\x00\x00\x00\x00\x00\x00\xff\xac\x57\xdf\x6f\xda\xca\x12\x7e\x86\xbf\x62\x94\x27\x50\x29\x60\x63\x08\x38\x27\x47\xe2\xa6\xf4\x1c\xae\xd2\x24\x02\x72\x8f\x2a\x94\x87\x05\xc6\xb0\xaa\xf1\x5a\xbb\x6b\x72\xb8\x55\xfe\xf7\xab\xd9\x59\x03\xf9\x75\xdb\x4a\xa7\x0f\x3b\xb5\x77\xbe\x6f\xbe\x9d\x19\xcf\x92\x56\x0b\xae\x54\xbe\xd7\x72\xbd\xb1\x10\xb6\x83\x73\x98\x6d\x10\xd6\xea\x23\xda\x0d\x6a\x2c\xb6\x30\x2c\xec\x46\x69\x53\x6d\xb5\x60\xb6\x91\x06\x12\x99\x22\x48\x03\xb9\xd0\x16\x54\x02\xf6\x85\x7f\x2a\x17\x5a\xe8\x7d\xb3\xda\x6a\x31\xe6\xcd\x6d\x62\x48\x34\x22\x18\x95\xd8\x47\xa1\x31\x86\xbd\x2a\x60\x29\x32\xd0\xb8\x92\xc6\x6a\xb9\x28\x2c\x82\xb4\x20\xb2\x55\x4b\x69\xd8\xaa\x95\x4c\xf6\x44\x29\x2d\x14\xd9\x0a\xb5\x0b\x6d\x51\x6f\x4d\xa9\xe3\x8f\x9b\x7b\xb8\x46\x63\x50\xc3\x1f\x98\xa1\x16\x29\xdc\x15\x8b\x54\x2e\xe1\x5a\x2e\x31\x33\x08\xc2\x40\x4e\x6f\xcc\x06\x57\xb0\x70\x74\x04\xfc\x4c\x52\xa6\x5e\x0a\x7c\x56\x45\xb6\x12\x56\xaa\xac\x01\x28\x49\x39\xec\x50\x1b\xa9\x32\xe8\x94\xa1\x3c\x61\x03\x94\x26\x92\x9a\xb0\x74\x00\x0d\x2a\x27\x5c\x1d\x44\xb6\x87\x54\xd8\x23\xf4\x27\x12\x72\x3c\xf7\x0a\x64\xe6\xc2\x6c\x54\x8e\x60\x37\xc2\xd2\xa9\x1f\x65\x9a\xc2\x02\xa1\x30\x98\x14\x69\x83\xd8\x16\x85\x85\xbf\xc6\xb3\x3f\x6f\xef\x67\x30\xbc\xf9\x0a\x7f\x0d\x27\x93\xe1\xcd\xec\xeb\x05\x3c\x4a\xbb\x51\x85\x05\xdc\x21\x53\xc9\x6d\x9e\x4a\x5c\xc1\xa3\xd0\x5a\x64\x76\x0f\x2a\x21\x86\x2f\xa3\xc9\xd5\x9f\xc3\x9b\xd9\xf0\x5f\xe3\xeb\xf1\xec\x2b\x28\x0d\x9f\xc7\xb3\x9b\xd1\x74\x0a\x9f\x6f\x27\x30\x84\xbb\xe1\x64\x36\xbe\xba\xbf\x1e\x4e\xe0\xee\x7e\x72\x77\x3b\x1d\x35\x61\x8a\xa4\x0a\x09\xff\xe3\x9c\x27\xae\x7a\x1a\x61\x85\x56\xc8\xd4\x94\x99\xf8\xaa\x0a\x30\x1b\x55\xa4\x2b\xd8\x88\x1d\x82\xc6\x25\xca\x1d\xae\x40\xc0\x52\xe5\xfb\x9f\x2e\x2a\x71\x89\x54\x65\x6b\x77\xe6\x77\x1b\x12\xc6\x09\x64\xca\x36\xc0\x20\xc2\x6f\x1b\x6b\xf3\xb8\xd5\x7a\x7c\x7c\x6c\xae\xb3\xa2\xa9\xf4\xba\x95\x32\x9d\x69\xfd\xde\xac\x12\x27\xee\xb6\x2b\x69\x66\x5a\x2c\x51\x83\x46\x5b\xe8\xcc\x80\x29\x92\x44\x2e\x25\x66\x16\x64\x96\x28\xbd\x75\x7d\x02\x89\x56\x5b\x10\x60\xc9\x19\xac\x82\x1c\x35\x6d\x7a\x8e\x8f\xc6\xee\x53\xa7\x73\x25\x8d\x30\x06\xb7\x8b\x74\xdf\xac\x7e\xaf\x56\x8c\x15\xcb\x6f\x31\xcc\xbf\xab\xdc\xc4\x30\x7f\x78\x7a\x68\x54\xab\x95\x2c\x2f\xcc\x06\x4d\x0c\xdf\xdb\x31\xb4\x1b\x10\xc4\x10\x34\x20\x74\x6b\xc7\xad\x91\x5b\xbb\x6e\xed\xb9\xf5\xdc\xad\x7d\xb7\x0e\xdc\x1a\xb4\xd9\x30\x3a\x60\xb7\x80\xfd\x02\x76\x0c\xd8\x33\x64\xcf\xd0\xc7\xe1\x40\x21\x47\x0a\x39\x54\xc8\xb1\x42\x66\xe9\xb0\x4b\xc4\x2c\x11\xb3\x74\x99\xa5\xcb\x2c\x5d\x76\xe9\x32\x4b\xd7\x0b\xee\xba\xf3\x74\x99\xa5\x7b\xce\x4f\xcc\xd2\x65\x96\x1e\x1f\xb9\xc7\x80\x9e\x3f\x22\x03\x7a\x2c\xbe\xc7\x80\x1e\x03\xfa\x0c\xe8\x73\xd8\x7e\xc8\x4f\x1d\x36\xcc\xd2\xe7\xb0\xfd\x1e\x1b\x0e\xdb\x67\x96\x3e\xb3\x0c\x58\xfc\x20\x70\x7b\x03\x8e\x37\xe0\x78\x03\x9f\xd5\x32\xad\x3e\xaf\x6d\x9f\xd8\x76\xe8\x6d\xc7\xdb\xc8\xdb\xae\xb7\x3e\xf3\x6d\x9f\xfa\xb6\xcf\x7d\xdb\xf3\x1d\xea\xe4\xf9\x02\xcf\x17\x78\xbe\xc0\xf3\x05\x9e\xaf\xac\x64\x59\xca\xb2\x96\xbe\x98\x81\xaf\x66\xe0\xcb\x19\xf8\x7a\x06\xbe\xa0\x81\xaf\x68\xe0\x4b\x1a\xf8\x9a\x06\xa1\xe7\x0b\xfb\x31\x84\x64\x07\x31\x74\x1a\x10\x74\xda\x31\x44\x64\x83\x18\xba\x64\xc3\x18\x7a\x64\x3b\x31\x9c\x93\x8d\x62\xe8\x93\xed\xc6\x30\x20\x4b\x7c\xd4\xb5\x1d\x22\x24\xc6\x0e\x29\x24\xca\x0e\x49\x24\xce\x88\x34\x12\x69\x44\x22\x89\x35\x22\x95\x44\x1b\x91\x4c\xe2\x8d\x22\xd6\x11\x75\x59\x47\xd4\x63\x1d\xd1\x39\xeb\xa0\xee\x73\x80\x01\xeb\xa0\xfe\x23\x1d\xd4\x80\xa4\xc3\x75\x20\xe9\x70\x3d\x48\x3a\x5c\x17\x12\x25\xf5\xa1\xd3\xe1\x3a\x91\x48\xa9\x17\x9d\x0e\xd7\x8d\x44\xeb\xfa\x91\x78\x7d\x47\x06\xbd\xc0\xdb\xd0\xdb\x8e\xb7\x91\xb3\x61\xe4\xbf\xa2\xc8\x7f\x46\x91\xff\x8e\xa2\x8e\xdf\xf7\x7e\xee\x23\x78\xa2\xef\xbc\xd5\x02\x8d\xa6\x48\x2d\x4d\x7f\x99\xed\xd4\x37\x9a\xcf\x1b\xcc\x40\xa4\xa9\x1b\x64\x2a\x5f\xaa\x15\x1a\x1e\x90\x0b\xc4\x0c\xa4\x45\x2d\xe8\x86\x50\x3b\xd4\x74\x39\x96\xa3\xc9\xd1\x11\x26\x91\x99\x48\x4b\x62\x3f\x44\x69\x30\xc9\x6c\xdd\xac\x56\xf8\x7d\x0c\x49\x91\x2d\x69\x74\xd5\xea\xf0\xdd\x53\x80\xdd\x48\xd3\x74\x23\x69\xde\x7e\x68\xaa\xdc\x5c\x40\xa9\x33\x11\x6f\xc9\x24\x6a\xb1\xb4\x85\x48\x01\xff\xc6\x65\xe1\x66\xa1\x4a\x40\x64\x5e\x39\x24\x3c\xf1\x2b\x0e\x7f\x12\x35\x55\xeb\x06\xac\x16\x14\xbc\x0c\x61\x2c\xe6\xa7\x11\xe8\xde\xc0\x1d\xea\x7d\xc9\xe5\xee\x41\x0a\xf9\x9f\x2f\x3e\x1c\x12\x35\xe1\xde\x64\xae\x56\x2a\x3b\xa1\x21\xd1\x62\x8b\x70\x79\x7a\xba\xe3\x7f\x9b\x29\x66\x6b\xbb\x81\x8f\x10\x3c\x5c\x54\x3d\x02\xb5\x56\x1a\x2e\x21\x55\xeb\xe6\x1a\xed\x88\x1e\x6b\xf5\x8b\x6a\xa5\x22\x13\xa8\xb9\x5d\xa6\xaf\x38\xee\xf9\x99\x7b\x75\xf6\x00\x97\x0c\x25\xcf\x27\xc0\xd4\x20\x10\xc0\xd3\x7c\xc2\xdc\x6e\x6a\x75\xb8\x3c\x95\xe2\xe3\x7b\x3a\x95\xd3\xa5\x02\x97\xfc\x54\x51\x79\x0c\xf4\x8f\x08\x54\xde\xb4\xea\xa6\xd8\x2e\x50\xd7\xea\x0d\xb7\xbd\x22\x42\x88\xe1\x39\x3f\xef\x95\x65\x9e\x3f\xb8\xe7\x27\x92\xe4\xd4\x3b\xc5\x54\xdb\xf2\xe4\xbf\x43\xdb\x47\x77\x67\xcf\x35\xee\x54\x0e\x97\x70\x70\x9c\xbf\x82\x70\xb2\x08\x91\x28\x5d\x23\x94\x84\x4b\x68\x5f\x80\x84\xdf\xf8\x6c\xfe\x06\x9b\x33\x5b\x53\xe5\x0f\x17\x20\x3f\x7c\xa8\x3b\x50\xc5\xbf\x65\x8d\x4d\x72\x75\x39\xe2\x84\xe4\x88\xdf\x6a\xb2\xde\xb4\x6a\x6a\xb5\xcc\xd6\xb5\xa0\x57\x77\xb9\xaf\x3c\xd1\x62\x1e\xa5\x5d\xb2\xbf\x4b\x89\x77\xaa\xfb\x33\x2c\x85\x41\x38\xbb\x1a\x5e\x5f\x9f\xc5\x70\x7c\xb8\xba\xfd\x34\x3a\x8b\x0f\x87\x94\x99\xb1\xf4\xfb\x95\x4b\x7c\x12\xb7\x53\x6f\xee\x44\x5a\xe0\x6d\xc2\xf5\x3e\xb8\xcb\xff\xe2\x6b\xef\xe8\x95\x37\x17\x70\x7e\xb6\x16\xc6\xb5\xc3\x0b\x40\xfb\x5d\x80\x55\x6f\xf9\x07\xcf\xd3\xf0\x1c\xe2\x98\xde\x42\x85\x27\xa8\x17\x18\x99\xe5\x85\x3d\x60\xb6\xb8\x55\x7a\xdf\x34\xf4\xcb\xa7\xe6\x73\xd2\x38\x24\xe7\x83\x3f\xf7\x0b\x8a\x63\xaf\x67\x45\x9a\x3e\xdf\xe3\x39\xf2\xce\xa6\xca\x39\x27\x73\xdf\x3b\x27\x1f\x81\x6b\x01\xf6\xf3\xd1\x16\x1a\xc5\xb7\x8b\x63\x45\x3f\x8d\xae\x47\x7f\x0c\x67\xa3\x67\x95\x9d\xce\x86\xb3\xf1\x15\xbf\xfa\x71\x6d\xc3\x5f\xaa\xed\xeb\x4e\x38\x9e\xc3\x1d\x03\x5e\xb5\xe0\xdb\x2d\xf0\xcb\x3d\xf0\x4b\x4d\x70\x2c\xe8\x3f\x51\xd1\xff\x5f\xd2\x7f\xba\xa6\x93\xd1\xec\x7e\x72\x73\x52\x3a\xfa\x7b\xe5\x27\xbe\x19\xef\xfa\x76\xdd\x82\x57\xee\x3c\xbe\xfc\x15\xf7\x46\xe3\xab\xc2\x36\x5c\xe8\x0f\x25\xeb\x3b\x7a\xa7\xb3\xdb\xbb\x63\xef\xdd\x8f\xaf\xc6\x87\xa1\xf2\xa3\x18\xed\x06\xb4\xdf\x61\xfd\xf7\xfd\x97\xbb\x4f\xa3\xe9\xcc\x33\x95\x99\xcd\x97\x87\xcf\x74\x8d\xf6\xee\xaa\x76\x32\x03\x65\x52\xce\x3f\x69\xee\x28\xcd\xe5\xf4\x3b\xa0\x53\xcc\x0e\xf0\x67\x37\x07\x7c\x84\xf6\xdf\x5d\x3c\x72\x1d\x87\xfb\xcb\x82\xf9\x1b\xcc\x11\x1f\xeb\xfa\xec\x22\x3d\x9e\xee\xf9\x1d\xc4\xf8\x6a\xe5\xa9\xfa\x54\xfd\x5f\x00\x00\x00\xff\xff\xdf\x2f\xd9\xfa\x63\x10\x00\x00") func evmdis_tracerJsBytes() ([]byte, error) { @@ -348,15 +369,16 @@ func AssetNames() []string { // _bindata is a table, holding each asset generator, mapped to its name. var _bindata = map[string]func() (*asset, error){ - "4byte_tracer.js": _4byte_tracerJs, - "bigram_tracer.js": bigram_tracerJs, - "call_tracer.js": call_tracerJs, - "evmdis_tracer.js": evmdis_tracerJs, - "noop_tracer.js": noop_tracerJs, - "opcount_tracer.js": opcount_tracerJs, - "prestate_tracer.js": prestate_tracerJs, - "trigram_tracer.js": trigram_tracerJs, - "unigram_tracer.js": unigram_tracerJs, + "4byte_tracer.js": _4byte_tracerJs, + "bigram_tracer.js": bigram_tracerJs, + "call_tracer.js": call_tracerJs, + "callframe_tracer.js": callframe_tracerJs, + "evmdis_tracer.js": evmdis_tracerJs, + "noop_tracer.js": noop_tracerJs, + "opcount_tracer.js": opcount_tracerJs, + "prestate_tracer.js": prestate_tracerJs, + "trigram_tracer.js": trigram_tracerJs, + "unigram_tracer.js": unigram_tracerJs, } // AssetDebug is true if the assets were built with the debug flag enabled. @@ -403,15 +425,16 @@ type bintree struct { } var _bintree = &bintree{nil, map[string]*bintree{ - "4byte_tracer.js": {_4byte_tracerJs, map[string]*bintree{}}, - "bigram_tracer.js": {bigram_tracerJs, map[string]*bintree{}}, - "call_tracer.js": {call_tracerJs, map[string]*bintree{}}, - "evmdis_tracer.js": {evmdis_tracerJs, map[string]*bintree{}}, - "noop_tracer.js": {noop_tracerJs, map[string]*bintree{}}, - "opcount_tracer.js": {opcount_tracerJs, map[string]*bintree{}}, - "prestate_tracer.js": {prestate_tracerJs, map[string]*bintree{}}, - "trigram_tracer.js": {trigram_tracerJs, map[string]*bintree{}}, - "unigram_tracer.js": {unigram_tracerJs, map[string]*bintree{}}, + "4byte_tracer.js": {_4byte_tracerJs, map[string]*bintree{}}, + "bigram_tracer.js": {bigram_tracerJs, map[string]*bintree{}}, + "call_tracer.js": {call_tracerJs, map[string]*bintree{}}, + "callframe_tracer.js": {callframe_tracerJs, map[string]*bintree{}}, + "evmdis_tracer.js": {evmdis_tracerJs, map[string]*bintree{}}, + "noop_tracer.js": {noop_tracerJs, map[string]*bintree{}}, + "opcount_tracer.js": {opcount_tracerJs, map[string]*bintree{}}, + "prestate_tracer.js": {prestate_tracerJs, map[string]*bintree{}}, + "trigram_tracer.js": {trigram_tracerJs, map[string]*bintree{}}, + "unigram_tracer.js": {unigram_tracerJs, map[string]*bintree{}}, }} // RestoreAsset restores an asset under the given directory. diff --git a/eth/tracers/internal/tracers/callframe_tracer.js b/eth/tracers/internal/tracers/callframe_tracer.js new file mode 100644 index 000000000000..c3b1908cc0a9 --- /dev/null +++ b/eth/tracers/internal/tracers/callframe_tracer.js @@ -0,0 +1,74 @@ +// Copyright 2021 The go-ethereum Authors +// This file is part of the go-ethereum library. +// +// The go-ethereum library is free software: you can redistribute it and/or modify +// it under the terms of the GNU Lesser General Public License as published by +// the Free Software Foundation, either version 3 of the License, or +// (at your option) any later version. +// +// The go-ethereum library is distributed in the hope that it will be useful, +// but WITHOUT ANY WARRANTY; without even the implied warranty of +// MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the +// GNU Lesser General Public License for more details. +// +// You should have received a copy of the GNU Lesser General Public License +// along with the go-ethereum library. If not, see . + + +// callFrameTracer uses the new call frame tracing methods to report useful information +// about internal messages of a transaction. +{ + callstack: [{}], + step: function(log, db) {}, + fault: function(log, db) { + var len = this.callstack.length + if (len > 1) { + var call = this.callstack.pop() + if (this.callstack[len-1].calls === undefined) { + this.callstack[len-1].calls = [] + } + this.callstack[len-1].calls.push(call) + } + }, + result: function(ctx, db) { + // Prepare outer message info + var call = { + type: ctx.type, + from: toHex(ctx.from), + to: toHex(ctx.to), + value: '0x' + ctx.value.toString(16), + gas: '0x' + bigInt(ctx.gas).toString(16), + gasUsed: '0x' + bigInt(ctx.gasUsed).toString(16), + input: toHex(ctx.input), + output: toHex(ctx.output), + } + if (this.callstack[0].calls !== undefined) { + call.calls = this.callstack[0].calls; + } + return call + }, + enter: function(frame) { + var call = { + type: frame.type, + from: toHex(frame.from), + to: toHex(frame.to), + input: toHex(frame.input), + gas: '0x' + bigInt(frame.gas).toString('16'), + value: '0x' + frame.value.toString('16'), + } + this.callstack.push(call) + }, + exit: function(frameResult) { + var len = this.callstack.length + if (len > 1) { + var call = this.callstack.pop() + call.gasused = '0x' + bigInt(frameResult.gasUsed).toString('16') + call.output = toHex(frameResult.output) + len -= 1 + if (this.callstack[len-1].calls === undefined) { + this.callstack[len-1].calls = [] + } + this.callstack[len-1].calls.push(call) + } + }, +} From d25f8c85fb8457ae04ee52b8c130b9ec4dbab59a Mon Sep 17 00:00:00 2001 From: Sina Mahmoodi Date: Wed, 28 Jul 2021 17:11:08 +0200 Subject: [PATCH 10/47] core,eth: add err field to call frame tracing --- core/vm/access_list_tracer.go | 2 +- core/vm/evm.go | 10 ++-- core/vm/gen_structframe.go | 24 ++++++--- core/vm/logger.go | 29 +++++++---- core/vm/logger_json.go | 5 +- eth/tracers/internal/tracers/assets.go | 6 +-- .../internal/tracers/callframe_tracer.js | 49 +++++++++++++++++-- eth/tracers/tracer.go | 5 +- 8 files changed, 97 insertions(+), 33 deletions(-) diff --git a/core/vm/access_list_tracer.go b/core/vm/access_list_tracer.go index e6a39a69a64a..860c784e883c 100644 --- a/core/vm/access_list_tracer.go +++ b/core/vm/access_list_tracer.go @@ -169,7 +169,7 @@ func (*AccessListTracer) CaptureEnd(output []byte, gasUsed uint64, t time.Durati func (*AccessListTracer) CaptureEnter(env *EVM, type_ CallFrameType, from common.Address, to common.Address, input []byte, gas uint64, value *big.Int) { } -func (*AccessListTracer) CaptureExit(env *EVM, output []byte, gasUsed uint64) {} +func (*AccessListTracer) CaptureExit(env *EVM, output []byte, gasUsed uint64, err error) {} // AccessList returns the current accesslist maintained by the tracer. func (a *AccessListTracer) AccessList() types.AccessList { diff --git a/core/vm/evm.go b/core/vm/evm.go index 570504d8ecb2..5b48ae088ea4 100644 --- a/core/vm/evm.go +++ b/core/vm/evm.go @@ -235,7 +235,7 @@ func (evm *EVM) Call(caller ContractRef, addr common.Address, input []byte, gas // Handle tracer events for entering and exiting a call frame evm.Config.Tracer.CaptureEnter(evm, CallType, caller.Address(), addr, input, gas, value) defer func(startGas uint64) { - evm.Config.Tracer.CaptureExit(evm, ret, startGas-gas) + evm.Config.Tracer.CaptureExit(evm, ret, startGas-gas, err) }(gas) } @@ -300,7 +300,7 @@ func (evm *EVM) CallCode(caller ContractRef, addr common.Address, input []byte, if evm.Config.Debug { evm.Config.Tracer.CaptureEnter(evm, CallCodeType, caller.Address(), addr, input, gas, value) defer func(startGas uint64) { - evm.Config.Tracer.CaptureExit(evm, ret, startGas-gas) + evm.Config.Tracer.CaptureExit(evm, ret, startGas-gas, err) }(gas) } @@ -344,7 +344,7 @@ func (evm *EVM) DelegateCall(caller ContractRef, addr common.Address, input []by if evm.Config.Debug { evm.Config.Tracer.CaptureEnter(evm, DelegateCallType, caller.Address(), addr, input, gas, nil) defer func(startGas uint64) { - evm.Config.Tracer.CaptureExit(evm, ret, startGas-gas) + evm.Config.Tracer.CaptureExit(evm, ret, startGas-gas, err) }(gas) } @@ -397,7 +397,7 @@ func (evm *EVM) StaticCall(caller ContractRef, addr common.Address, input []byte if evm.Config.Debug { evm.Config.Tracer.CaptureEnter(evm, StaticCallType, caller.Address(), addr, input, gas, nil) defer func(startGas uint64) { - evm.Config.Tracer.CaptureExit(evm, ret, startGas-gas) + evm.Config.Tracer.CaptureExit(evm, ret, startGas-gas, err) }(gas) } @@ -525,7 +525,7 @@ func (evm *EVM) create(caller ContractRef, codeAndHash *codeAndHash, gas uint64, if evm.Config.Debug && evm.depth == 0 { evm.Config.Tracer.CaptureEnd(ret, gas-contract.Gas, time.Since(start), err) } else if evm.Config.Debug && evm.depth > 0 { - evm.Config.Tracer.CaptureExit(evm, ret, gas-contract.Gas) + evm.Config.Tracer.CaptureExit(evm, ret, gas-contract.Gas, err) } return ret, address, contract.Gas, err } diff --git a/core/vm/gen_structframe.go b/core/vm/gen_structframe.go index 366af96896de..cee5085d2590 100644 --- a/core/vm/gen_structframe.go +++ b/core/vm/gen_structframe.go @@ -16,14 +16,16 @@ var _ = (*structFrameMarshaling)(nil) // MarshalJSON marshals as JSON. func (s StructFrame) MarshalJSON() ([]byte, error) { type StructFrame struct { - Type string `json:"type"` - From common.Address `json:"from"` - To common.Address `json:"to"` - Input hexutil.Bytes `json:"input"` - Gas math.HexOrDecimal64 `json:"gas"` - Value *math.HexOrDecimal256 `json:"value"` - GasUsed uint64 `json:"-"` - Output []byte `json:"-"` + Type string `json:"type"` + From common.Address `json:"from"` + To common.Address `json:"to"` + Input hexutil.Bytes `json:"input"` + Gas math.HexOrDecimal64 `json:"gas"` + Value *math.HexOrDecimal256 `json:"value"` + GasUsed uint64 `json:"-"` + Output []byte `json:"-"` + Err error `json:"-"` + ErrorString string `json:"error"` } var enc StructFrame enc.Type = s.Type @@ -34,6 +36,8 @@ func (s StructFrame) MarshalJSON() ([]byte, error) { enc.Value = (*math.HexOrDecimal256)(s.Value) enc.GasUsed = s.GasUsed enc.Output = s.Output + enc.Err = s.Err + enc.ErrorString = s.ErrorString() return json.Marshal(&enc) } @@ -48,6 +52,7 @@ func (s *StructFrame) UnmarshalJSON(input []byte) error { Value *math.HexOrDecimal256 `json:"value"` GasUsed *uint64 `json:"-"` Output []byte `json:"-"` + Err error `json:"-"` } var dec StructFrame if err := json.Unmarshal(input, &dec); err != nil { @@ -77,5 +82,8 @@ func (s *StructFrame) UnmarshalJSON(input []byte) error { if dec.Output != nil { s.Output = dec.Output } + if dec.Err != nil { + s.Err = dec.Err + } return nil } diff --git a/core/vm/logger.go b/core/vm/logger.go index 418ea8ff08b3..db9b1b480a81 100644 --- a/core/vm/logger.go +++ b/core/vm/logger.go @@ -109,15 +109,25 @@ type StructFrame struct { Value *big.Int `json:"value"` GasUsed uint64 `json:"-"` Output []byte `json:"-"` + Err error `json:"-"` +} + +// ErrorString formats the log's error as a string. +func (s *StructFrame) ErrorString() string { + if s.Err != nil { + return s.Err.Error() + } + return "" } type structFrameMarshaling struct { - Type string `json:"type"` - From common.Address `json:"from"` - To common.Address `json:"to"` - Input hexutil.Bytes `json:"input"` - Gas math.HexOrDecimal64 `json:"gas"` - Value *math.HexOrDecimal256 `json:"value"` + Type string `json:"type"` + From common.Address `json:"from"` + To common.Address `json:"to"` + Input hexutil.Bytes `json:"input"` + Gas math.HexOrDecimal64 `json:"gas"` + Value *math.HexOrDecimal256 `json:"value"` + ErrorString string `json:"error"` } // Tracer is used to collect execution traces from an EVM transaction @@ -129,7 +139,7 @@ type Tracer interface { CaptureStart(env *EVM, from common.Address, to common.Address, create bool, input []byte, gas uint64, value *big.Int) CaptureState(env *EVM, pc uint64, op OpCode, gas, cost uint64, scope *ScopeContext, rData []byte, depth int, err error) CaptureEnter(env *EVM, type_ CallFrameType, from common.Address, to common.Address, input []byte, gas uint64, value *big.Int) - CaptureExit(env *EVM, output []byte, gasUsed uint64) + CaptureExit(env *EVM, output []byte, gasUsed uint64, err error) CaptureFault(env *EVM, pc uint64, op OpCode, gas, cost uint64, scope *ScopeContext, depth int, err error) CaptureEnd(output []byte, gasUsed uint64, t time.Duration, err error) } @@ -254,16 +264,17 @@ func (l *StructLogger) CaptureEnter(env *EVM, type_ CallFrameType, from common.A in := make([]byte, len(input)) copy(in, input) // TODO: should we honor `l.Cfg.Limit` for frames too? - frame := StructFrame{type_.String(), from, to, in, gas, new(big.Int).Set(value), 0, nil} + frame := StructFrame{type_.String(), from, to, in, gas, new(big.Int).Set(value), 0, nil, nil} l.frames = append(l.frames, frame) } -func (l *StructLogger) CaptureExit(env *EVM, output []byte, gasUsed uint64) { +func (l *StructLogger) CaptureExit(env *EVM, output []byte, gasUsed uint64, err error) { frame := l.frames[len(l.frames)-1] frame.GasUsed = gasUsed out := make([]byte, len(output)) copy(out, output) frame.Output = out + frame.Err = err } // StructLogs returns the captured log entries. diff --git a/core/vm/logger_json.go b/core/vm/logger_json.go index a9e3d47ac9c7..c2c373189714 100644 --- a/core/vm/logger_json.go +++ b/core/vm/logger_json.go @@ -101,10 +101,11 @@ func (l *JSONLogger) CaptureEnter(env *EVM, type_ CallFrameType, from common.Add l.encoder.Encode(frame) } -func (l *JSONLogger) CaptureExit(env *EVM, output []byte, gasUsed uint64) { +func (l *JSONLogger) CaptureExit(env *EVM, output []byte, gasUsed uint64, err error) { type exitLog struct { Output hexutil.Bytes `json:"output"` GasUsed math.HexOrDecimal64 `json:"gasUsed"` + Err string `json:"error,omitempty"` } - l.encoder.Encode(exitLog{output, math.HexOrDecimal64(gasUsed)}) + l.encoder.Encode(exitLog{output, math.HexOrDecimal64(gasUsed), err.Error()}) } diff --git a/eth/tracers/internal/tracers/assets.go b/eth/tracers/internal/tracers/assets.go index ea7d1771ea0b..013b06f2e2ea 100644 --- a/eth/tracers/internal/tracers/assets.go +++ b/eth/tracers/internal/tracers/assets.go @@ -3,7 +3,7 @@ // 4byte_tracer.js (2.933kB) // bigram_tracer.js (1.712kB) // call_tracer.js (8.956kB) -// callframe_tracer.js (2.745kB) +// callframe_tracer.js (4.005kB) // evmdis_tracer.js (4.195kB) // noop_tracer.js (1.271kB) // opcount_tracer.js (1.372kB) @@ -138,7 +138,7 @@ func call_tracerJs() (*asset, error) { return a, nil } -var _callframe_tracerJs = []byte("\x1f\x8b\x08\x00\x00\x00\x00\x00\x00\xff\xd4\x54\xc1\x6e\x22\x39\x14\xbc\xf3\x15\xb5\xa7\x10\x2d\xa1\xc3\xac\x34\x07\x66\x19\x89\x8d\x92\x09\x52\x36\x89\x80\x68\x14\x45\x39\x18\xfa\x75\xb7\xb5\xc6\x6e\xd9\xcf\x10\x14\xe5\xdf\x57\x76\x43\xa0\x3b\x24\x9b\xdb\x6a\x38\x35\x76\x55\x3d\xbb\x5e\x3d\x27\x09\xce\x4c\xb9\xb6\x32\x2f\x18\x5f\x4e\xbf\xf4\x30\x2d\x08\xb9\x39\x21\x2e\xc8\x92\x5f\x60\xe8\xb9\x30\xd6\xb5\x92\x04\xd3\x42\x3a\x64\x52\x11\xa4\x43\x29\x2c\xc3\x64\xe0\x06\x5e\xc9\x99\x15\x76\xdd\x6d\x25\x49\xc5\x39\xb8\x1d\x14\x32\x4b\x04\x67\x32\x5e\x09\x4b\x7d\xac\x8d\xc7\x5c\x68\x58\x4a\xa5\x63\x2b\x67\x9e\x09\x92\x21\x74\x9a\x18\x8b\x85\x49\x65\xb6\x0e\x92\x92\xe1\x75\x4a\x36\x96\x66\xb2\x0b\xb7\x3d\xc7\x8f\xeb\x3b\x5c\x91\x73\x64\xf1\x83\x34\x59\xa1\x70\xeb\x67\x4a\xce\x71\x25\xe7\xa4\x1d\x41\x38\x94\x61\xc5\x15\x94\x62\x16\xe5\x02\xf1\x22\x1c\x65\xb2\x39\x0a\x2e\x8c\xd7\xa9\x60\x69\x74\x07\x24\xc3\xc9\xb1\x24\xeb\xa4\xd1\xf8\x63\x5b\x6a\x23\xd8\x81\xb1\x41\xa4\x2d\x38\x5c\xc0\xc2\x94\x81\x77\x0c\xa1\xd7\x50\x82\x77\xd4\x4f\x18\xb2\xbb\x77\x0a\xa9\x63\x99\xc2\x94\x04\x2e\x04\x87\x5b\xaf\xa4\x52\x98\x11\xbc\xa3\xcc\xab\x4e\x50\x9b\x79\xc6\xcf\xd1\xf4\xf2\xe6\x6e\x8a\xe1\xf5\x3d\x7e\x0e\xc7\xe3\xe1\xf5\xf4\xfe\x1b\x56\x92\x0b\xe3\x19\xb4\xa4\x4a\x4a\x2e\x4a\x25\x29\xc5\x4a\x58\x2b\x34\xaf\x61\xb2\xa0\xf0\xf7\xf9\xf8\xec\x72\x78\x3d\x1d\xfe\x35\xba\x1a\x4d\xef\x61\x2c\x2e\x46\xd3\xeb\xf3\xc9\x04\x17\x37\x63\x0c\x71\x3b\x1c\x4f\x47\x67\x77\x57\xc3\x31\x6e\xef\xc6\xb7\x37\x93\xf3\x2e\x26\x14\x4e\x45\x81\xff\xdf\x9e\x67\xb1\x7b\x96\x90\x12\x0b\xa9\xdc\xd6\x89\x7b\xe3\xe1\x0a\xe3\x55\x8a\x42\x2c\x09\x96\xe6\x24\x97\x94\x42\x60\x6e\xca\xf5\xa7\x9b\x1a\xb4\x84\x32\x3a\x8f\x77\x7e\x37\x90\x18\x65\xd0\x86\x3b\x70\x44\xf8\xb3\x60\x2e\xfb\x49\xb2\x5a\xad\xba\xb9\xf6\x5d\x63\xf3\x44\x55\x72\x2e\xf9\xde\x6d\xb5\x82\xe8\x5c\x28\x75\x61\xc5\x82\xa6\x56\xcc\xc9\x06\xdf\x5d\x94\xd7\xb4\x8a\x9b\xc8\xc2\x2e\xd8\x8a\xb9\xd4\x39\x16\xc4\x85\x49\x1d\xd8\xc0\x52\x69\x2c\x6f\x3a\x05\xa9\x33\x63\x17\x31\x51\xf1\xb0\xb3\xd0\x18\xa9\x99\xac\x16\x0a\x0b\x72\x4e\xe4\x14\x53\x2c\x82\x98\x76\x62\xce\x31\x32\xcf\x2d\x00\xb1\x94\x63\x31\xff\xa7\x8f\x87\xe7\x97\xc7\x4e\x5c\x74\x4c\x65\x1f\x99\xd7\x11\xda\x56\x26\xef\x20\x9d\x1d\xe3\xf9\xa5\xda\xcf\x84\x57\x7c\x10\x10\xb7\xc3\x6f\x29\x2c\x14\x69\x0c\xc0\x85\x74\xdd\xd7\x32\x5d\x45\x3a\xe7\xe2\x15\x27\x33\xb4\x03\xee\x3b\x7a\xfb\xf4\xad\x44\x74\xe2\x8d\x46\x69\xca\xf6\x71\x0d\x1b\x64\xea\xa0\x07\x45\xfa\xa4\xf7\x58\x2d\x60\x30\x18\xc4\xc1\xce\xa4\xa6\xb4\x59\x28\xfc\x3e\x24\xe3\xe1\xb1\x46\x78\x69\x7d\x92\xda\x2d\xbd\x2b\xda\xe1\x73\x77\xdc\x8a\xbc\x71\xd2\x92\xab\x5b\x39\xe7\xa7\xa6\x95\x49\x82\x5b\x4b\x65\x78\x3d\x8c\x0f\x53\xbf\x69\x6a\x6c\x7d\xeb\x80\x5b\xf5\xdb\xf1\xba\xa4\x7e\x6c\x35\x3f\x75\xc3\x9f\x4e\x6d\x3b\xb3\x66\x11\xb7\xd9\x5c\xd2\x53\xa8\xdf\x0d\x4b\xc7\x75\x14\x9b\xfe\xf6\x63\x8b\x62\xd3\xc0\x2c\x85\xf2\xb1\xd2\xd1\xe9\xd3\x11\x7e\x8f\xf5\xe2\x5a\x97\xcd\x84\xad\xd4\x79\xbb\xf7\xb5\xc1\xc9\x85\xab\x84\x37\x9c\x99\xcc\x47\x9a\xa3\x7e\x2e\xdc\xf1\xc7\xcc\x3b\x47\x69\xff\x30\x33\x6c\x7d\xc4\x96\xba\xf4\xdc\xaf\xdd\x27\x2e\x35\x60\xc6\x73\x85\xdb\xc1\xaa\xa5\x3d\xdc\x4b\x2d\xcb\x8d\x30\x9c\x6e\x33\xf4\xdb\xfb\x01\x0c\x80\xd7\xa4\xbd\xc3\xff\x76\xa0\x9c\x25\xf6\x56\x57\x4d\xdf\xcf\x14\x85\xe1\xdf\x8b\x54\x7c\x48\x9a\xb3\xf9\x41\x54\x22\xfe\xdd\xa4\x54\x4e\x54\x98\x77\x82\xb2\x0f\x79\x93\x92\x8d\xf3\xfb\x98\x43\xce\xc7\x60\xd4\x5b\x5b\x81\xeb\xb1\x38\xea\x7d\x3d\x3a\x1c\xc3\x0d\xb7\x22\x35\x62\xd8\x60\xed\x2c\x6d\xbe\x33\xf5\xe9\xdd\xfa\xfb\x24\xb9\x69\xef\x38\xce\xf1\xff\xf8\x00\xc6\x10\xe5\xc2\x79\x47\x29\x06\x87\x9c\xab\x8e\x78\x60\x38\xa2\x1b\x6f\xc5\xaa\xa0\x87\xda\xbb\x56\x6d\x34\x36\x33\x50\xe3\x84\x3b\x9c\x0c\xd0\xfb\xe5\x9f\xe5\x97\xd6\xbf\x01\x00\x00\xff\xff\x3a\xea\x31\x74\xb9\x0a\x00\x00") +var _callframe_tracerJs = []byte("\x1f\x8b\x08\x00\x00\x00\x00\x00\x00\xff\xd4\x57\x51\x6f\xdb\xb8\x0f\x7f\x76\x3e\x05\xff\x7d\x58\x1b\x2c\x8b\xdb\xfd\x81\x3d\x64\xcb\x80\xdc\xb0\x6e\x05\x7a\x5d\x91\xa6\x18\x8a\xa2\x0f\x4a\x4c\xc7\xda\x14\xc9\x90\xe8\xa6\xb9\x2e\xdf\xfd\x40\xc9\x4e\x6c\x37\xe9\x7a\x4f\x87\xeb\x53\x4d\xfe\xf8\x23\x45\x91\x14\x13\xc7\xf0\xc9\xe4\x2b\x2b\xe7\x19\xc1\xdb\xe3\xb7\x27\x30\xc9\x10\xe6\xe6\x0d\x52\x86\x16\x8b\x05\x8c\x0a\xca\x8c\x75\x9d\x38\x86\x49\x26\x1d\xa4\x52\x21\x48\x07\xb9\xb0\x04\x26\x05\x6a\xe1\x95\x9c\x5a\x61\x57\xfd\x4e\x1c\x07\x9b\x9d\x6a\x66\x48\x2d\x22\x38\x93\xd2\x52\x58\x1c\xc0\xca\x14\x30\x13\x1a\x2c\x26\xd2\x91\x95\xd3\x82\x10\x24\x81\xd0\x49\x6c\x2c\x2c\x4c\x22\xd3\x15\x53\x4a\x82\x42\x27\x68\xbd\x6b\x42\xbb\x70\x55\x1c\x5f\x2e\xae\xe1\x1c\x9d\x43\x0b\x5f\x50\xa3\x15\x0a\x2e\x8b\xa9\x92\x33\x38\x97\x33\xd4\x0e\x41\x38\xc8\x59\xe2\x32\x4c\x60\xea\xe9\xd8\xf0\x94\x43\xb9\x2a\x43\x81\x53\x53\xe8\x44\x90\x34\xba\x07\x28\x39\x72\xb8\x47\xeb\xa4\xd1\xf0\xff\xca\x55\x49\xd8\x03\x63\x99\xe4\x48\x10\x1f\xc0\x82\xc9\xd9\xae\x0b\x42\xaf\x40\x09\xda\x9a\xbe\x20\x21\xdb\x73\x27\x20\xb5\x77\x93\x99\x1c\x81\x32\x41\x7c\xea\xa5\x54\x0a\xa6\x08\x85\xc3\xb4\x50\x3d\x66\x9b\x16\x04\xdf\xcf\x26\x5f\xbf\x5d\x4f\x60\x74\x71\x03\xdf\x47\xe3\xf1\xe8\x62\x72\xf3\x1e\x96\x92\x32\x53\x10\xe0\x3d\x06\x2a\xb9\xc8\x95\xc4\x04\x96\xc2\x5a\xa1\x69\x05\x26\x65\x86\x3f\x3f\x8f\x3f\x7d\x1d\x5d\x4c\x46\x7f\x9c\x9d\x9f\x4d\x6e\xc0\x58\x38\x3d\x9b\x5c\x7c\xbe\xba\x82\xd3\x6f\x63\x18\xc1\xe5\x68\x3c\x39\xfb\x74\x7d\x3e\x1a\xc3\xe5\xf5\xf8\xf2\xdb\xd5\xe7\x3e\x5c\x21\x47\x85\x6c\xff\xfb\x9c\xa7\xfe\xf6\x2c\x42\x82\x24\xa4\x72\x55\x26\x6e\x4c\x01\x2e\x33\x85\x4a\x20\x13\xf7\x08\x16\x67\x28\xef\x31\x01\x01\x33\x93\xaf\x5e\x7c\xa9\xcc\x25\x94\xd1\x73\x7f\xe6\xbd\x05\x09\x67\x29\x68\x43\x3d\x70\x88\xf0\x21\x23\xca\x07\x71\xbc\x5c\x2e\xfb\x73\x5d\xf4\x8d\x9d\xc7\x2a\xd0\xb9\xf8\x63\xbf\xd3\x61\xd2\x99\x50\xea\xd4\x8a\x05\x4e\xac\x98\xa1\xe5\xbc\x3b\x4f\xaf\x71\xe9\x95\x90\xb2\x16\xc8\x8a\x99\xd4\x73\x58\x20\x65\x26\x71\x40\x06\x2c\xe6\xc6\x52\x79\x53\x20\x75\x6a\xec\xc2\x57\x94\x0f\x76\xca\x17\x23\x35\xa1\xd5\x42\xc1\x02\x9d\x13\x73\xf4\x55\x2c\x98\x4c\x3b\x31\x23\x5f\x32\x8f\x1d\x00\xf0\xae\x1c\x89\xd9\xcf\x01\xdc\x3e\xae\xef\x7a\x5e\xe8\x08\xf3\x01\xa4\x85\xf6\xd0\x23\x65\xe6\x3d\x48\xa6\x5d\x78\x5c\x07\x7d\x2a\x0a\x45\x3b\x01\x5e\xcd\x7f\xf7\xc2\x82\x42\x0d\x43\xa0\x4c\xba\xfe\xc6\x4d\x5f\xa1\x9e\x53\xb6\xc1\xc9\x14\x8e\x18\xf7\x11\x4e\xea\xe6\x15\x85\xcf\xc4\x13\x8e\xdc\xe4\x47\xdd\x06\x96\x69\x9a\xa0\x5b\x85\xfa\xcd\xc9\x5d\x10\xc0\x70\x38\xf4\x8d\x9d\x4a\x8d\x49\xdb\x11\xff\x3d\x6b\x0c\xb7\x77\x0d\x83\x75\xe7\x85\xa6\xfd\xbc\x70\xd9\x11\xff\xbb\x0d\x37\x18\x97\x99\xb4\xe8\x9a\xa9\x9c\xd1\x43\x3b\x95\x71\x0c\x97\x16\x73\x9e\x1e\xa6\xe0\xae\x2f\x2f\xd5\x5f\x7d\x23\xe1\x81\x0d\x86\xad\xf3\xd1\x2a\xc7\x81\xbf\x6c\x7a\xe8\xf3\x47\xaf\xa1\x4e\xad\x59\x78\x35\x99\xaf\xf8\xc0\x11\xf4\x59\xd4\x6d\xa2\xc8\x0c\xaa\x7f\x2a\x14\x99\x16\xe6\x5e\xa8\xc2\x7b\x3a\x3c\x7e\x38\x84\xd7\xde\x9f\x97\xf5\xc9\x5c\x91\x95\x7a\x7e\x74\xf2\xae\x65\x33\x17\x2e\x10\x97\x36\x53\x39\x3f\xd3\xe4\xf9\xe7\xc2\x75\x9f\xb7\xbc\x76\x98\x0c\x76\x5b\xb2\xea\x39\x6b\xa9\xf3\x82\x06\x8d\xf3\x78\x51\x0b\x66\x0a\x0a\xb8\x2d\x2c\x88\x6a\xb8\x75\xa3\x9a\x5b\xe5\x70\x5c\x55\xd1\xff\xf6\x97\x60\xb8\xb7\x4d\xb5\xed\x61\x78\xb1\x3f\xb4\xd6\xd8\x17\xf8\x0b\xb8\x5d\xfe\xbc\x66\xeb\x0f\x50\x39\xf4\xce\xf8\xfc\xff\x94\x7e\x63\xb3\xe7\x00\x0d\x78\x83\x16\x5e\xbd\xda\xa1\x3e\xc0\x07\x9c\x15\xdc\x2d\x60\xf1\x1e\x2d\x61\x72\x00\xbf\x7e\x55\x6e\xc3\xf5\x70\xc7\x1f\x1c\x3f\x1c\x74\x9b\xa1\x25\xa8\x90\xb0\x09\xad\x85\xd5\xd9\x1e\x81\x0a\xab\x43\x66\x52\xa9\x85\x92\x7f\x61\x19\x49\xb7\xde\xbf\xc8\x83\xb6\xd6\xbe\x7e\x68\xb7\xe7\x60\x39\xc4\x76\x35\xa5\xc7\xef\xed\xc9\x50\x73\x01\xb3\xa7\x25\xeb\x90\x27\xfd\x58\xd6\x78\x1d\xb3\xab\xc6\x7d\x0b\x36\x9b\x28\x80\x9b\x0d\x78\x78\xf2\xee\x70\x77\xc3\x97\xb6\xc1\xa8\xd5\xf0\x2d\xab\xed\xd5\xb7\x67\x7a\x73\x52\x56\xf9\x7d\x90\xd4\x4e\xef\x38\x5c\xc3\xbf\xf7\xd8\xb0\xae\x1a\x31\x30\xdc\x95\xb9\x10\xe2\x8e\x31\xe4\xb3\xf1\x94\xac\xaa\xd9\xfa\x55\x8d\xeb\x35\xfa\xf4\xb5\xab\x63\x7e\xdb\x91\x35\x57\x55\x57\x3e\xb1\x7f\xe6\x85\xe3\x9c\xbd\x19\xc2\xc9\x7f\xfe\xc9\x8d\xe2\x18\xaa\x76\xe6\x9d\xd0\xa2\x20\x74\xbc\x14\xf2\xd5\x9b\xe9\x0f\x9c\xf1\x62\xc5\x0b\x17\xef\x62\x1e\x0a\x09\x3a\x69\x31\x81\x54\xa2\x4a\xc0\xf0\xaf\x03\x5e\x3b\x7f\x38\xa3\x3d\xa1\x43\x2b\x99\xd1\xef\x60\xfd\xf0\x4b\x46\x32\xa9\x96\x33\xa4\x15\xa4\x28\xa8\xb0\xc8\xab\x5b\x2e\x9c\x83\x05\x0a\x2d\xf5\x3c\x2d\x94\x5a\x81\xb1\x09\x32\x79\x98\x2d\xce\x13\x92\xe1\xe5\xce\x3a\x58\x66\x06\x12\xa3\x0f\xcb\x85\x2e\xb7\xc8\xbb\x7a\x0f\x7e\x14\x8e\x78\xa3\xcf\x95\x58\x81\xa4\x7e\x27\xaa\x0e\x55\xdf\x24\x38\x05\xf0\xd8\x89\x22\xae\x6d\x67\x78\x4e\xfa\x29\x14\x45\xd1\x76\x23\xe0\x92\x08\xe3\x27\x8a\xa2\xcd\x26\xe0\xc5\xfc\xe5\xc5\x9b\xa7\x3f\xa0\x8d\x17\x6e\xde\x7a\x2f\xf4\x5f\x5e\xbe\x79\xcf\xab\x2e\xa9\xa4\xe1\xad\xae\xf7\x8e\xd7\x6c\xde\x61\xaf\xf1\x5f\x5e\xbe\x79\x78\x6b\x0d\xe2\x15\xbe\x58\x07\x8d\x72\x0e\x51\xca\x45\xfd\x4c\x72\x11\xe2\xf1\x45\xb1\x81\xfb\x2f\x96\xaf\x3b\x51\xc4\xb7\x78\xc4\xc9\xf9\x89\x2b\xfe\x51\x14\x72\x14\x72\x16\x71\x79\x07\xc1\xed\x4f\x5c\xdd\x3d\x2d\xe7\x28\x8a\xa2\xf2\x39\xa9\xe1\x58\xbc\x2e\xf9\xb7\x14\xfb\x56\x80\xa8\x16\x84\x1c\x1e\xbf\x07\xf9\xa1\x6e\x50\xce\xaf\xf7\x20\x5f\xbf\xae\x5c\xd6\xf5\xb7\xf2\xae\x9a\x57\x9b\x47\xaa\xa5\xef\xd6\x03\x2a\x5f\xb5\x00\xe9\x44\xeb\xce\xba\xf3\x77\x00\x00\x00\xff\xff\xab\xff\x08\xe1\xa5\x0f\x00\x00") func callframe_tracerJsBytes() ([]byte, error) { return bindataRead( @@ -154,7 +154,7 @@ func callframe_tracerJs() (*asset, error) { } info := bindataFileInfo{name: "callframe_tracer.js", size: 0, mode: os.FileMode(0), modTime: time.Unix(0, 0)} - a := &asset{bytes: bytes, info: info, digest: [32]uint8{0xfa, 0xe5, 0xd3, 0xcd, 0xd5, 0x31, 0x27, 0x1a, 0x59, 0xe8, 0x8d, 0xdb, 0x7a, 0xb9, 0xcb, 0x69, 0xf4, 0x1e, 0x1a, 0x1b, 0x9d, 0x25, 0xaf, 0xb3, 0x12, 0x7e, 0x8a, 0x37, 0x37, 0xe1, 0x8b, 0x42}} + a := &asset{bytes: bytes, info: info, digest: [32]uint8{0x75, 0x7d, 0x50, 0x95, 0x88, 0xd9, 0x78, 0xea, 0xd3, 0x61, 0x78, 0x57, 0x7e, 0x72, 0x3a, 0x9, 0xd5, 0x9d, 0x1f, 0xb2, 0x49, 0xc6, 0x8b, 0xcd, 0xf8, 0x2c, 0x3f, 0xc6, 0xe6, 0x2f, 0x5f, 0xd7}} return a, nil } diff --git a/eth/tracers/internal/tracers/callframe_tracer.js b/eth/tracers/internal/tracers/callframe_tracer.js index c3b1908cc0a9..130166ad6bd1 100644 --- a/eth/tracers/internal/tracers/callframe_tracer.js +++ b/eth/tracers/internal/tracers/callframe_tracer.js @@ -32,7 +32,7 @@ }, result: function(ctx, db) { // Prepare outer message info - var call = { + var result = { type: ctx.type, from: toHex(ctx.from), to: toHex(ctx.to), @@ -43,9 +43,18 @@ output: toHex(ctx.output), } if (this.callstack[0].calls !== undefined) { - call.calls = this.callstack[0].calls; + result.calls = this.callstack[0].calls + } + if (this.callstack[0].error !== undefined) { + result.error = this.callstack[0].error + } else if (ctx.error !== undefined) { + result.error = ctx.error + } + if (result.error !== undefined && (result.error !== "execution reverted" || result.output ==="0x")) { + delete result.output } - return call + + return this.finalize(result) }, enter: function(frame) { var call = { @@ -62,8 +71,11 @@ var len = this.callstack.length if (len > 1) { var call = this.callstack.pop() - call.gasused = '0x' + bigInt(frameResult.gasUsed).toString('16') + call.gasUsed = '0x' + bigInt(frameResult.gasUsed).toString('16') call.output = toHex(frameResult.output) + if (frameResult.error !== undefined) { + call.error = frameResult.error + } len -= 1 if (this.callstack[len-1].calls === undefined) { this.callstack[len-1].calls = [] @@ -71,4 +83,33 @@ this.callstack[len-1].calls.push(call) } }, + // finalize recreates a call object using the final desired field oder for json + // serialization. This is a nicety feature to pass meaningfully ordered results + // to users who don't interpret it, just display it. + finalize: function(call) { + var sorted = { + type: call.type, + from: call.from, + to: call.to, + value: call.value, + gas: call.gas, + gasUsed: call.gasUsed, + input: call.input, + output: call.output, + error: call.error, + time: call.time, + calls: call.calls, + } + for (var key in sorted) { + if (sorted[key] === undefined) { + delete sorted[key] + } + } + if (sorted.calls !== undefined) { + for (var i=0; i Date: Wed, 28 Jul 2021 18:09:08 +0200 Subject: [PATCH 11/47] core,eth: rm unnecessary env field frome enter and exit --- core/vm/access_list_tracer.go | 4 ++-- core/vm/evm.go | 20 ++++++++++---------- core/vm/logger.go | 8 ++++---- core/vm/logger_json.go | 4 ++-- eth/tracers/tracer.go | 6 ++---- 5 files changed, 20 insertions(+), 22 deletions(-) diff --git a/core/vm/access_list_tracer.go b/core/vm/access_list_tracer.go index 860c784e883c..ec9dc4c02ab4 100644 --- a/core/vm/access_list_tracer.go +++ b/core/vm/access_list_tracer.go @@ -166,10 +166,10 @@ func (*AccessListTracer) CaptureFault(env *EVM, pc uint64, op OpCode, gas, cost func (*AccessListTracer) CaptureEnd(output []byte, gasUsed uint64, t time.Duration, err error) {} -func (*AccessListTracer) CaptureEnter(env *EVM, type_ CallFrameType, from common.Address, to common.Address, input []byte, gas uint64, value *big.Int) { +func (*AccessListTracer) CaptureEnter(type_ CallFrameType, from common.Address, to common.Address, input []byte, gas uint64, value *big.Int) { } -func (*AccessListTracer) CaptureExit(env *EVM, output []byte, gasUsed uint64, err error) {} +func (*AccessListTracer) CaptureExit(output []byte, gasUsed uint64, err error) {} // AccessList returns the current accesslist maintained by the tracer. func (a *AccessListTracer) AccessList() types.AccessList { diff --git a/core/vm/evm.go b/core/vm/evm.go index 5b48ae088ea4..40ec7dca350f 100644 --- a/core/vm/evm.go +++ b/core/vm/evm.go @@ -233,9 +233,9 @@ func (evm *EVM) Call(caller ContractRef, addr common.Address, input []byte, gas }(gas, time.Now()) } else if evm.Config.Debug && evm.depth > 0 { // Handle tracer events for entering and exiting a call frame - evm.Config.Tracer.CaptureEnter(evm, CallType, caller.Address(), addr, input, gas, value) + evm.Config.Tracer.CaptureEnter(CallType, caller.Address(), addr, input, gas, value) defer func(startGas uint64) { - evm.Config.Tracer.CaptureExit(evm, ret, startGas-gas, err) + evm.Config.Tracer.CaptureExit(ret, startGas-gas, err) }(gas) } @@ -298,9 +298,9 @@ func (evm *EVM) CallCode(caller ContractRef, addr common.Address, input []byte, // Invoke tracer hooks that signal entering/exiting a call frame if evm.Config.Debug { - evm.Config.Tracer.CaptureEnter(evm, CallCodeType, caller.Address(), addr, input, gas, value) + evm.Config.Tracer.CaptureEnter(CallCodeType, caller.Address(), addr, input, gas, value) defer func(startGas uint64) { - evm.Config.Tracer.CaptureExit(evm, ret, startGas-gas, err) + evm.Config.Tracer.CaptureExit(ret, startGas-gas, err) }(gas) } @@ -342,9 +342,9 @@ func (evm *EVM) DelegateCall(caller ContractRef, addr common.Address, input []by // Invoke tracer hooks that signal entering/exiting a call frame if evm.Config.Debug { - evm.Config.Tracer.CaptureEnter(evm, DelegateCallType, caller.Address(), addr, input, gas, nil) + evm.Config.Tracer.CaptureEnter(DelegateCallType, caller.Address(), addr, input, gas, nil) defer func(startGas uint64) { - evm.Config.Tracer.CaptureExit(evm, ret, startGas-gas, err) + evm.Config.Tracer.CaptureExit(ret, startGas-gas, err) }(gas) } @@ -395,9 +395,9 @@ func (evm *EVM) StaticCall(caller ContractRef, addr common.Address, input []byte // Invoke tracer hooks that signal entering/exiting a call frame if evm.Config.Debug { - evm.Config.Tracer.CaptureEnter(evm, StaticCallType, caller.Address(), addr, input, gas, nil) + evm.Config.Tracer.CaptureEnter(StaticCallType, caller.Address(), addr, input, gas, nil) defer func(startGas uint64) { - evm.Config.Tracer.CaptureExit(evm, ret, startGas-gas, err) + evm.Config.Tracer.CaptureExit(ret, startGas-gas, err) }(gas) } @@ -482,7 +482,7 @@ func (evm *EVM) create(caller ContractRef, codeAndHash *codeAndHash, gas uint64, evm.Config.Tracer.CaptureStart(evm, caller.Address(), address, true, codeAndHash.code, gas, value) } else if evm.Config.Debug && evm.depth > 0 { // TODO: Make sure we should capture init code's call frame for the tracer - evm.Config.Tracer.CaptureEnter(evm, type_, caller.Address(), address, codeAndHash.code, gas, value) + evm.Config.Tracer.CaptureEnter(type_, caller.Address(), address, codeAndHash.code, gas, value) } start := time.Now() @@ -525,7 +525,7 @@ func (evm *EVM) create(caller ContractRef, codeAndHash *codeAndHash, gas uint64, if evm.Config.Debug && evm.depth == 0 { evm.Config.Tracer.CaptureEnd(ret, gas-contract.Gas, time.Since(start), err) } else if evm.Config.Debug && evm.depth > 0 { - evm.Config.Tracer.CaptureExit(evm, ret, gas-contract.Gas, err) + evm.Config.Tracer.CaptureExit(ret, gas-contract.Gas, err) } return ret, address, contract.Gas, err } diff --git a/core/vm/logger.go b/core/vm/logger.go index db9b1b480a81..e8e810b64d2d 100644 --- a/core/vm/logger.go +++ b/core/vm/logger.go @@ -138,8 +138,8 @@ type structFrameMarshaling struct { type Tracer interface { CaptureStart(env *EVM, from common.Address, to common.Address, create bool, input []byte, gas uint64, value *big.Int) CaptureState(env *EVM, pc uint64, op OpCode, gas, cost uint64, scope *ScopeContext, rData []byte, depth int, err error) - CaptureEnter(env *EVM, type_ CallFrameType, from common.Address, to common.Address, input []byte, gas uint64, value *big.Int) - CaptureExit(env *EVM, output []byte, gasUsed uint64, err error) + CaptureEnter(type_ CallFrameType, from common.Address, to common.Address, input []byte, gas uint64, value *big.Int) + CaptureExit(output []byte, gasUsed uint64, err error) CaptureFault(env *EVM, pc uint64, op OpCode, gas, cost uint64, scope *ScopeContext, depth int, err error) CaptureEnd(output []byte, gasUsed uint64, t time.Duration, err error) } @@ -260,7 +260,7 @@ func (l *StructLogger) CaptureEnd(output []byte, gasUsed uint64, t time.Duration } } -func (l *StructLogger) CaptureEnter(env *EVM, type_ CallFrameType, from common.Address, to common.Address, input []byte, gas uint64, value *big.Int) { +func (l *StructLogger) CaptureEnter(type_ CallFrameType, from common.Address, to common.Address, input []byte, gas uint64, value *big.Int) { in := make([]byte, len(input)) copy(in, input) // TODO: should we honor `l.Cfg.Limit` for frames too? @@ -268,7 +268,7 @@ func (l *StructLogger) CaptureEnter(env *EVM, type_ CallFrameType, from common.A l.frames = append(l.frames, frame) } -func (l *StructLogger) CaptureExit(env *EVM, output []byte, gasUsed uint64, err error) { +func (l *StructLogger) CaptureExit(output []byte, gasUsed uint64, err error) { frame := l.frames[len(l.frames)-1] frame.GasUsed = gasUsed out := make([]byte, len(output)) diff --git a/core/vm/logger_json.go b/core/vm/logger_json.go index c2c373189714..ac760672a4f0 100644 --- a/core/vm/logger_json.go +++ b/core/vm/logger_json.go @@ -89,7 +89,7 @@ func (l *JSONLogger) CaptureEnd(output []byte, gasUsed uint64, t time.Duration, l.encoder.Encode(endLog{common.Bytes2Hex(output), math.HexOrDecimal64(gasUsed), t, errMsg}) } -func (l *JSONLogger) CaptureEnter(env *EVM, type_ CallFrameType, from common.Address, to common.Address, input []byte, gas uint64, value *big.Int) { +func (l *JSONLogger) CaptureEnter(type_ CallFrameType, from common.Address, to common.Address, input []byte, gas uint64, value *big.Int) { frame := StructFrame{ Type: type_.String(), From: from, @@ -101,7 +101,7 @@ func (l *JSONLogger) CaptureEnter(env *EVM, type_ CallFrameType, from common.Add l.encoder.Encode(frame) } -func (l *JSONLogger) CaptureExit(env *EVM, output []byte, gasUsed uint64, err error) { +func (l *JSONLogger) CaptureExit(output []byte, gasUsed uint64, err error) { type exitLog struct { Output hexutil.Bytes `json:"output"` GasUsed math.HexOrDecimal64 `json:"gasUsed"` diff --git a/eth/tracers/tracer.go b/eth/tracers/tracer.go index 4ae941310c69..d4efcbfc5ca4 100644 --- a/eth/tracers/tracer.go +++ b/eth/tracers/tracer.go @@ -662,9 +662,7 @@ func (jst *Tracer) CaptureEnd(output []byte, gasUsed uint64, t time.Duration, er } } -func (jst *Tracer) CaptureEnter(env *vm.EVM, type_ vm.CallFrameType, from common.Address, to common.Address, input []byte, gas uint64, value *big.Int) { - // TODO: Do we need env? - +func (jst *Tracer) CaptureEnter(type_ vm.CallFrameType, from common.Address, to common.Address, input []byte, gas uint64, value *big.Int) { if !jst.traceCallFrames { return } @@ -692,7 +690,7 @@ func (jst *Tracer) CaptureEnter(env *vm.EVM, type_ vm.CallFrameType, from common } } -func (jst *Tracer) CaptureExit(env *vm.EVM, output []byte, gasUsed uint64, err error) { +func (jst *Tracer) CaptureExit(output []byte, gasUsed uint64, err error) { if !jst.traceCallFrames { return } From 8bfc448406bd198744e8655611a669b34df1a01a Mon Sep 17 00:00:00 2001 From: Sina Mahmoodi Date: Mon, 2 Aug 2021 17:40:11 +0200 Subject: [PATCH 12/47] core/vm: rm extra fields from structFrameMarshaling --- core/vm/logger.go | 3 --- 1 file changed, 3 deletions(-) diff --git a/core/vm/logger.go b/core/vm/logger.go index e8e810b64d2d..4e6d268e598b 100644 --- a/core/vm/logger.go +++ b/core/vm/logger.go @@ -121,9 +121,6 @@ func (s *StructFrame) ErrorString() string { } type structFrameMarshaling struct { - Type string `json:"type"` - From common.Address `json:"from"` - To common.Address `json:"to"` Input hexutil.Bytes `json:"input"` Gas math.HexOrDecimal64 `json:"gas"` Value *math.HexOrDecimal256 `json:"value"` From fdb6341f4f9a106589a1e32c2de1f0c6afa588a0 Mon Sep 17 00:00:00 2001 From: Sina Mahmoodi Date: Mon, 2 Aug 2021 17:46:28 +0200 Subject: [PATCH 13/47] core,eth: rename callframe type var to typ --- core/vm/access_list_tracer.go | 2 +- core/vm/evm.go | 4 ++-- core/vm/logger.go | 8 ++++---- core/vm/logger_json.go | 4 ++-- eth/tracers/tracer.go | 4 ++-- 5 files changed, 11 insertions(+), 11 deletions(-) diff --git a/core/vm/access_list_tracer.go b/core/vm/access_list_tracer.go index ec9dc4c02ab4..edbc0ec7752d 100644 --- a/core/vm/access_list_tracer.go +++ b/core/vm/access_list_tracer.go @@ -166,7 +166,7 @@ func (*AccessListTracer) CaptureFault(env *EVM, pc uint64, op OpCode, gas, cost func (*AccessListTracer) CaptureEnd(output []byte, gasUsed uint64, t time.Duration, err error) {} -func (*AccessListTracer) CaptureEnter(type_ CallFrameType, from common.Address, to common.Address, input []byte, gas uint64, value *big.Int) { +func (*AccessListTracer) CaptureEnter(typ CallFrameType, from common.Address, to common.Address, input []byte, gas uint64, value *big.Int) { } func (*AccessListTracer) CaptureExit(output []byte, gasUsed uint64, err error) {} diff --git a/core/vm/evm.go b/core/vm/evm.go index 40ec7dca350f..eab11389ad3e 100644 --- a/core/vm/evm.go +++ b/core/vm/evm.go @@ -440,7 +440,7 @@ func (c *codeAndHash) Hash() common.Hash { } // create creates a new contract using code as deployment code. -func (evm *EVM) create(caller ContractRef, codeAndHash *codeAndHash, gas uint64, value *big.Int, address common.Address, type_ CallFrameType) ([]byte, common.Address, uint64, error) { +func (evm *EVM) create(caller ContractRef, codeAndHash *codeAndHash, gas uint64, value *big.Int, address common.Address, typ CallFrameType) ([]byte, common.Address, uint64, error) { // Depth check execution. Fail if we're trying to execute above the // limit. if evm.depth > int(params.CallCreateDepth) { @@ -482,7 +482,7 @@ func (evm *EVM) create(caller ContractRef, codeAndHash *codeAndHash, gas uint64, evm.Config.Tracer.CaptureStart(evm, caller.Address(), address, true, codeAndHash.code, gas, value) } else if evm.Config.Debug && evm.depth > 0 { // TODO: Make sure we should capture init code's call frame for the tracer - evm.Config.Tracer.CaptureEnter(type_, caller.Address(), address, codeAndHash.code, gas, value) + evm.Config.Tracer.CaptureEnter(typ, caller.Address(), address, codeAndHash.code, gas, value) } start := time.Now() diff --git a/core/vm/logger.go b/core/vm/logger.go index 4e6d268e598b..19753c404e3d 100644 --- a/core/vm/logger.go +++ b/core/vm/logger.go @@ -135,7 +135,7 @@ type structFrameMarshaling struct { type Tracer interface { CaptureStart(env *EVM, from common.Address, to common.Address, create bool, input []byte, gas uint64, value *big.Int) CaptureState(env *EVM, pc uint64, op OpCode, gas, cost uint64, scope *ScopeContext, rData []byte, depth int, err error) - CaptureEnter(type_ CallFrameType, from common.Address, to common.Address, input []byte, gas uint64, value *big.Int) + CaptureEnter(typ CallFrameType, from common.Address, to common.Address, input []byte, gas uint64, value *big.Int) CaptureExit(output []byte, gasUsed uint64, err error) CaptureFault(env *EVM, pc uint64, op OpCode, gas, cost uint64, scope *ScopeContext, depth int, err error) CaptureEnd(output []byte, gasUsed uint64, t time.Duration, err error) @@ -257,11 +257,11 @@ func (l *StructLogger) CaptureEnd(output []byte, gasUsed uint64, t time.Duration } } -func (l *StructLogger) CaptureEnter(type_ CallFrameType, from common.Address, to common.Address, input []byte, gas uint64, value *big.Int) { +func (l *StructLogger) CaptureEnter(typ CallFrameType, from common.Address, to common.Address, input []byte, gas uint64, value *big.Int) { in := make([]byte, len(input)) copy(in, input) // TODO: should we honor `l.Cfg.Limit` for frames too? - frame := StructFrame{type_.String(), from, to, in, gas, new(big.Int).Set(value), 0, nil, nil} + frame := StructFrame{typ.String(), from, to, in, gas, new(big.Int).Set(value), 0, nil, nil} l.frames = append(l.frames, frame) } @@ -395,7 +395,7 @@ func (t *mdLogger) CaptureEnd(output []byte, gasUsed uint64, tm time.Duration, e output, gasUsed, err) } -func (t *mdLogger) CaptureEnter(env *EVM, type_ CallFrameType, from common.Address, to common.Address, input []byte, gas uint64, value *big.Int) { +func (t *mdLogger) CaptureEnter(env *EVM, typ CallFrameType, from common.Address, to common.Address, input []byte, gas uint64, value *big.Int) { // TODO } diff --git a/core/vm/logger_json.go b/core/vm/logger_json.go index ac760672a4f0..360162512a4c 100644 --- a/core/vm/logger_json.go +++ b/core/vm/logger_json.go @@ -89,9 +89,9 @@ func (l *JSONLogger) CaptureEnd(output []byte, gasUsed uint64, t time.Duration, l.encoder.Encode(endLog{common.Bytes2Hex(output), math.HexOrDecimal64(gasUsed), t, errMsg}) } -func (l *JSONLogger) CaptureEnter(type_ CallFrameType, from common.Address, to common.Address, input []byte, gas uint64, value *big.Int) { +func (l *JSONLogger) CaptureEnter(typ CallFrameType, from common.Address, to common.Address, input []byte, gas uint64, value *big.Int) { frame := StructFrame{ - Type: type_.String(), + Type: typ.String(), From: from, To: to, Input: input, diff --git a/eth/tracers/tracer.go b/eth/tracers/tracer.go index d4efcbfc5ca4..816c29f08b9c 100644 --- a/eth/tracers/tracer.go +++ b/eth/tracers/tracer.go @@ -662,7 +662,7 @@ func (jst *Tracer) CaptureEnd(output []byte, gasUsed uint64, t time.Duration, er } } -func (jst *Tracer) CaptureEnter(type_ vm.CallFrameType, from common.Address, to common.Address, input []byte, gas uint64, value *big.Int) { +func (jst *Tracer) CaptureEnter(typ vm.CallFrameType, from common.Address, to common.Address, input []byte, gas uint64, value *big.Int) { if !jst.traceCallFrames { return } @@ -677,7 +677,7 @@ func (jst *Tracer) CaptureEnter(type_ vm.CallFrameType, from common.Address, to // Transform the frame into a JavaScript object and inject into the state obj := jst.vm.PushObject() - jst.addToObj(obj, "type", type_.String()) + jst.addToObj(obj, "type", typ.String()) jst.addToObj(obj, "from", from) jst.addToObj(obj, "to", to) jst.addToObj(obj, "input", input) From 416a747eb332882821c6ecc7c9af2d204465fec4 Mon Sep 17 00:00:00 2001 From: Martin Holst Swende Date: Fri, 10 Sep 2021 13:41:04 +0200 Subject: [PATCH 14/47] core/vm: move debug-code away from hot-code --- core/vm/evm.go | 36 ++++++++++++++++++++---------------- 1 file changed, 20 insertions(+), 16 deletions(-) diff --git a/core/vm/evm.go b/core/vm/evm.go index eab11389ad3e..385d2a593f1d 100644 --- a/core/vm/evm.go +++ b/core/vm/evm.go @@ -226,17 +226,19 @@ func (evm *EVM) Call(caller ContractRef, addr common.Address, input []byte, gas evm.Context.Transfer(evm.StateDB, caller.Address(), addr, value) // Capture the tracer start/end events in debug mode - if evm.Config.Debug && evm.depth == 0 { - evm.Config.Tracer.CaptureStart(evm, caller.Address(), addr, false, input, gas, value) - defer func(startGas uint64, startTime time.Time) { // Lazy evaluation of the parameters - evm.Config.Tracer.CaptureEnd(ret, startGas-gas, time.Since(startTime), err) - }(gas, time.Now()) - } else if evm.Config.Debug && evm.depth > 0 { - // Handle tracer events for entering and exiting a call frame - evm.Config.Tracer.CaptureEnter(CallType, caller.Address(), addr, input, gas, value) - defer func(startGas uint64) { - evm.Config.Tracer.CaptureExit(ret, startGas-gas, err) - }(gas) + if evm.Config.Debug { + if evm.depth == 0 { + evm.Config.Tracer.CaptureStart(evm, caller.Address(), addr, false, input, gas, value) + defer func(startGas uint64, startTime time.Time) { // Lazy evaluation of the parameters + evm.Config.Tracer.CaptureEnd(ret, startGas-gas, time.Since(startTime), err) + }(gas, time.Now()) + } else { + // Handle tracer events for entering and exiting a call frame + evm.Config.Tracer.CaptureEnter(CallType, caller.Address(), addr, input, gas, value) + defer func(startGas uint64) { + evm.Config.Tracer.CaptureExit(ret, startGas-gas, err) + }(gas) + } } if isPrecompile { @@ -478,11 +480,13 @@ func (evm *EVM) create(caller ContractRef, codeAndHash *codeAndHash, gas uint64, return nil, address, gas, nil } - if evm.Config.Debug && evm.depth == 0 { - evm.Config.Tracer.CaptureStart(evm, caller.Address(), address, true, codeAndHash.code, gas, value) - } else if evm.Config.Debug && evm.depth > 0 { - // TODO: Make sure we should capture init code's call frame for the tracer - evm.Config.Tracer.CaptureEnter(typ, caller.Address(), address, codeAndHash.code, gas, value) + if evm.Config.Debug { + if evm.depth == 0 { + evm.Config.Tracer.CaptureStart(evm, caller.Address(), address, true, codeAndHash.code, gas, value) + } else { + // TODO: Make sure we should capture init code's call frame for the tracer + evm.Config.Tracer.CaptureEnter(typ, caller.Address(), address, codeAndHash.code, gas, value) + } } start := time.Now() From 76e084905b73daf0bbad6d26ec616f098d585008 Mon Sep 17 00:00:00 2001 From: Martin Holst Swende Date: Fri, 10 Sep 2021 13:50:26 +0200 Subject: [PATCH 15/47] core/vm: remove redefinition of calltypes --- core/vm/access_list_tracer.go | 2 +- core/vm/evm.go | 47 ++++++----------------------------- core/vm/logger.go | 6 ++--- core/vm/logger_json.go | 2 +- eth/tracers/tracer.go | 2 +- eth/tracers/tracer_test.go | 6 ++--- 6 files changed, 15 insertions(+), 50 deletions(-) diff --git a/core/vm/access_list_tracer.go b/core/vm/access_list_tracer.go index edbc0ec7752d..11b4e294263e 100644 --- a/core/vm/access_list_tracer.go +++ b/core/vm/access_list_tracer.go @@ -166,7 +166,7 @@ func (*AccessListTracer) CaptureFault(env *EVM, pc uint64, op OpCode, gas, cost func (*AccessListTracer) CaptureEnd(output []byte, gasUsed uint64, t time.Duration, err error) {} -func (*AccessListTracer) CaptureEnter(typ CallFrameType, from common.Address, to common.Address, input []byte, gas uint64, value *big.Int) { +func (*AccessListTracer) CaptureEnter(typ OpCode, from common.Address, to common.Address, input []byte, gas uint64, value *big.Int) { } func (*AccessListTracer) CaptureExit(output []byte, gasUsed uint64, err error) {} diff --git a/core/vm/evm.go b/core/vm/evm.go index 385d2a593f1d..6d8bfa8da827 100644 --- a/core/vm/evm.go +++ b/core/vm/evm.go @@ -17,7 +17,6 @@ package vm import ( - "fmt" "math/big" "sync/atomic" "time" @@ -32,38 +31,6 @@ import ( // deployed contract addresses (relevant after the account abstraction). var emptyCodeHash = crypto.Keccak256Hash(nil) -// Type of an executing call frame -type CallFrameType int - -const ( - CallType CallFrameType = iota - CallCodeType - DelegateCallType - StaticCallType - // Init code execution - CreateType - Create2Type -) - -func (t CallFrameType) String() string { - switch t { - case CallType: - return "call" - case CallCodeType: - return "callcode" - case DelegateCallType: - return "delegatecall" - case StaticCallType: - return "staticcall" - case CreateType: - return "create" - case Create2Type: - return "create2" - default: - panic(fmt.Sprintf("unsupported call frame type: %T", t)) - } -} - type ( // CanTransferFunc is the signature of a transfer guard function CanTransferFunc func(StateDB, common.Address, *big.Int) bool @@ -234,7 +201,7 @@ func (evm *EVM) Call(caller ContractRef, addr common.Address, input []byte, gas }(gas, time.Now()) } else { // Handle tracer events for entering and exiting a call frame - evm.Config.Tracer.CaptureEnter(CallType, caller.Address(), addr, input, gas, value) + evm.Config.Tracer.CaptureEnter(CALL, caller.Address(), addr, input, gas, value) defer func(startGas uint64) { evm.Config.Tracer.CaptureExit(ret, startGas-gas, err) }(gas) @@ -300,7 +267,7 @@ func (evm *EVM) CallCode(caller ContractRef, addr common.Address, input []byte, // Invoke tracer hooks that signal entering/exiting a call frame if evm.Config.Debug { - evm.Config.Tracer.CaptureEnter(CallCodeType, caller.Address(), addr, input, gas, value) + evm.Config.Tracer.CaptureEnter(CALLCODE, caller.Address(), addr, input, gas, value) defer func(startGas uint64) { evm.Config.Tracer.CaptureExit(ret, startGas-gas, err) }(gas) @@ -344,7 +311,7 @@ func (evm *EVM) DelegateCall(caller ContractRef, addr common.Address, input []by // Invoke tracer hooks that signal entering/exiting a call frame if evm.Config.Debug { - evm.Config.Tracer.CaptureEnter(DelegateCallType, caller.Address(), addr, input, gas, nil) + evm.Config.Tracer.CaptureEnter(DELEGATECALL, caller.Address(), addr, input, gas, nil) defer func(startGas uint64) { evm.Config.Tracer.CaptureExit(ret, startGas-gas, err) }(gas) @@ -397,7 +364,7 @@ func (evm *EVM) StaticCall(caller ContractRef, addr common.Address, input []byte // Invoke tracer hooks that signal entering/exiting a call frame if evm.Config.Debug { - evm.Config.Tracer.CaptureEnter(StaticCallType, caller.Address(), addr, input, gas, nil) + evm.Config.Tracer.CaptureEnter(STATICCALL, caller.Address(), addr, input, gas, nil) defer func(startGas uint64) { evm.Config.Tracer.CaptureExit(ret, startGas-gas, err) }(gas) @@ -442,7 +409,7 @@ func (c *codeAndHash) Hash() common.Hash { } // create creates a new contract using code as deployment code. -func (evm *EVM) create(caller ContractRef, codeAndHash *codeAndHash, gas uint64, value *big.Int, address common.Address, typ CallFrameType) ([]byte, common.Address, uint64, error) { +func (evm *EVM) create(caller ContractRef, codeAndHash *codeAndHash, gas uint64, value *big.Int, address common.Address, typ OpCode) ([]byte, common.Address, uint64, error) { // Depth check execution. Fail if we're trying to execute above the // limit. if evm.depth > int(params.CallCreateDepth) { @@ -537,7 +504,7 @@ func (evm *EVM) create(caller ContractRef, codeAndHash *codeAndHash, gas uint64, // Create creates a new contract using code as deployment code. func (evm *EVM) Create(caller ContractRef, code []byte, gas uint64, value *big.Int) (ret []byte, contractAddr common.Address, leftOverGas uint64, err error) { contractAddr = crypto.CreateAddress(caller.Address(), evm.StateDB.GetNonce(caller.Address())) - return evm.create(caller, &codeAndHash{code: code}, gas, value, contractAddr, CreateType) + return evm.create(caller, &codeAndHash{code: code}, gas, value, contractAddr, CREATE) } // Create2 creates a new contract using code as deployment code. @@ -547,7 +514,7 @@ func (evm *EVM) Create(caller ContractRef, code []byte, gas uint64, value *big.I func (evm *EVM) Create2(caller ContractRef, code []byte, gas uint64, endowment *big.Int, salt *uint256.Int) (ret []byte, contractAddr common.Address, leftOverGas uint64, err error) { codeAndHash := &codeAndHash{code: code} contractAddr = crypto.CreateAddress2(caller.Address(), salt.Bytes32(), codeAndHash.Hash().Bytes()) - return evm.create(caller, codeAndHash, gas, endowment, contractAddr, Create2Type) + return evm.create(caller, codeAndHash, gas, endowment, contractAddr, CREATE2) } // ChainConfig returns the environment's chain configuration diff --git a/core/vm/logger.go b/core/vm/logger.go index 19753c404e3d..b0b714fdab52 100644 --- a/core/vm/logger.go +++ b/core/vm/logger.go @@ -135,7 +135,7 @@ type structFrameMarshaling struct { type Tracer interface { CaptureStart(env *EVM, from common.Address, to common.Address, create bool, input []byte, gas uint64, value *big.Int) CaptureState(env *EVM, pc uint64, op OpCode, gas, cost uint64, scope *ScopeContext, rData []byte, depth int, err error) - CaptureEnter(typ CallFrameType, from common.Address, to common.Address, input []byte, gas uint64, value *big.Int) + CaptureEnter(typ OpCode, from common.Address, to common.Address, input []byte, gas uint64, value *big.Int) CaptureExit(output []byte, gasUsed uint64, err error) CaptureFault(env *EVM, pc uint64, op OpCode, gas, cost uint64, scope *ScopeContext, depth int, err error) CaptureEnd(output []byte, gasUsed uint64, t time.Duration, err error) @@ -257,7 +257,7 @@ func (l *StructLogger) CaptureEnd(output []byte, gasUsed uint64, t time.Duration } } -func (l *StructLogger) CaptureEnter(typ CallFrameType, from common.Address, to common.Address, input []byte, gas uint64, value *big.Int) { +func (l *StructLogger) CaptureEnter(typ OpCode, from common.Address, to common.Address, input []byte, gas uint64, value *big.Int) { in := make([]byte, len(input)) copy(in, input) // TODO: should we honor `l.Cfg.Limit` for frames too? @@ -395,7 +395,7 @@ func (t *mdLogger) CaptureEnd(output []byte, gasUsed uint64, tm time.Duration, e output, gasUsed, err) } -func (t *mdLogger) CaptureEnter(env *EVM, typ CallFrameType, from common.Address, to common.Address, input []byte, gas uint64, value *big.Int) { +func (t *mdLogger) CaptureEnter(env *EVM, typ OpCode, from common.Address, to common.Address, input []byte, gas uint64, value *big.Int) { // TODO } diff --git a/core/vm/logger_json.go b/core/vm/logger_json.go index 360162512a4c..14254ce44ad3 100644 --- a/core/vm/logger_json.go +++ b/core/vm/logger_json.go @@ -89,7 +89,7 @@ func (l *JSONLogger) CaptureEnd(output []byte, gasUsed uint64, t time.Duration, l.encoder.Encode(endLog{common.Bytes2Hex(output), math.HexOrDecimal64(gasUsed), t, errMsg}) } -func (l *JSONLogger) CaptureEnter(typ CallFrameType, from common.Address, to common.Address, input []byte, gas uint64, value *big.Int) { +func (l *JSONLogger) CaptureEnter(typ OpCode, from common.Address, to common.Address, input []byte, gas uint64, value *big.Int) { frame := StructFrame{ Type: typ.String(), From: from, diff --git a/eth/tracers/tracer.go b/eth/tracers/tracer.go index 816c29f08b9c..523af0528608 100644 --- a/eth/tracers/tracer.go +++ b/eth/tracers/tracer.go @@ -662,7 +662,7 @@ func (jst *Tracer) CaptureEnd(output []byte, gasUsed uint64, t time.Duration, er } } -func (jst *Tracer) CaptureEnter(typ vm.CallFrameType, from common.Address, to common.Address, input []byte, gas uint64, value *big.Int) { +func (jst *Tracer) CaptureEnter(typ vm.OpCode, from common.Address, to common.Address, input []byte, gas uint64, value *big.Int) { if !jst.traceCallFrames { return } diff --git a/eth/tracers/tracer_test.go b/eth/tracers/tracer_test.go index 53866011f384..5a0dd806f338 100644 --- a/eth/tracers/tracer_test.go +++ b/eth/tracers/tracer_test.go @@ -238,7 +238,6 @@ func TestIsPrecompile(t *testing.T) { } func TestEnterExit(t *testing.T) { - vmctx := testCtx() // test that either both or none of enter() and exit() are defined if _, err := New("{step: function() {}, fault: function() {}, result: function() { return null; }, enter: function() {}}", new(Context)); err == nil { t.Fatal("tracer creation should've failed without exit() definition") @@ -253,13 +252,12 @@ func TestEnterExit(t *testing.T) { t.Fatal(err) } - env := vm.NewEVM(vmctx.blockCtx, vmctx.txCtx, &dummyStatedb{}, params.TestChainConfig, vm.Config{Debug: true, Tracer: tracer}) scope := &vm.ScopeContext{ Contract: vm.NewContract(&account{}, &account{}, big.NewInt(0), 0), } - tracer.CaptureEnter(env, vm.CallType, scope.Contract.Caller(), scope.Contract.Address(), []byte{}, 1000, new(big.Int)) - tracer.CaptureExit(env, []byte{}, 400) + tracer.CaptureEnter(vm.CALL, scope.Contract.Caller(), scope.Contract.Address(), []byte{}, 1000, new(big.Int)) + tracer.CaptureExit([]byte{}, 400, nil) have, err := tracer.GetResult() if err != nil { From ada0e6a8cd00b9ded87b4bd060bfc3916e393d19 Mon Sep 17 00:00:00 2001 From: Martin Holst Swende Date: Fri, 10 Sep 2021 14:25:26 +0200 Subject: [PATCH 16/47] eth/tracers: fix crash in tracers --- eth/tracers/tracer.go | 6 +++++- 1 file changed, 5 insertions(+), 1 deletion(-) diff --git a/eth/tracers/tracer.go b/eth/tracers/tracer.go index 523af0528608..986056f3ad25 100644 --- a/eth/tracers/tracer.go +++ b/eth/tracers/tracer.go @@ -682,7 +682,11 @@ func (jst *Tracer) CaptureEnter(typ vm.OpCode, from common.Address, to common.Ad jst.addToObj(obj, "to", to) jst.addToObj(obj, "input", input) jst.addToObj(obj, "gas", gas) - jst.addToObj(obj, "value", value) + if value != nil { + jst.addToObj(obj, "value", value) + } else { + jst.addToObj(obj, "value", new(big.Int)) + } jst.vm.PutPropString(jst.stateObject, "frame") if _, err := jst.call(true, "enter", "frame"); err != nil { From ea632d484db0d529a6392b2ce1bf66049e83c614 Mon Sep 17 00:00:00 2001 From: Martin Holst Swende Date: Fri, 10 Sep 2021 14:26:00 +0200 Subject: [PATCH 17/47] core/vm: fix stack print output --- core/vm/stack.go | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/core/vm/stack.go b/core/vm/stack.go index c71d2653a5cd..220f97c89f64 100644 --- a/core/vm/stack.go +++ b/core/vm/stack.go @@ -91,7 +91,7 @@ func (st *Stack) Print() { fmt.Println("### stack ###") if len(st.data) > 0 { for i, val := range st.data { - fmt.Printf("%-3d %v\n", i, val) + fmt.Printf("%-3d %s\n", i, val.String()) } } else { fmt.Println("-- empty --") From 516d093897f513c3b286196e29ab8ebcc78de2e9 Mon Sep 17 00:00:00 2001 From: Martin Holst Swende Date: Fri, 10 Sep 2021 14:26:37 +0200 Subject: [PATCH 18/47] squashme: fix logger interface --- core/vm/logger.go | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/core/vm/logger.go b/core/vm/logger.go index b0b714fdab52..3aebf46bcd39 100644 --- a/core/vm/logger.go +++ b/core/vm/logger.go @@ -395,10 +395,10 @@ func (t *mdLogger) CaptureEnd(output []byte, gasUsed uint64, tm time.Duration, e output, gasUsed, err) } -func (t *mdLogger) CaptureEnter(env *EVM, typ OpCode, from common.Address, to common.Address, input []byte, gas uint64, value *big.Int) { +func (t *mdLogger) CaptureEnter(typ OpCode, from common.Address, to common.Address, input []byte, gas uint64, value *big.Int) { // TODO } -func (t *mdLogger) CaptureExit(env *EVM, output []byte, gasUsed uint64) { +func (t *mdLogger) CaptureExit(output []byte, gasUsed uint64, err error) { // TODO } From 0f93be4da217ad65cceece630329e78487eebc40 Mon Sep 17 00:00:00 2001 From: Martin Holst Swende Date: Fri, 10 Sep 2021 14:29:46 +0200 Subject: [PATCH 19/47] core/vm/runtime: more comprehensive tracer test --- core/vm/runtime/runtime_test.go | 90 +++++++++++++++++++++++++++++++++ 1 file changed, 90 insertions(+) diff --git a/core/vm/runtime/runtime_test.go b/core/vm/runtime/runtime_test.go index dcf2d0d4478d..af7d992dd363 100644 --- a/core/vm/runtime/runtime_test.go +++ b/core/vm/runtime/runtime_test.go @@ -33,6 +33,7 @@ import ( "github.com/ethereum/go-ethereum/core/state" "github.com/ethereum/go-ethereum/core/types" "github.com/ethereum/go-ethereum/core/vm" + "github.com/ethereum/go-ethereum/eth/tracers" "github.com/ethereum/go-ethereum/params" ) @@ -688,3 +689,92 @@ func TestColdAccountAccessCost(t *testing.T) { } } } + +func TestRuntimeJSTracer(t *testing.T) { + // A does four calls + // CALL to 0xbb + // CALLCODE to 0xcc + // STATICCALL to 0xdd + // DELEGATECALL to 0xee + mainCode := []byte{ + // CALL + // outsize, outoffset, insize, inoffset + byte(vm.PUSH1), 0, byte(vm.PUSH1), 0, byte(vm.PUSH1), 0, byte(vm.PUSH1), 0, + byte(vm.PUSH1), 0, // value + byte(vm.PUSH1), 0xbb, //address + byte(vm.GAS), // gas + byte(vm.CALL), + byte(vm.POP), + // CALLCODE + // outsize, outoffset, insize, inoffset + byte(vm.PUSH1), 0, byte(vm.PUSH1), 0, byte(vm.PUSH1), 0, byte(vm.PUSH1), 0, + byte(vm.PUSH1), 0, // value + byte(vm.PUSH1), 0xcc, //address + byte(vm.GAS), // gas + byte(vm.CALLCODE), + byte(vm.POP), + // STATICCALL + // outsize, outoffset, insize, inoffset + byte(vm.PUSH1), 0, byte(vm.PUSH1), 0, byte(vm.PUSH1), 0, byte(vm.PUSH1), 0, + byte(vm.PUSH1), 0xdd, //address + byte(vm.GAS), // gas + byte(vm.STATICCALL), + byte(vm.POP), + // DELEGATECALL + // outsize, outoffset, insize, inoffset + byte(vm.PUSH1), 0, byte(vm.PUSH1), 0, byte(vm.PUSH1), 0, byte(vm.PUSH1), 0, + byte(vm.PUSH1), 0xee, //address + byte(vm.GAS), // gas + byte(vm.DELEGATECALL), + byte(vm.POP), + } + calleeCode := []byte{ + byte(vm.PUSH1), 0, + byte(vm.PUSH1), 0, + byte(vm.RETURN), + } + main := common.HexToAddress("0xaa") + state, _ := state.New(common.Hash{}, state.NewDatabase(rawdb.NewMemoryDatabase()), nil) + state.SetCode(main, mainCode) + state.SetCode(common.HexToAddress("0xbb"), calleeCode) + state.SetCode(common.HexToAddress("0xcc"), calleeCode) + state.SetCode(common.HexToAddress("0xdd"), calleeCode) + state.SetCode(common.HexToAddress("0xee"), calleeCode) + + jsTracer := ` + {enters: 0, exits: 0, enterGas: 0, gasUsed: 0, steps:0, + step: function() { this.steps++}, + fault: function() {}, + result: function() { + return [this.enters, this.exits,this.enterGas,this.gasUsed, this.steps].join(",") + }, + enter: function(frame) { + this.enters++; + this.enterGas = frame.gas; + }, + exit: function(res) { + this.exits++; + this.gasUsed = res.gasUsed; + }}` + tracer, err := tracers.New(jsTracer, new(tracers.Context)) + if err != nil { + t.Fatal(err) + } + + _, _, err = Call(main, nil, &Config{ + State: state, + EVMConfig: vm.Config{ + Debug: true, + Tracer: tracer, + }}) + if err != nil { + t.Fatal("didn't expect error", err) + } + res, err := tracer.GetResult() + if err != nil { + t.Fatal(err) + } + if have, want := string(res), `"4,4,4294956962,6,47"`; have != want { + t.Errorf("wrong result, have \n%v\nwant\n%v\n", have, want) + } +} From c5dfb7008715d227f5b2a29462ca5c661ca5f865 Mon Sep 17 00:00:00 2001 From: Martin Holst Swende Date: Fri, 10 Sep 2021 14:38:52 +0200 Subject: [PATCH 20/47] core/vm, eth/tracers: make it possible to omit step function --- core/vm/runtime/runtime_test.go | 36 ++++++++++++++++++++++++++++++++- eth/tracers/tracer.go | 19 +++++++++++------ 2 files changed, 48 insertions(+), 7 deletions(-) diff --git a/core/vm/runtime/runtime_test.go b/core/vm/runtime/runtime_test.go index af7d992dd363..6665628ce8c9 100644 --- a/core/vm/runtime/runtime_test.go +++ b/core/vm/runtime/runtime_test.go @@ -760,7 +760,6 @@ func TestRuntimeJSTracer(t *testing.T) { if err != nil { t.Fatal(err) } - _, _, err = Call(main, nil, &Config{ State: state, EVMConfig: vm.Config{ @@ -777,4 +776,39 @@ func TestRuntimeJSTracer(t *testing.T) { if have, want := string(res), `"4,4,4294956962,6,47"`; have != want { t.Errorf("wrong result, have \n%v\nwant\n%v\n", have, want) } + // This time without steps + jsTracer = ` + {enters: 0, exits: 0, enterGas: 0, gasUsed: 0, steps:0, + fault: function() {}, + result: function() { + return [this.enters, this.exits,this.enterGas,this.gasUsed, this.steps].join(",") + }, + enter: function(frame) { + this.enters++; + this.enterGas = frame.gas; + }, + exit: function(res) { + this.exits++; + this.gasUsed = res.gasUsed; + }}` + tracer, err = tracers.New(jsTracer, new(tracers.Context)) + if err != nil { + t.Fatal(err) + } + _, _, err = Call(main, nil, &Config{ + State: state, + EVMConfig: vm.Config{ + Debug: true, + Tracer: tracer, + }}) + if err != nil { + t.Fatal("didn't expect error", err) + } + res, err = tracer.GetResult() + if err != nil { + t.Fatal(err) + } + if have, want := string(res), `"4,4,4294966805,6,0"`; have != want { + t.Errorf("wrong result, have \n%v\nwant\n%v\n", have, want) + } } diff --git a/eth/tracers/tracer.go b/eth/tracers/tracer.go index 986056f3ad25..0d9675a8386e 100644 --- a/eth/tracers/tracer.go +++ b/eth/tracers/tracer.go @@ -312,6 +312,7 @@ type Tracer struct { reason error // Textual reason for the interruption activePrecompiles []common.Address // Updated on CaptureStart based on given rules + traceSteps bool // When true, will invoke step() on each opcode traceCallFrames bool // When true, will invoke enter() and exit() js funcs } @@ -451,9 +452,7 @@ func New(code string, ctx *Context) (*Tracer, error) { } tracer.tracerObject = 0 // yeah, nice, eval can't return the index itself - if !tracer.vm.GetPropString(tracer.tracerObject, "step") { - return nil, fmt.Errorf("trace object must expose a function step()") - } + hasStep := tracer.vm.GetPropString(tracer.tracerObject, "step") tracer.vm.Pop() if !tracer.vm.GetPropString(tracer.tracerObject, "fault") { @@ -470,13 +469,18 @@ func New(code string, ctx *Context) (*Tracer, error) { tracer.vm.Pop() hasExit := tracer.vm.GetPropString(tracer.tracerObject, "exit") tracer.vm.Pop() + if hasEnter != hasExit { return nil, fmt.Errorf("trace object must expose either both or none of enter() and exit()") } - // Maintain backwards-compatibility with old tracing scripts - if hasEnter { - tracer.traceCallFrames = true + if !hasStep { + // If there's no step function, the enter and exit must be present + if !hasEnter { + return nil, fmt.Errorf("trace object must expose either step() or both enter() and exit()") + } } + tracer.traceCallFrames = hasEnter + tracer.traceSteps = hasStep // Tracer is valid, inject the big int library to access large numbers tracer.vm.EvalString(bigIntegerJS) @@ -607,6 +611,9 @@ func (jst *Tracer) CaptureStart(env *vm.EVM, from common.Address, to common.Addr // CaptureState implements the Tracer interface to trace a single step of VM execution. func (jst *Tracer) CaptureState(env *vm.EVM, pc uint64, op vm.OpCode, gas, cost uint64, scope *vm.ScopeContext, rData []byte, depth int, err error) { + if !jst.traceSteps { + return + } if jst.err != nil { return } From f27caae1674d2f06bfe108da3074a0c9c148b4b5 Mon Sep 17 00:00:00 2001 From: Martin Holst Swende Date: Sun, 12 Sep 2021 14:54:02 +0200 Subject: [PATCH 21/47] core/vm: fix crash --- core/vm/evm.go | 10 ++++++---- core/vm/logger_json.go | 6 +++++- 2 files changed, 11 insertions(+), 5 deletions(-) diff --git a/core/vm/evm.go b/core/vm/evm.go index 6d8bfa8da827..0f23ee894ff0 100644 --- a/core/vm/evm.go +++ b/core/vm/evm.go @@ -493,10 +493,12 @@ func (evm *EVM) create(caller ContractRef, codeAndHash *codeAndHash, gas uint64, } } - if evm.Config.Debug && evm.depth == 0 { - evm.Config.Tracer.CaptureEnd(ret, gas-contract.Gas, time.Since(start), err) - } else if evm.Config.Debug && evm.depth > 0 { - evm.Config.Tracer.CaptureExit(ret, gas-contract.Gas, err) + if evm.Config.Debug { + if evm.depth == 0 { + evm.Config.Tracer.CaptureEnd(ret, gas-contract.Gas, time.Since(start), err) + } else { + evm.Config.Tracer.CaptureExit(ret, gas-contract.Gas, err) + } } return ret, address, contract.Gas, err } diff --git a/core/vm/logger_json.go b/core/vm/logger_json.go index 14254ce44ad3..90104b67b4c6 100644 --- a/core/vm/logger_json.go +++ b/core/vm/logger_json.go @@ -107,5 +107,9 @@ func (l *JSONLogger) CaptureExit(output []byte, gasUsed uint64, err error) { GasUsed math.HexOrDecimal64 `json:"gasUsed"` Err string `json:"error,omitempty"` } - l.encoder.Encode(exitLog{output, math.HexOrDecimal64(gasUsed), err.Error()}) + var errMsg string + if err != nil { + errMsg = err.Error() + } + l.encoder.Encode(exitLog{output, math.HexOrDecimal64(gasUsed), errMsg}) } From 0ee54b74140058169fe8896063b66c0eec0e38bb Mon Sep 17 00:00:00 2001 From: Sina Mahmoodi Date: Sun, 12 Sep 2021 20:27:12 +0200 Subject: [PATCH 22/47] core/vm: add bench for tracer step vs callframe overhead --- core/vm/runtime/runtime_test.go | 54 ++++++++++++++++++++++++++++----- 1 file changed, 47 insertions(+), 7 deletions(-) diff --git a/core/vm/runtime/runtime_test.go b/core/vm/runtime/runtime_test.go index 6665628ce8c9..68cd9f552ada 100644 --- a/core/vm/runtime/runtime_test.go +++ b/core/vm/runtime/runtime_test.go @@ -343,11 +343,21 @@ func (s *stepCounter) CaptureState(env *vm.EVM, pc uint64, op vm.OpCode, gas, co // benchmarkNonModifyingCode benchmarks code, but if the code modifies the // state, this should not be used, since it does not reset the state between runs. -func benchmarkNonModifyingCode(gas uint64, code []byte, name string, b *testing.B) { +func benchmarkNonModifyingCode(gas uint64, code []byte, name string, tracerCode string, b *testing.B) { cfg := new(Config) setDefaults(cfg) cfg.State, _ = state.New(common.Hash{}, state.NewDatabase(rawdb.NewMemoryDatabase()), nil) cfg.GasLimit = gas + if len(tracerCode) > 0 { + tracer, err := tracers.New(tracerCode, new(tracers.Context)) + if err != nil { + b.Fatal(err) + } + cfg.EVMConfig = vm.Config{ + Debug: true, + Tracer: tracer, + } + } var ( destination = common.BytesToAddress([]byte("contract")) vmenv = NewEnv(cfg) @@ -487,12 +497,12 @@ func BenchmarkSimpleLoop(b *testing.B) { // Tracer: tracer, // }}) // 100M gas - benchmarkNonModifyingCode(100000000, staticCallIdentity, "staticcall-identity-100M", b) - benchmarkNonModifyingCode(100000000, callIdentity, "call-identity-100M", b) - benchmarkNonModifyingCode(100000000, loopingCode, "loop-100M", b) - benchmarkNonModifyingCode(100000000, callInexistant, "call-nonexist-100M", b) - benchmarkNonModifyingCode(100000000, callEOA, "call-EOA-100M", b) - benchmarkNonModifyingCode(100000000, calllRevertingContractWithInput, "call-reverting-100M", b) + benchmarkNonModifyingCode(100000000, staticCallIdentity, "staticcall-identity-100M", "", b) + benchmarkNonModifyingCode(100000000, callIdentity, "call-identity-100M", "", b) + benchmarkNonModifyingCode(100000000, loopingCode, "loop-100M", "", b) + benchmarkNonModifyingCode(100000000, callInexistant, "call-nonexist-100M", "", b) + benchmarkNonModifyingCode(100000000, callEOA, "call-EOA-100M", "", b) + benchmarkNonModifyingCode(100000000, calllRevertingContractWithInput, "call-reverting-100M", "", b) //benchmarkNonModifyingCode(10000000, staticCallIdentity, "staticcall-identity-10M", b) //benchmarkNonModifyingCode(10000000, loopingCode, "loop-10M", b) @@ -812,3 +822,33 @@ func TestRuntimeJSTracer(t *testing.T) { t.Errorf("wrong result, have \n%v\nwant\n%v\n", have, want) } } + +func BenchmarkTracerStepVsCallFrame(b *testing.B) { + // Simply pushes and pops some values in a loop + code := []byte{ + byte(vm.JUMPDEST), + byte(vm.PUSH1), 0, + byte(vm.PUSH1), 0, + byte(vm.POP), + byte(vm.POP), + byte(vm.PUSH1), 0, // jumpdestination + byte(vm.JUMP), + } + + stepTracer := ` + { + step: function() {}, + fault: function() {}, + result: function() {}, + }` + callFrameTracer := ` + { + enter: function() {}, + exit: function() {}, + fault: function() {}, + result: function() {}, + }` + + benchmarkNonModifyingCode(10000000, code, "tracer-step-10M", stepTracer, b) + benchmarkNonModifyingCode(10000000, code, "tracer-call-frame-10M", callFrameTracer, b) +} From c1fa4fe65e62dda1519bd9ff121f5a130a7ee87b Mon Sep 17 00:00:00 2001 From: Sina Mahmoodi Date: Mon, 13 Sep 2021 09:30:09 +0200 Subject: [PATCH 23/47] core/vm: add create test case for tracer --- core/vm/runtime/runtime_test.go | 15 +++++++++++++-- 1 file changed, 13 insertions(+), 2 deletions(-) diff --git a/core/vm/runtime/runtime_test.go b/core/vm/runtime/runtime_test.go index 68cd9f552ada..a1271ad8b991 100644 --- a/core/vm/runtime/runtime_test.go +++ b/core/vm/runtime/runtime_test.go @@ -707,6 +707,17 @@ func TestRuntimeJSTracer(t *testing.T) { // STATICCALL to 0xdd // DELEGATECALL to 0xee mainCode := []byte{ + // CREATE + // Store initcode in memory at 0x00 (5 bytes left-padded to 32 bytes) + byte(vm.PUSH5), + // Init code: PUSH1 0, PUSH1 0, RETURN (3 steps) + byte(vm.PUSH1), 0, byte(vm.PUSH1), 0, byte(vm.RETURN), + byte(vm.PUSH1), 0, + byte(vm.MSTORE), + // length, offset, value + byte(vm.PUSH1), 5, byte(vm.PUSH1), 27, byte(vm.PUSH1), 0, + byte(vm.CREATE), + byte(vm.POP), // CALL // outsize, outoffset, insize, inoffset byte(vm.PUSH1), 0, byte(vm.PUSH1), 0, byte(vm.PUSH1), 0, byte(vm.PUSH1), 0, @@ -783,7 +794,7 @@ func TestRuntimeJSTracer(t *testing.T) { if err != nil { t.Fatal(err) } - if have, want := string(res), `"4,4,4294956962,6,47"`; have != want { + if have, want := string(res), `"5,5,4294925433,6,58"`; have != want { t.Errorf("wrong result, have \n%v\nwant\n%v\n", have, want) } // This time without steps @@ -818,7 +829,7 @@ func TestRuntimeJSTracer(t *testing.T) { if err != nil { t.Fatal(err) } - if have, want := string(res), `"4,4,4294966805,6,0"`; have != want { + if have, want := string(res), `"5,5,4294935277,6,0"`; have != want { t.Errorf("wrong result, have \n%v\nwant\n%v\n", have, want) } } From b8906d5b562fe60bf3e32f56933dd2901b129a8e Mon Sep 17 00:00:00 2001 From: Martin Holst Swende Date: Mon, 13 Sep 2021 09:43:35 +0200 Subject: [PATCH 24/47] eth/tracers: minor fixes + testcase --- eth/tracers/internal/tracers/assets.go | 6 +++--- eth/tracers/internal/tracers/callframe_tracer.js | 4 +++- eth/tracers/tracer.go | 2 -- eth/tracers/tracers_test.go | 11 ++++++++++- 4 files changed, 16 insertions(+), 7 deletions(-) diff --git a/eth/tracers/internal/tracers/assets.go b/eth/tracers/internal/tracers/assets.go index 013b06f2e2ea..7e6ff09dbb1f 100644 --- a/eth/tracers/internal/tracers/assets.go +++ b/eth/tracers/internal/tracers/assets.go @@ -3,7 +3,7 @@ // 4byte_tracer.js (2.933kB) // bigram_tracer.js (1.712kB) // call_tracer.js (8.956kB) -// callframe_tracer.js (4.005kB) +// callframe_tracer.js (4.064kB) // evmdis_tracer.js (4.195kB) // noop_tracer.js (1.271kB) // opcount_tracer.js (1.372kB) @@ -138,7 +138,7 @@ func call_tracerJs() (*asset, error) { return a, nil } -var _callframe_tracerJs = []byte("\x1f\x8b\x08\x00\x00\x00\x00\x00\x00\xff\xd4\x57\x51\x6f\xdb\xb8\x0f\x7f\x76\x3e\x05\xff\x7d\x58\x1b\x2c\x8b\xdb\xfd\x81\x3d\x64\xcb\x80\xdc\xb0\x6e\x05\x7a\x5d\x91\xa6\x18\x8a\xa2\x0f\x4a\x4c\xc7\xda\x14\xc9\x90\xe8\xa6\xb9\x2e\xdf\xfd\x40\xc9\x4e\x6c\x37\xe9\x7a\x4f\x87\xeb\x53\x4d\xfe\xf8\x23\x45\x91\x14\x13\xc7\xf0\xc9\xe4\x2b\x2b\xe7\x19\xc1\xdb\xe3\xb7\x27\x30\xc9\x10\xe6\xe6\x0d\x52\x86\x16\x8b\x05\x8c\x0a\xca\x8c\x75\x9d\x38\x86\x49\x26\x1d\xa4\x52\x21\x48\x07\xb9\xb0\x04\x26\x05\x6a\xe1\x95\x9c\x5a\x61\x57\xfd\x4e\x1c\x07\x9b\x9d\x6a\x66\x48\x2d\x22\x38\x93\xd2\x52\x58\x1c\xc0\xca\x14\x30\x13\x1a\x2c\x26\xd2\x91\x95\xd3\x82\x10\x24\x81\xd0\x49\x6c\x2c\x2c\x4c\x22\xd3\x15\x53\x4a\x82\x42\x27\x68\xbd\x6b\x42\xbb\x70\x55\x1c\x5f\x2e\xae\xe1\x1c\x9d\x43\x0b\x5f\x50\xa3\x15\x0a\x2e\x8b\xa9\x92\x33\x38\x97\x33\xd4\x0e\x41\x38\xc8\x59\xe2\x32\x4c\x60\xea\xe9\xd8\xf0\x94\x43\xb9\x2a\x43\x81\x53\x53\xe8\x44\x90\x34\xba\x07\x28\x39\x72\xb8\x47\xeb\xa4\xd1\xf0\xff\xca\x55\x49\xd8\x03\x63\x99\xe4\x48\x10\x1f\xc0\x82\xc9\xd9\xae\x0b\x42\xaf\x40\x09\xda\x9a\xbe\x20\x21\xdb\x73\x27\x20\xb5\x77\x93\x99\x1c\x81\x32\x41\x7c\xea\xa5\x54\x0a\xa6\x08\x85\xc3\xb4\x50\x3d\x66\x9b\x16\x04\xdf\xcf\x26\x5f\xbf\x5d\x4f\x60\x74\x71\x03\xdf\x47\xe3\xf1\xe8\x62\x72\xf3\x1e\x96\x92\x32\x53\x10\xe0\x3d\x06\x2a\xb9\xc8\x95\xc4\x04\x96\xc2\x5a\xa1\x69\x05\x26\x65\x86\x3f\x3f\x8f\x3f\x7d\x1d\x5d\x4c\x46\x7f\x9c\x9d\x9f\x4d\x6e\xc0\x58\x38\x3d\x9b\x5c\x7c\xbe\xba\x82\xd3\x6f\x63\x18\xc1\xe5\x68\x3c\x39\xfb\x74\x7d\x3e\x1a\xc3\xe5\xf5\xf8\xf2\xdb\xd5\xe7\x3e\x5c\x21\x47\x85\x6c\xff\xfb\x9c\xa7\xfe\xf6\x2c\x42\x82\x24\xa4\x72\x55\x26\x6e\x4c\x01\x2e\x33\x85\x4a\x20\x13\xf7\x08\x16\x67\x28\xef\x31\x01\x01\x33\x93\xaf\x5e\x7c\xa9\xcc\x25\x94\xd1\x73\x7f\xe6\xbd\x05\x09\x67\x29\x68\x43\x3d\x70\x88\xf0\x21\x23\xca\x07\x71\xbc\x5c\x2e\xfb\x73\x5d\xf4\x8d\x9d\xc7\x2a\xd0\xb9\xf8\x63\xbf\xd3\x61\xd2\x99\x50\xea\xd4\x8a\x05\x4e\xac\x98\xa1\xe5\xbc\x3b\x4f\xaf\x71\xe9\x95\x90\xb2\x16\xc8\x8a\x99\xd4\x73\x58\x20\x65\x26\x71\x40\x06\x2c\xe6\xc6\x52\x79\x53\x20\x75\x6a\xec\xc2\x57\x94\x0f\x76\xca\x17\x23\x35\xa1\xd5\x42\xc1\x02\x9d\x13\x73\xf4\x55\x2c\x98\x4c\x3b\x31\x23\x5f\x32\x8f\x1d\x00\xf0\xae\x1c\x89\xd9\xcf\x01\xdc\x3e\xae\xef\x7a\x5e\xe8\x08\xf3\x01\xa4\x85\xf6\xd0\x23\x65\xe6\x3d\x48\xa6\x5d\x78\x5c\x07\x7d\x2a\x0a\x45\x3b\x01\x5e\xcd\x7f\xf7\xc2\x82\x42\x0d\x43\xa0\x4c\xba\xfe\xc6\x4d\x5f\xa1\x9e\x53\xb6\xc1\xc9\x14\x8e\x18\xf7\x11\x4e\xea\xe6\x15\x85\xcf\xc4\x13\x8e\xdc\xe4\x47\xdd\x06\x96\x69\x9a\xa0\x5b\x85\xfa\xcd\xc9\x5d\x10\xc0\x70\x38\xf4\x8d\x9d\x4a\x8d\x49\xdb\x11\xff\x3d\x6b\x0c\xb7\x77\x0d\x83\x75\xe7\x85\xa6\xfd\xbc\x70\xd9\x11\xff\xbb\x0d\x37\x18\x97\x99\xb4\xe8\x9a\xa9\x9c\xd1\x43\x3b\x95\x71\x0c\x97\x16\x73\x9e\x1e\xa6\xe0\xae\x2f\x2f\xd5\x5f\x7d\x23\xe1\x81\x0d\x86\xad\xf3\xd1\x2a\xc7\x81\xbf\x6c\x7a\xe8\xf3\x47\xaf\xa1\x4e\xad\x59\x78\x35\x99\xaf\xf8\xc0\x11\xf4\x59\xd4\x6d\xa2\xc8\x0c\xaa\x7f\x2a\x14\x99\x16\xe6\x5e\xa8\xc2\x7b\x3a\x3c\x7e\x38\x84\xd7\xde\x9f\x97\xf5\xc9\x5c\x91\x95\x7a\x7e\x74\xf2\xae\x65\x33\x17\x2e\x10\x97\x36\x53\x39\x3f\xd3\xe4\xf9\xe7\xc2\x75\x9f\xb7\xbc\x76\x98\x0c\x76\x5b\xb2\xea\x39\x6b\xa9\xf3\x82\x06\x8d\xf3\x78\x51\x0b\x66\x0a\x0a\xb8\x2d\x2c\x88\x6a\xb8\x75\xa3\x9a\x5b\xe5\x70\x5c\x55\xd1\xff\xf6\x97\x60\xb8\xb7\x4d\xb5\xed\x61\x78\xb1\x3f\xb4\xd6\xd8\x17\xf8\x0b\xb8\x5d\xfe\xbc\x66\xeb\x0f\x50\x39\xf4\xce\xf8\xfc\xff\x94\x7e\x63\xb3\xe7\x00\x0d\x78\x83\x16\x5e\xbd\xda\xa1\x3e\xc0\x07\x9c\x15\xdc\x2d\x60\xf1\x1e\x2d\x61\x72\x00\xbf\x7e\x55\x6e\xc3\xf5\x70\xc7\x1f\x1c\x3f\x1c\x74\x9b\xa1\x25\xa8\x90\xb0\x09\xad\x85\xd5\xd9\x1e\x81\x0a\xab\x43\x66\x52\xa9\x85\x92\x7f\x61\x19\x49\xb7\xde\xbf\xc8\x83\xb6\xd6\xbe\x7e\x68\xb7\xe7\x60\x39\xc4\x76\x35\xa5\xc7\xef\xed\xc9\x50\x73\x01\xb3\xa7\x25\xeb\x90\x27\xfd\x58\xd6\x78\x1d\xb3\xab\xc6\x7d\x0b\x36\x9b\x28\x80\x9b\x0d\x78\x78\xf2\xee\x70\x77\xc3\x97\xb6\xc1\xa8\xd5\xf0\x2d\xab\xed\xd5\xb7\x67\x7a\x73\x52\x56\xf9\x7d\x90\xd4\x4e\xef\x38\x5c\xc3\xbf\xf7\xd8\xb0\xae\x1a\x31\x30\xdc\x95\xb9\x10\xe2\x8e\x31\xe4\xb3\xf1\x94\xac\xaa\xd9\xfa\x55\x8d\xeb\x35\xfa\xf4\xb5\xab\x63\x7e\xdb\x91\x35\x57\x55\x57\x3e\xb1\x7f\xe6\x85\xe3\x9c\xbd\x19\xc2\xc9\x7f\xfe\xc9\x8d\xe2\x18\xaa\x76\xe6\x9d\xd0\xa2\x20\x74\xbc\x14\xf2\xd5\x9b\xe9\x0f\x9c\xf1\x62\xc5\x0b\x17\xef\x62\x1e\x0a\x09\x3a\x69\x31\x81\x54\xa2\x4a\xc0\xf0\xaf\x03\x5e\x3b\x7f\x38\xa3\x3d\xa1\x43\x2b\x99\xd1\xef\x60\xfd\xf0\x4b\x46\x32\xa9\x96\x33\xa4\x15\xa4\x28\xa8\xb0\xc8\xab\x5b\x2e\x9c\x83\x05\x0a\x2d\xf5\x3c\x2d\x94\x5a\x81\xb1\x09\x32\x79\x98\x2d\xce\x13\x92\xe1\xe5\xce\x3a\x58\x66\x06\x12\xa3\x0f\xcb\x85\x2e\xb7\xc8\xbb\x7a\x0f\x7e\x14\x8e\x78\xa3\xcf\x95\x58\x81\xa4\x7e\x27\xaa\x0e\x55\xdf\x24\x38\x05\xf0\xd8\x89\x22\xae\x6d\x67\x78\x4e\xfa\x29\x14\x45\xd1\x76\x23\xe0\x92\x08\xe3\x27\x8a\xa2\xcd\x26\xe0\xc5\xfc\xe5\xc5\x9b\xa7\x3f\xa0\x8d\x17\x6e\xde\x7a\x2f\xf4\x5f\x5e\xbe\x79\xcf\xab\x2e\xa9\xa4\xe1\xad\xae\xf7\x8e\xd7\x6c\xde\x61\xaf\xf1\x5f\x5e\xbe\x79\x78\x6b\x0d\xe2\x15\xbe\x58\x07\x8d\x72\x0e\x51\xca\x45\xfd\x4c\x72\x11\xe2\xf1\x45\xb1\x81\xfb\x2f\x96\xaf\x3b\x51\xc4\xb7\x78\xc4\xc9\xf9\x89\x2b\xfe\x51\x14\x72\x14\x72\x16\x71\x79\x07\xc1\xed\x4f\x5c\xdd\x3d\x2d\xe7\x28\x8a\xa2\xf2\x39\xa9\xe1\x58\xbc\x2e\xf9\xb7\x14\xfb\x56\x80\xa8\x16\x84\x1c\x1e\xbf\x07\xf9\xa1\x6e\x50\xce\xaf\xf7\x20\x5f\xbf\xae\x5c\xd6\xf5\xb7\xf2\xae\x9a\x57\x9b\x47\xaa\xa5\xef\xd6\x03\x2a\x5f\xb5\x00\xe9\x44\xeb\xce\xba\xf3\x77\x00\x00\x00\xff\xff\xab\xff\x08\xe1\xa5\x0f\x00\x00") +var _callframe_tracerJs = []byte("\x1f\x8b\x08\x00\x00\x00\x00\x00\x00\xff\xd4\x57\x51\x6f\xdb\xb8\x0f\x7f\x76\x3e\x05\xff\x7d\x58\x1b\x2c\x8b\xdb\xfd\x81\x3d\x64\xcb\x80\xdc\xb0\x6e\x05\x7a\x5d\x91\xa6\x18\x8a\xa2\x0f\x4a\x4c\xdb\xda\x14\xc9\x90\xe8\xa6\xb9\x2e\xdf\xfd\x40\xc9\x4e\xec\x34\xe9\x7a\x4f\x87\xeb\x53\x43\xfe\xf8\x23\x45\x91\x14\x1d\xc7\xf0\xc9\x14\x4b\x2b\xb3\x9c\xe0\xed\xf1\xdb\x13\x98\xe4\x08\x99\x79\x83\x94\xa3\xc5\x72\x0e\xa3\x92\x72\x63\x5d\x27\x8e\x61\x92\x4b\x07\xa9\x54\x08\xd2\x41\x21\x2c\x81\x49\x81\xb6\xf0\x4a\x4e\xad\xb0\xcb\x7e\x27\x8e\x83\xcd\x4e\x35\x33\xa4\x16\x11\x9c\x49\x69\x21\x2c\x0e\x60\x69\x4a\x98\x09\x0d\x16\x13\xe9\xc8\xca\x69\x49\x08\x92\x40\xe8\x24\x36\x16\xe6\x26\x91\xe9\x92\x29\x25\x41\xa9\x13\xb4\xde\x35\xa1\x9d\xbb\x3a\x8e\x2f\x17\xd7\x70\x8e\xce\xa1\x85\x2f\xa8\xd1\x0a\x05\x97\xe5\x54\xc9\x19\x9c\xcb\x19\x6a\x87\x20\x1c\x14\x2c\x71\x39\x26\x30\xf5\x74\x6c\x78\xca\xa1\x5c\x55\xa1\xc0\xa9\x29\x75\x22\x48\x1a\xdd\x03\x94\x1c\x39\xdc\xa3\x75\xd2\x68\xf8\x7f\xed\xaa\x22\xec\x81\xb1\x4c\x72\x24\x88\x0f\x60\xc1\x14\x6c\xd7\x05\xa1\x97\xa0\x04\x6d\x4c\x5f\x90\x90\xcd\xb9\x13\x90\xda\xbb\xc9\x4d\x81\x40\xb9\x20\x3e\xf5\x42\x2a\x05\x53\x84\xd2\x61\x5a\xaa\x1e\xb3\x4d\x4b\x82\xef\x67\x93\xaf\xdf\xae\x27\x30\xba\xb8\x81\xef\xa3\xf1\x78\x74\x31\xb9\x79\x0f\x0b\x49\xb9\x29\x09\xf0\x1e\x03\x95\x9c\x17\x4a\x62\x02\x0b\x61\xad\xd0\xb4\x04\x93\x32\xc3\x9f\x9f\xc7\x9f\xbe\x8e\x2e\x26\xa3\x3f\xce\xce\xcf\x26\x37\x60\x2c\x9c\x9e\x4d\x2e\x3e\x5f\x5d\xc1\xe9\xb7\x31\x8c\xe0\x72\x34\x9e\x9c\x7d\xba\x3e\x1f\x8d\xe1\xf2\x7a\x7c\xf9\xed\xea\x73\x1f\xae\x90\xa3\x42\xb6\xff\x7d\xce\x53\x7f\x7b\x16\x21\x41\x12\x52\xb9\x3a\x13\x37\xa6\x04\x97\x9b\x52\x25\x90\x8b\x7b\x04\x8b\x33\x94\xf7\x98\x80\x80\x99\x29\x96\x2f\xbe\x54\xe6\x12\xca\xe8\xcc\x9f\x79\x6f\x41\xc2\x59\x0a\xda\x50\x0f\x1c\x22\x7c\xc8\x89\x8a\x41\x1c\x2f\x16\x8b\x7e\xa6\xcb\xbe\xb1\x59\xac\x02\x9d\x8b\x3f\xf6\x3b\x1d\x26\x9d\x09\xa5\x4e\xad\x98\xe3\xc4\x8a\x19\x5a\xce\xbb\xf3\xf4\x1a\x17\x5e\x09\x29\x6b\x81\xac\x98\x49\x9d\xc1\x1c\x29\x37\x89\x03\x32\x60\xb1\x30\x96\xaa\x9b\x02\xa9\x53\x63\xe7\xbe\xa2\x7c\xb0\x53\xbe\x18\xa9\x09\xad\x16\x0a\xe6\xe8\x9c\xc8\xd0\x57\xb1\x60\x32\xed\xc4\x8c\x7c\xc9\x3c\x76\x00\xc0\xbb\x72\x24\x66\x3f\x07\x70\xfb\xb8\xba\xeb\x79\xa1\x23\x2c\x06\x90\x96\xda\x43\x8f\x94\xc9\x7a\x90\x4c\xbb\xf0\xb8\x0a\xfa\x54\x94\x8a\x76\x02\xbc\x9a\xff\xee\x85\x05\x85\x1a\x86\x40\xb9\x74\xfd\xb5\x9b\xbe\x42\x9d\x51\xbe\xc6\xc9\x14\x8e\x18\xf7\x11\x4e\x9a\xe6\x35\x85\xcf\xc4\x13\x8e\xc2\x14\x47\xdd\x16\x96\x69\xda\xa0\x5b\x85\xfa\xcd\xc9\x5d\x10\xc0\x70\x38\xf4\x8d\x9d\x4a\x8d\xc9\xb6\x23\xfe\x7b\xd6\x18\x6e\xef\x5a\x06\xab\xce\x0b\x4d\xfb\x45\xe9\xf2\x23\xfe\x77\x13\x6e\x30\xae\x32\x69\xd1\xb5\x53\x39\xa3\x87\xed\x54\xc6\x31\x5c\x5a\x2c\x78\x7a\x98\x92\xbb\xbe\xba\x54\x7f\xf5\xad\x84\x07\x36\x18\x6e\x9d\x8f\x96\x05\x0e\xfc\x65\xd3\x43\x9f\x7f\xf4\x5a\xea\xd4\x9a\xb9\x57\x93\xf9\x8a\x0f\x1c\x41\x9f\x45\xdd\x36\x8a\xcc\xa0\xfe\xa7\x46\x91\xd9\xc2\xdc\x0b\x55\x7a\x4f\x87\xc7\x0f\x87\xf0\xda\xfb\xf3\xb2\x3e\x99\x2b\xb2\x52\x67\x47\x27\xef\xb6\x6c\x32\xe1\x02\x71\x65\x33\x95\xd9\x99\x26\xcf\x9f\x09\xd7\x7d\xde\xf2\xda\x61\x32\xd8\x6d\xc9\xaa\xe7\xac\xa5\x2e\x4a\x1a\xb4\xce\xe3\x45\x5b\x30\x53\x52\xc0\x6d\x60\x41\xd4\xc0\xad\x5a\xd5\xbc\x55\x0e\xc7\x75\x15\xfd\x6f\x7f\x09\x86\x7b\x5b\x57\xdb\x1e\x86\x17\xfb\x43\x6b\x8d\x7d\x81\xbf\x80\xdb\xe5\xcf\x6b\x36\xfe\x00\x95\x43\xef\x8c\xcf\xff\x4f\xe9\xd7\x36\x7b\x0e\xd0\x82\xb7\x68\xe1\xd5\xab\x1d\xea\x03\x7c\xc0\x59\xc9\xdd\x02\x16\xef\xd1\x12\x26\x07\xf0\xeb\x57\xed\x36\x5c\x0f\x77\xfc\xc1\xf1\xc3\x41\xb7\x1d\x5a\x82\x0a\x09\xdb\xd0\x46\x58\x9d\xcd\x11\xa8\xb4\x3a\x64\x26\x95\x5a\x28\xf9\x17\x56\x91\x74\x9b\xfd\x8b\x3c\x68\x1b\xed\xeb\x87\xf6\xf6\x1c\xac\x86\xd8\xae\xa6\xf4\xf8\xbd\x3d\x19\x6a\x2e\x60\xf6\xb4\x64\x13\xf2\xa4\x1f\xab\x1a\x6f\x62\x76\xd5\xb8\x6f\xc1\x76\x13\x05\x70\xbb\x01\x0f\x4f\xde\x1d\xee\xad\xfa\x60\xe0\x9b\x7d\xab\x34\xda\xc7\xe6\x5c\x04\xd8\x70\x97\x47\xaf\x69\xb7\xed\x0e\x87\xdb\xcf\x41\x7b\xc8\xd6\x57\xf3\x20\x69\xfb\x66\xc6\xe1\x06\xff\xbd\x77\xca\x1f\xbf\x9a\x4e\x30\xdc\x95\xf4\x10\xe2\x8e\x09\xe6\xd3\xff\x94\xac\x2e\xf7\xe6\x2d\x8f\x9b\xe5\xfd\xf4\xa1\x6c\x62\x7e\xdb\xcc\x0d\x57\x75\x43\x3f\xb1\x7f\xe6\x71\xe4\x9c\xbd\x19\xc2\xc9\x7f\xfe\xb5\x8e\xe2\x18\xea\x49\xc0\xeb\xa4\x45\x41\xe8\x78\x9f\xe4\xab\x37\xd3\x1f\x38\xe3\x9d\x8c\x77\x35\x5e\xe3\x3c\x14\x12\x74\xd2\x62\x02\xa9\x44\x95\x80\xe1\x0f\x0b\xde\x58\x7f\x38\xa3\x3d\xa1\x43\x2b\x99\xd1\xaf\x6f\xfd\xf0\x11\x24\x99\x54\xcb\x19\xd2\x12\x52\x14\x54\x5a\xe4\xad\xaf\x10\xce\xc1\x1c\x85\x96\x3a\x4b\x4b\xa5\x96\x60\x6c\x82\x4c\x1e\xc6\x92\xf3\x84\x64\x78\x2f\xb4\x0e\x16\xb9\x81\xc4\xe8\xc3\x6a\x17\x2c\x2c\xf2\x9a\xdf\x83\x1f\xa5\x23\xfe\x18\x28\x94\x58\x82\xa4\x7e\x27\xaa\x0f\xd5\x5c\x42\x38\x05\xf0\xd8\x89\x22\xae\x6d\x67\x78\xc4\xfa\x01\x16\x45\xd1\x66\x99\xe0\x92\x08\x93\x2b\x8a\xa2\xf5\x12\xe1\xc5\xfc\xcb\x8b\xd7\x5b\x43\x40\x1b\x2f\x5c\xaf\x09\x9b\x61\xe0\xe5\xeb\x55\xa0\xee\x92\x5a\x1a\x9e\xf9\x66\xef\x78\xcd\xfa\x09\xf7\x1a\xff\xcb\xcb\xd7\x6f\x76\xa3\x41\xbc\xc2\x17\xeb\xa0\x55\xce\x21\x4a\x39\x6f\x9e\x49\xce\x43\x3c\xbe\x28\xd6\x70\xff\x8b\xe5\xab\x4e\x14\xf1\x2d\x1e\x71\x72\x7e\xe2\x92\xbf\xa7\x42\x8e\x42\xce\x22\x2e\xef\x20\xb8\xfd\x89\xcb\xbb\xa7\xe5\x1c\x45\x51\x54\xbd\x44\x0d\x1c\x8b\x57\x15\xff\x86\x62\xdf\xf6\x10\x35\x82\x90\xc3\xe3\xf7\x20\x3f\x34\x0d\xaa\xf9\xf5\x1e\xe4\xeb\xd7\xb5\xcb\xa6\xfe\x56\xde\xd5\xf3\x6a\xfd\xbe\x6d\xe9\xbb\xcd\x80\xaa\x07\x31\x40\x3a\xd1\xaa\xb3\xea\xfc\x1d\x00\x00\xff\xff\x4a\x66\xaf\x2a\xe0\x0f\x00\x00") func callframe_tracerJsBytes() ([]byte, error) { return bindataRead( @@ -154,7 +154,7 @@ func callframe_tracerJs() (*asset, error) { } info := bindataFileInfo{name: "callframe_tracer.js", size: 0, mode: os.FileMode(0), modTime: time.Unix(0, 0)} - a := &asset{bytes: bytes, info: info, digest: [32]uint8{0x75, 0x7d, 0x50, 0x95, 0x88, 0xd9, 0x78, 0xea, 0xd3, 0x61, 0x78, 0x57, 0x7e, 0x72, 0x3a, 0x9, 0xd5, 0x9d, 0x1f, 0xb2, 0x49, 0xc6, 0x8b, 0xcd, 0xf8, 0x2c, 0x3f, 0xc6, 0xe6, 0x2f, 0x5f, 0xd7}} + a := &asset{bytes: bytes, info: info, digest: [32]uint8{0x7a, 0x27, 0x77, 0x51, 0xb3, 0xf0, 0x89, 0xd2, 0x58, 0xcc, 0x30, 0xb2, 0xac, 0x61, 0x3, 0xae, 0x12, 0x93, 0x7a, 0x1a, 0x8a, 0x43, 0x66, 0xdd, 0xef, 0xfa, 0x9a, 0x44, 0x32, 0x67, 0x82, 0xb4}} return a, nil } diff --git a/eth/tracers/internal/tracers/callframe_tracer.js b/eth/tracers/internal/tracers/callframe_tracer.js index 130166ad6bd1..41cf3d420d80 100644 --- a/eth/tracers/internal/tracers/callframe_tracer.js +++ b/eth/tracers/internal/tracers/callframe_tracer.js @@ -63,7 +63,9 @@ to: toHex(frame.to), input: toHex(frame.input), gas: '0x' + bigInt(frame.gas).toString('16'), - value: '0x' + frame.value.toString('16'), + } + if (frame.value !== undefined){ + call.value='0x' + bigInt(frame.value).toString(16) } this.callstack.push(call) }, diff --git a/eth/tracers/tracer.go b/eth/tracers/tracer.go index 0d9675a8386e..737d301a77c3 100644 --- a/eth/tracers/tracer.go +++ b/eth/tracers/tracer.go @@ -691,8 +691,6 @@ func (jst *Tracer) CaptureEnter(typ vm.OpCode, from common.Address, to common.Ad jst.addToObj(obj, "gas", gas) if value != nil { jst.addToObj(obj, "value", value) - } else { - jst.addToObj(obj, "value", new(big.Int)) } jst.vm.PutPropString(jst.stateObject, "frame") diff --git a/eth/tracers/tracers_test.go b/eth/tracers/tracers_test.go index 8fbbf154b431..602f2a86be27 100644 --- a/eth/tracers/tracers_test.go +++ b/eth/tracers/tracers_test.go @@ -204,6 +204,15 @@ func TestPrestateTracerCreate2(t *testing.T) { // Iterates over all the input-output datasets in the tracer test harness and // runs the JavaScript tracers against them. func TestCallTracer(t *testing.T) { + testCallTracer("callTracer", t) +} + +func TestCallFrameTracer(t *testing.T) { + t.Skip("not yet passing all tests") + testCallTracer("callframeTracer", t) +} + +func testCallTracer(tracer string, t *testing.T) { files, err := ioutil.ReadDir("testdata") if err != nil { t.Fatalf("failed to retrieve tracer test suite: %v", err) @@ -248,7 +257,7 @@ func TestCallTracer(t *testing.T) { _, statedb := tests.MakePreState(rawdb.NewMemoryDatabase(), test.Genesis.Alloc, false) // Create the tracer, the EVM environment and run it - tracer, err := New("callTracer", new(Context)) + tracer, err := New(tracer, new(Context)) if err != nil { t.Fatalf("failed to create call tracer: %v", err) } From 66dd419b8c3ff9572407ee4dfb7c4268f46af9db Mon Sep 17 00:00:00 2001 From: Sina Mahmoodi Date: Mon, 13 Sep 2021 09:45:33 +0200 Subject: [PATCH 25/47] core/vm: add create2 test case for tracer --- core/vm/runtime/runtime_test.go | 40 ++++++++++++++++++++++++--------- 1 file changed, 30 insertions(+), 10 deletions(-) diff --git a/core/vm/runtime/runtime_test.go b/core/vm/runtime/runtime_test.go index a1271ad8b991..729dace1065f 100644 --- a/core/vm/runtime/runtime_test.go +++ b/core/vm/runtime/runtime_test.go @@ -718,6 +718,17 @@ func TestRuntimeJSTracer(t *testing.T) { byte(vm.PUSH1), 5, byte(vm.PUSH1), 27, byte(vm.PUSH1), 0, byte(vm.CREATE), byte(vm.POP), + // CREATE2 + // Store initcode in memory at 0x00 (5 bytes left-padded to 32 bytes) + byte(vm.PUSH5), + // Init code: PUSH1 0, PUSH1 0, RETURN (3 steps) + byte(vm.PUSH1), 0, byte(vm.PUSH1), 0, byte(vm.RETURN), + byte(vm.PUSH1), 0, + byte(vm.MSTORE), + // salt, length, offset, value + byte(vm.PUSH1), 1, byte(vm.PUSH1), 5, byte(vm.PUSH1), 27, byte(vm.PUSH1), 0, + byte(vm.CREATE2), + byte(vm.POP), // CALL // outsize, outoffset, insize, inoffset byte(vm.PUSH1), 0, byte(vm.PUSH1), 0, byte(vm.PUSH1), 0, byte(vm.PUSH1), 0, @@ -755,12 +766,12 @@ func TestRuntimeJSTracer(t *testing.T) { byte(vm.RETURN), } main := common.HexToAddress("0xaa") - state, _ := state.New(common.Hash{}, state.NewDatabase(rawdb.NewMemoryDatabase()), nil) - state.SetCode(main, mainCode) - state.SetCode(common.HexToAddress("0xbb"), calleeCode) - state.SetCode(common.HexToAddress("0xcc"), calleeCode) - state.SetCode(common.HexToAddress("0xdd"), calleeCode) - state.SetCode(common.HexToAddress("0xee"), calleeCode) + statedb, _ := state.New(common.Hash{}, state.NewDatabase(rawdb.NewMemoryDatabase()), nil) + statedb.SetCode(main, mainCode) + statedb.SetCode(common.HexToAddress("0xbb"), calleeCode) + statedb.SetCode(common.HexToAddress("0xcc"), calleeCode) + statedb.SetCode(common.HexToAddress("0xdd"), calleeCode) + statedb.SetCode(common.HexToAddress("0xee"), calleeCode) jsTracer := ` {enters: 0, exits: 0, enterGas: 0, gasUsed: 0, steps:0, @@ -782,7 +793,7 @@ func TestRuntimeJSTracer(t *testing.T) { t.Fatal(err) } _, _, err = Call(main, nil, &Config{ - State: state, + State: statedb, EVMConfig: vm.Config{ Debug: true, Tracer: tracer, @@ -794,9 +805,18 @@ func TestRuntimeJSTracer(t *testing.T) { if err != nil { t.Fatal(err) } - if have, want := string(res), `"5,5,4294925433,6,58"`; have != want { + if have, want := string(res), `"6,6,4294893899,6,70"`; have != want { t.Errorf("wrong result, have \n%v\nwant\n%v\n", have, want) } + + // Reset state + statedb, _ = state.New(common.Hash{}, state.NewDatabase(rawdb.NewMemoryDatabase()), nil) + statedb.SetCode(main, mainCode) + statedb.SetCode(common.HexToAddress("0xbb"), calleeCode) + statedb.SetCode(common.HexToAddress("0xcc"), calleeCode) + statedb.SetCode(common.HexToAddress("0xdd"), calleeCode) + statedb.SetCode(common.HexToAddress("0xee"), calleeCode) + // This time without steps jsTracer = ` {enters: 0, exits: 0, enterGas: 0, gasUsed: 0, steps:0, @@ -817,7 +837,7 @@ func TestRuntimeJSTracer(t *testing.T) { t.Fatal(err) } _, _, err = Call(main, nil, &Config{ - State: state, + State: statedb, EVMConfig: vm.Config{ Debug: true, Tracer: tracer, @@ -829,7 +849,7 @@ func TestRuntimeJSTracer(t *testing.T) { if err != nil { t.Fatal(err) } - if have, want := string(res), `"5,5,4294935277,6,0"`; have != want { + if have, want := string(res), `"6,6,4294893899,6,0"`; have != want { t.Errorf("wrong result, have \n%v\nwant\n%v\n", have, want) } } From fe57b4771d1e7374ead8db5ea3c4e9983fa21d9a Mon Sep 17 00:00:00 2001 From: Martin Holst Swende Date: Mon, 13 Sep 2021 09:59:33 +0200 Subject: [PATCH 26/47] eth/tracers/testdata: add testcase containing selfdestruct --- .../testdata/call_tracer_selfdestruct.json | 73 +++++++++++++++++++ 1 file changed, 73 insertions(+) create mode 100644 eth/tracers/testdata/call_tracer_selfdestruct.json diff --git a/eth/tracers/testdata/call_tracer_selfdestruct.json b/eth/tracers/testdata/call_tracer_selfdestruct.json new file mode 100644 index 000000000000..132cefa1681a --- /dev/null +++ b/eth/tracers/testdata/call_tracer_selfdestruct.json @@ -0,0 +1,73 @@ +{ + "context": { + "difficulty": "3502894804", + "gasLimit": "4722976", + "miner": "0x1585936b53834b021f68cc13eeefdec2efc8e724", + "number": "2289806", + "timestamp": "1513601314" + }, + "genesis": { + "alloc": { + "0x0024f658a46fbb89d8ac105e98d7ac7cbbaf27c5": { + "balance": "0x0", + "code": "0x", + "nonce": "22", + "storage": {} + }, + "0x3b873a919aa0512d5a0f09e6dcceaa4a6727fafe": { + "balance": "0x4d87094125a369d9bd5", + "code": "0x61deadff", + "nonce": "1", + "storage": {} + }, + "0xb436ba50d378d4bbc8660d312a13df6af6e89dfb": { + "balance": "0x1780d77678137ac1b775", + "code": "0x", + "nonce": "29072", + "storage": {} + } + }, + "config": { + "byzantiumBlock": 1700000, + "chainId": 3, + "daoForkSupport": true, + "eip150Block": 0, + "eip150Hash": "0x41941023680923e0fe4d74a34bdac8141f2540e3ae90623718e47d66d1ca4a2d", + "eip155Block": 10, + "eip158Block": 10, + "ethash": {}, + "homesteadBlock": 0 + }, + "difficulty": "3509749784", + "extraData": "0x4554482e45544846414e532e4f52472d4641313738394444", + "gasLimit": "4727564", + "hash": "0x609948ac3bd3c00b7736b933248891d6c901ee28f066241bddb28f4e00a9f440", + "miner": "0xbbf5029fd710d227630c8b7d338051b8e76d50b3", + "mixHash": "0xb131e4507c93c7377de00e7c271bf409ec7492767142ff0f45c882f8068c2ada", + "nonce": "0x4eb12e19c16d43da", + "number": "2289805", + "stateRoot": "0xc7f10f352bff82fac3c2999d3085093d12652e19c7fd32591de49dc5d91b4f1f", + "timestamp": "1513601261", + "totalDifficulty": "7143276353481064" + }, + "input": "0xf88b8271908506fc23ac0083015f90943b873a919aa0512d5a0f09e6dcceaa4a6727fafe80a463e4bff40000000000000000000000000024f658a46fbb89d8ac105e98d7ac7cbbaf27c52aa0bdce0b59e8761854e857fe64015f06dd08a4fbb7624f6094893a79a72e6ad6bea01d9dde033cff7bb235a3163f348a6d7ab8d6b52bc0963a95b91612e40ca766a4", + "result": { + "calls": [ + { + "from": "0x3b873a919aa0512d5a0f09e6dcceaa4a6727fafe", + "input": "0x", + "to": "0x000000000000000000000000000000000000dEaD", + "type": "SELFDESTRUCT", + "value": "0x4d87094125a369d9bd5" + } + ], + "from": "0xb436ba50d378d4bbc8660d312a13df6af6e89dfb", + "gas": "0x10738", + "gasUsed": "0x7533", + "input": "0x63e4bff40000000000000000000000000024f658a46fbb89d8ac105e98d7ac7cbbaf27c5", + "output": "0x", + "to": "0x3b873a919aa0512d5a0f09e6dcceaa4a6727fafe", + "type": "CALL", + "value": "0x0" + } +} From 82a41a0a375ac6c2a2fdf55150de673395bfcc2b Mon Sep 17 00:00:00 2001 From: Sina Mahmoodi Date: Mon, 13 Sep 2021 11:58:46 +0200 Subject: [PATCH 27/47] core/vm: refactor runtime js tracer test --- core/vm/runtime/runtime_test.go | 252 ++++++++++++++++---------------- 1 file changed, 127 insertions(+), 125 deletions(-) diff --git a/core/vm/runtime/runtime_test.go b/core/vm/runtime/runtime_test.go index 729dace1065f..17c563061db8 100644 --- a/core/vm/runtime/runtime_test.go +++ b/core/vm/runtime/runtime_test.go @@ -701,80 +701,8 @@ func TestColdAccountAccessCost(t *testing.T) { } func TestRuntimeJSTracer(t *testing.T) { - // A does four calls - // CALL to 0xbb - // CALLCODE to 0xcc - // STATICCALL to 0xdd - // DELEGATECALL to 0xee - mainCode := []byte{ - // CREATE - // Store initcode in memory at 0x00 (5 bytes left-padded to 32 bytes) - byte(vm.PUSH5), - // Init code: PUSH1 0, PUSH1 0, RETURN (3 steps) - byte(vm.PUSH1), 0, byte(vm.PUSH1), 0, byte(vm.RETURN), - byte(vm.PUSH1), 0, - byte(vm.MSTORE), - // length, offset, value - byte(vm.PUSH1), 5, byte(vm.PUSH1), 27, byte(vm.PUSH1), 0, - byte(vm.CREATE), - byte(vm.POP), - // CREATE2 - // Store initcode in memory at 0x00 (5 bytes left-padded to 32 bytes) - byte(vm.PUSH5), - // Init code: PUSH1 0, PUSH1 0, RETURN (3 steps) - byte(vm.PUSH1), 0, byte(vm.PUSH1), 0, byte(vm.RETURN), - byte(vm.PUSH1), 0, - byte(vm.MSTORE), - // salt, length, offset, value - byte(vm.PUSH1), 1, byte(vm.PUSH1), 5, byte(vm.PUSH1), 27, byte(vm.PUSH1), 0, - byte(vm.CREATE2), - byte(vm.POP), - // CALL - // outsize, outoffset, insize, inoffset - byte(vm.PUSH1), 0, byte(vm.PUSH1), 0, byte(vm.PUSH1), 0, byte(vm.PUSH1), 0, - byte(vm.PUSH1), 0, // value - byte(vm.PUSH1), 0xbb, //address - byte(vm.GAS), // gas - byte(vm.CALL), - byte(vm.POP), - // CALLCODE - // outsize, outoffset, insize, inoffset - byte(vm.PUSH1), 0, byte(vm.PUSH1), 0, byte(vm.PUSH1), 0, byte(vm.PUSH1), 0, - byte(vm.PUSH1), 0, // value - byte(vm.PUSH1), 0xcc, //address - byte(vm.GAS), // gas - byte(vm.CALLCODE), - byte(vm.POP), - // STATICCALL - // outsize, outoffset, insize, inoffset - byte(vm.PUSH1), 0, byte(vm.PUSH1), 0, byte(vm.PUSH1), 0, byte(vm.PUSH1), 0, - byte(vm.PUSH1), 0xdd, //address - byte(vm.GAS), // gas - byte(vm.STATICCALL), - byte(vm.POP), - // DELEGATECALL - // outsize, outoffset, insize, inoffset - byte(vm.PUSH1), 0, byte(vm.PUSH1), 0, byte(vm.PUSH1), 0, byte(vm.PUSH1), 0, - byte(vm.PUSH1), 0xee, //address - byte(vm.GAS), // gas - byte(vm.DELEGATECALL), - byte(vm.POP), - } - calleeCode := []byte{ - byte(vm.PUSH1), 0, - byte(vm.PUSH1), 0, - byte(vm.RETURN), - } - main := common.HexToAddress("0xaa") - statedb, _ := state.New(common.Hash{}, state.NewDatabase(rawdb.NewMemoryDatabase()), nil) - statedb.SetCode(main, mainCode) - statedb.SetCode(common.HexToAddress("0xbb"), calleeCode) - statedb.SetCode(common.HexToAddress("0xcc"), calleeCode) - statedb.SetCode(common.HexToAddress("0xdd"), calleeCode) - statedb.SetCode(common.HexToAddress("0xee"), calleeCode) - - jsTracer := ` - {enters: 0, exits: 0, enterGas: 0, gasUsed: 0, steps:0, + jsTracers := []string{ + `{enters: 0, exits: 0, enterGas: 0, gasUsed: 0, steps:0, step: function() { this.steps++}, fault: function() {}, result: function() { @@ -787,39 +715,8 @@ func TestRuntimeJSTracer(t *testing.T) { exit: function(res) { this.exits++; this.gasUsed = res.gasUsed; - }}` - tracer, err := tracers.New(jsTracer, new(tracers.Context)) - if err != nil { - t.Fatal(err) - } - _, _, err = Call(main, nil, &Config{ - State: statedb, - EVMConfig: vm.Config{ - Debug: true, - Tracer: tracer, - }}) - if err != nil { - t.Fatal("didn't expect error", err) - } - res, err := tracer.GetResult() - if err != nil { - t.Fatal(err) - } - if have, want := string(res), `"6,6,4294893899,6,70"`; have != want { - t.Errorf("wrong result, have \n%v\nwant\n%v\n", have, want) - } - - // Reset state - statedb, _ = state.New(common.Hash{}, state.NewDatabase(rawdb.NewMemoryDatabase()), nil) - statedb.SetCode(main, mainCode) - statedb.SetCode(common.HexToAddress("0xbb"), calleeCode) - statedb.SetCode(common.HexToAddress("0xcc"), calleeCode) - statedb.SetCode(common.HexToAddress("0xdd"), calleeCode) - statedb.SetCode(common.HexToAddress("0xee"), calleeCode) - - // This time without steps - jsTracer = ` - {enters: 0, exits: 0, enterGas: 0, gasUsed: 0, steps:0, + }}`, + `{enters: 0, exits: 0, enterGas: 0, gasUsed: 0, steps:0, fault: function() {}, result: function() { return [this.enters, this.exits,this.enterGas,this.gasUsed, this.steps].join(",") @@ -831,26 +728,131 @@ func TestRuntimeJSTracer(t *testing.T) { exit: function(res) { this.exits++; this.gasUsed = res.gasUsed; - }}` - tracer, err = tracers.New(jsTracer, new(tracers.Context)) - if err != nil { - t.Fatal(err) - } - _, _, err = Call(main, nil, &Config{ - State: statedb, - EVMConfig: vm.Config{ - Debug: true, - Tracer: tracer, - }}) - if err != nil { - t.Fatal("didn't expect error", err) + }}`} + tests := []struct { + code []byte + // One result per tracer + results []string + }{ + { + // CREATE + code: []byte{ + // Store initcode in memory at 0x00 (5 bytes left-padded to 32 bytes) + byte(vm.PUSH5), + // Init code: PUSH1 0, PUSH1 0, RETURN (3 steps) + byte(vm.PUSH1), 0, byte(vm.PUSH1), 0, byte(vm.RETURN), + byte(vm.PUSH1), 0, + byte(vm.MSTORE), + // length, offset, value + byte(vm.PUSH1), 5, byte(vm.PUSH1), 27, byte(vm.PUSH1), 0, + byte(vm.CREATE), + byte(vm.POP), + }, + results: []string{`"1,1,4294935775,6,12"`, `"1,1,4294935775,6,0"`}, + }, + { + // CREATE2 + code: []byte{ + // Store initcode in memory at 0x00 (5 bytes left-padded to 32 bytes) + byte(vm.PUSH5), + // Init code: PUSH1 0, PUSH1 0, RETURN (3 steps) + byte(vm.PUSH1), 0, byte(vm.PUSH1), 0, byte(vm.RETURN), + byte(vm.PUSH1), 0, + byte(vm.MSTORE), + // salt, length, offset, value + byte(vm.PUSH1), 1, byte(vm.PUSH1), 5, byte(vm.PUSH1), 27, byte(vm.PUSH1), 0, + byte(vm.CREATE2), + byte(vm.POP), + }, + results: []string{`"1,1,4294935766,6,13"`, `"1,1,4294935766,6,0"`}, + }, + { + // CALL + code: []byte{ + // outsize, outoffset, insize, inoffset + byte(vm.PUSH1), 0, byte(vm.PUSH1), 0, byte(vm.PUSH1), 0, byte(vm.PUSH1), 0, + byte(vm.PUSH1), 0, // value + byte(vm.PUSH1), 0xbb, //address + byte(vm.GAS), // gas + byte(vm.CALL), + byte(vm.POP), + }, + results: []string{`"1,1,4294964716,6,13"`, `"1,1,4294964716,6,0"`}, + }, + { + // CALLCODE + code: []byte{ + // outsize, outoffset, insize, inoffset + byte(vm.PUSH1), 0, byte(vm.PUSH1), 0, byte(vm.PUSH1), 0, byte(vm.PUSH1), 0, + byte(vm.PUSH1), 0, // value + byte(vm.PUSH1), 0xcc, //address + byte(vm.GAS), // gas + byte(vm.CALLCODE), + byte(vm.POP), + }, + results: []string{`"1,1,4294964716,6,13"`, `"1,1,4294964716,6,0"`}, + }, + { + // STATICCALL + code: []byte{ + // outsize, outoffset, insize, inoffset + byte(vm.PUSH1), 0, byte(vm.PUSH1), 0, byte(vm.PUSH1), 0, byte(vm.PUSH1), 0, + byte(vm.PUSH1), 0xdd, //address + byte(vm.GAS), // gas + byte(vm.STATICCALL), + byte(vm.POP), + }, + results: []string{`"1,1,4294964719,6,12"`, `"1,1,4294964719,6,0"`}, + }, + { + // DELEGATECALL + code: []byte{ + // outsize, outoffset, insize, inoffset + byte(vm.PUSH1), 0, byte(vm.PUSH1), 0, byte(vm.PUSH1), 0, byte(vm.PUSH1), 0, + byte(vm.PUSH1), 0xee, //address + byte(vm.GAS), // gas + byte(vm.DELEGATECALL), + byte(vm.POP), + }, + results: []string{`"1,1,4294964719,6,12"`, `"1,1,4294964719,6,0"`}, + }, } - res, err = tracer.GetResult() - if err != nil { - t.Fatal(err) + calleeCode := []byte{ + byte(vm.PUSH1), 0, + byte(vm.PUSH1), 0, + byte(vm.RETURN), } - if have, want := string(res), `"6,6,4294893899,6,0"`; have != want { - t.Errorf("wrong result, have \n%v\nwant\n%v\n", have, want) + main := common.HexToAddress("0xaa") + for i, jsTracer := range jsTracers { + for j, tc := range tests { + statedb, _ := state.New(common.Hash{}, state.NewDatabase(rawdb.NewMemoryDatabase()), nil) + statedb.SetCode(main, tc.code) + statedb.SetCode(common.HexToAddress("0xbb"), calleeCode) + statedb.SetCode(common.HexToAddress("0xcc"), calleeCode) + statedb.SetCode(common.HexToAddress("0xdd"), calleeCode) + statedb.SetCode(common.HexToAddress("0xee"), calleeCode) + + tracer, err := tracers.New(jsTracer, new(tracers.Context)) + if err != nil { + t.Fatal(err) + } + _, _, err = Call(main, nil, &Config{ + State: statedb, + EVMConfig: vm.Config{ + Debug: true, + Tracer: tracer, + }}) + if err != nil { + t.Fatal("didn't expect error", err) + } + res, err := tracer.GetResult() + if err != nil { + t.Fatal(err) + } + if have, want := string(res), tc.results[i]; have != want { + t.Errorf("wrong result for tracer %d testcase %d, have \n%v\nwant\n%v\n", i, j, have, want) + } + } } } From 6814a9d5f57f66a3cbd8dcad783fde97e8ce6245 Mon Sep 17 00:00:00 2001 From: Sina Mahmoodi Date: Mon, 13 Sep 2021 12:32:11 +0200 Subject: [PATCH 28/47] core/vm: test tracer exit when calling selfdestructing contract --- core/vm/runtime/runtime_test.go | 18 ++++++++++++++++++ 1 file changed, 18 insertions(+) diff --git a/core/vm/runtime/runtime_test.go b/core/vm/runtime/runtime_test.go index 17c563061db8..84c532447409 100644 --- a/core/vm/runtime/runtime_test.go +++ b/core/vm/runtime/runtime_test.go @@ -816,12 +816,29 @@ func TestRuntimeJSTracer(t *testing.T) { }, results: []string{`"1,1,4294964719,6,12"`, `"1,1,4294964719,6,0"`}, }, + { + // CALL self-destructing contract + code: []byte{ + // outsize, outoffset, insize, inoffset + byte(vm.PUSH1), 0, byte(vm.PUSH1), 0, byte(vm.PUSH1), 0, byte(vm.PUSH1), 0, + byte(vm.PUSH1), 0, // value + byte(vm.PUSH1), 0xff, //address + byte(vm.GAS), // gas + byte(vm.CALL), + byte(vm.POP), + }, + results: []string{`"1,1,4294964716,5003,12"`, `"1,1,4294964716,5003,0"`}, + }, } calleeCode := []byte{ byte(vm.PUSH1), 0, byte(vm.PUSH1), 0, byte(vm.RETURN), } + depressedCode := []byte{ + byte(vm.PUSH1), 0xaa, + byte(vm.SELFDESTRUCT), + } main := common.HexToAddress("0xaa") for i, jsTracer := range jsTracers { for j, tc := range tests { @@ -831,6 +848,7 @@ func TestRuntimeJSTracer(t *testing.T) { statedb.SetCode(common.HexToAddress("0xcc"), calleeCode) statedb.SetCode(common.HexToAddress("0xdd"), calleeCode) statedb.SetCode(common.HexToAddress("0xee"), calleeCode) + statedb.SetCode(common.HexToAddress("0xff"), depressedCode) tracer, err := tracers.New(jsTracer, new(tracers.Context)) if err != nil { From 5525eda89df474b3aaf708f0a243fd2c9a746838 Mon Sep 17 00:00:00 2001 From: Sina Mahmoodi Date: Mon, 13 Sep 2021 13:23:27 +0200 Subject: [PATCH 29/47] core/vm: add self-destruct as callframe to tracer --- core/vm/instructions.go | 4 ++++ core/vm/runtime/runtime_test.go | 2 +- 2 files changed, 5 insertions(+), 1 deletion(-) diff --git a/core/vm/instructions.go b/core/vm/instructions.go index 6c8c6e6e6fa1..bda480f083d4 100644 --- a/core/vm/instructions.go +++ b/core/vm/instructions.go @@ -791,6 +791,10 @@ func opSuicide(pc *uint64, interpreter *EVMInterpreter, scope *ScopeContext) ([] balance := interpreter.evm.StateDB.GetBalance(scope.Contract.Address()) interpreter.evm.StateDB.AddBalance(beneficiary.Bytes20(), balance) interpreter.evm.StateDB.Suicide(scope.Contract.Address()) + if interpreter.cfg.Debug { + interpreter.cfg.Tracer.CaptureEnter(SELFDESTRUCT, scope.Contract.Address(), beneficiary.Bytes20(), []byte{}, 0, balance) + interpreter.cfg.Tracer.CaptureExit([]byte{}, 0, nil) + } return nil, nil } diff --git a/core/vm/runtime/runtime_test.go b/core/vm/runtime/runtime_test.go index 84c532447409..983b1f482b2f 100644 --- a/core/vm/runtime/runtime_test.go +++ b/core/vm/runtime/runtime_test.go @@ -827,7 +827,7 @@ func TestRuntimeJSTracer(t *testing.T) { byte(vm.CALL), byte(vm.POP), }, - results: []string{`"1,1,4294964716,5003,12"`, `"1,1,4294964716,5003,0"`}, + results: []string{`"2,2,0,5003,12"`, `"2,2,0,5003,0"`}, }, } calleeCode := []byte{ From 386d04e359f151b3351f485e3442ba4b58d5a58e Mon Sep 17 00:00:00 2001 From: Sina Mahmoodi Date: Mon, 13 Sep 2021 13:25:16 +0200 Subject: [PATCH 30/47] core/vm: rm extra comment --- core/vm/evm.go | 1 - 1 file changed, 1 deletion(-) diff --git a/core/vm/evm.go b/core/vm/evm.go index 0f23ee894ff0..3b4bd69d7572 100644 --- a/core/vm/evm.go +++ b/core/vm/evm.go @@ -451,7 +451,6 @@ func (evm *EVM) create(caller ContractRef, codeAndHash *codeAndHash, gas uint64, if evm.depth == 0 { evm.Config.Tracer.CaptureStart(evm, caller.Address(), address, true, codeAndHash.code, gas, value) } else { - // TODO: Make sure we should capture init code's call frame for the tracer evm.Config.Tracer.CaptureEnter(typ, caller.Address(), address, codeAndHash.code, gas, value) } } From b055bce806ad7d4206231d58c91445e4bc5b2683 Mon Sep 17 00:00:00 2001 From: Sina Mahmoodi <1591639+s1na@users.noreply.github.com> Date: Mon, 13 Sep 2021 22:03:14 +0200 Subject: [PATCH 31/47] core/vm: use CopyBytes Co-authored-by: Martin Holst Swende --- core/vm/logger.go | 4 +--- 1 file changed, 1 insertion(+), 3 deletions(-) diff --git a/core/vm/logger.go b/core/vm/logger.go index 3aebf46bcd39..cde56afd693d 100644 --- a/core/vm/logger.go +++ b/core/vm/logger.go @@ -268,9 +268,7 @@ func (l *StructLogger) CaptureEnter(typ OpCode, from common.Address, to common.A func (l *StructLogger) CaptureExit(output []byte, gasUsed uint64, err error) { frame := l.frames[len(l.frames)-1] frame.GasUsed = gasUsed - out := make([]byte, len(output)) - copy(out, output) - frame.Output = out + frame.Output = common.CopyBytes(output) frame.Err = err } From 992ec6d4a9703680bc8d7c9097b8d44b84e4e04e Mon Sep 17 00:00:00 2001 From: Sina Mahmoodi Date: Mon, 13 Sep 2021 22:05:52 +0200 Subject: [PATCH 32/47] core/vm: minor --- core/vm/logger.go | 1 - 1 file changed, 1 deletion(-) diff --git a/core/vm/logger.go b/core/vm/logger.go index cde56afd693d..d3ca70190e18 100644 --- a/core/vm/logger.go +++ b/core/vm/logger.go @@ -260,7 +260,6 @@ func (l *StructLogger) CaptureEnd(output []byte, gasUsed uint64, t time.Duration func (l *StructLogger) CaptureEnter(typ OpCode, from common.Address, to common.Address, input []byte, gas uint64, value *big.Int) { in := make([]byte, len(input)) copy(in, input) - // TODO: should we honor `l.Cfg.Limit` for frames too? frame := StructFrame{typ.String(), from, to, in, gas, new(big.Int).Set(value), 0, nil, nil} l.frames = append(l.frames, frame) } From 27de81aef95a627adb63e84b1a0ee1b24cec0032 Mon Sep 17 00:00:00 2001 From: Sina Mahmoodi Date: Mon, 13 Sep 2021 22:19:01 +0200 Subject: [PATCH 33/47] core/vm: dont emit enter&exit in JSONLogger --- core/vm/logger_json.go | 22 ++-------------------- 1 file changed, 2 insertions(+), 20 deletions(-) diff --git a/core/vm/logger_json.go b/core/vm/logger_json.go index 90104b67b4c6..e70bb21692b4 100644 --- a/core/vm/logger_json.go +++ b/core/vm/logger_json.go @@ -23,7 +23,6 @@ import ( "time" "github.com/ethereum/go-ethereum/common" - "github.com/ethereum/go-ethereum/common/hexutil" "github.com/ethereum/go-ethereum/common/math" ) @@ -90,26 +89,9 @@ func (l *JSONLogger) CaptureEnd(output []byte, gasUsed uint64, t time.Duration, } func (l *JSONLogger) CaptureEnter(typ OpCode, from common.Address, to common.Address, input []byte, gas uint64, value *big.Int) { - frame := StructFrame{ - Type: typ.String(), - From: from, - To: to, - Input: input, - Gas: gas, - Value: value, - } - l.encoder.Encode(frame) + // Noop } func (l *JSONLogger) CaptureExit(output []byte, gasUsed uint64, err error) { - type exitLog struct { - Output hexutil.Bytes `json:"output"` - GasUsed math.HexOrDecimal64 `json:"gasUsed"` - Err string `json:"error,omitempty"` - } - var errMsg string - if err != nil { - errMsg = err.Error() - } - l.encoder.Encode(exitLog{output, math.HexOrDecimal64(gasUsed), errMsg}) + // Noop } From 78475bc5eabb9be522e6e6166b7fefe622f2c1ec Mon Sep 17 00:00:00 2001 From: Sina Mahmoodi Date: Tue, 14 Sep 2021 09:23:43 +0200 Subject: [PATCH 34/47] core/vm: dont collect frames in structlogger --- core/vm/gen_structframe.go | 89 -------------------------------------- core/vm/logger.go | 44 +------------------ core/vm/logger_json.go | 5 +-- 3 files changed, 2 insertions(+), 136 deletions(-) delete mode 100644 core/vm/gen_structframe.go diff --git a/core/vm/gen_structframe.go b/core/vm/gen_structframe.go deleted file mode 100644 index cee5085d2590..000000000000 --- a/core/vm/gen_structframe.go +++ /dev/null @@ -1,89 +0,0 @@ -// Code generated by github.com/fjl/gencodec. DO NOT EDIT. - -package vm - -import ( - "encoding/json" - "math/big" - - "github.com/ethereum/go-ethereum/common" - "github.com/ethereum/go-ethereum/common/hexutil" - "github.com/ethereum/go-ethereum/common/math" -) - -var _ = (*structFrameMarshaling)(nil) - -// MarshalJSON marshals as JSON. -func (s StructFrame) MarshalJSON() ([]byte, error) { - type StructFrame struct { - Type string `json:"type"` - From common.Address `json:"from"` - To common.Address `json:"to"` - Input hexutil.Bytes `json:"input"` - Gas math.HexOrDecimal64 `json:"gas"` - Value *math.HexOrDecimal256 `json:"value"` - GasUsed uint64 `json:"-"` - Output []byte `json:"-"` - Err error `json:"-"` - ErrorString string `json:"error"` - } - var enc StructFrame - enc.Type = s.Type - enc.From = s.From - enc.To = s.To - enc.Input = s.Input - enc.Gas = math.HexOrDecimal64(s.Gas) - enc.Value = (*math.HexOrDecimal256)(s.Value) - enc.GasUsed = s.GasUsed - enc.Output = s.Output - enc.Err = s.Err - enc.ErrorString = s.ErrorString() - return json.Marshal(&enc) -} - -// UnmarshalJSON unmarshals from JSON. -func (s *StructFrame) UnmarshalJSON(input []byte) error { - type StructFrame struct { - Type *string `json:"type"` - From *common.Address `json:"from"` - To *common.Address `json:"to"` - Input *hexutil.Bytes `json:"input"` - Gas *math.HexOrDecimal64 `json:"gas"` - Value *math.HexOrDecimal256 `json:"value"` - GasUsed *uint64 `json:"-"` - Output []byte `json:"-"` - Err error `json:"-"` - } - var dec StructFrame - if err := json.Unmarshal(input, &dec); err != nil { - return err - } - if dec.Type != nil { - s.Type = *dec.Type - } - if dec.From != nil { - s.From = *dec.From - } - if dec.To != nil { - s.To = *dec.To - } - if dec.Input != nil { - s.Input = *dec.Input - } - if dec.Gas != nil { - s.Gas = uint64(*dec.Gas) - } - if dec.Value != nil { - s.Value = (*big.Int)(dec.Value) - } - if dec.GasUsed != nil { - s.GasUsed = *dec.GasUsed - } - if dec.Output != nil { - s.Output = dec.Output - } - if dec.Err != nil { - s.Err = dec.Err - } - return nil -} diff --git a/core/vm/logger.go b/core/vm/logger.go index d3ca70190e18..260ef1d90bc5 100644 --- a/core/vm/logger.go +++ b/core/vm/logger.go @@ -57,7 +57,6 @@ type LogConfig struct { } //go:generate gencodec -type StructLog -field-override structLogMarshaling -out gen_structlog.go -//go:generate gencodec -type StructFrame -field-override structFrameMarshaling -out gen_structframe.go // StructLog is emitted to the EVM each cycle and lists information about the current internal state // prior to the execution of the statement. @@ -99,34 +98,6 @@ func (s *StructLog) ErrorString() string { return "" } -// StructFrame is emitted to the EVM upon stepping into a new call frame. -type StructFrame struct { - Type string `json:"type"` - From common.Address `json:"from"` - To common.Address `json:"to"` - Input []byte `json:"input"` - Gas uint64 `json:"gas"` - Value *big.Int `json:"value"` - GasUsed uint64 `json:"-"` - Output []byte `json:"-"` - Err error `json:"-"` -} - -// ErrorString formats the log's error as a string. -func (s *StructFrame) ErrorString() string { - if s.Err != nil { - return s.Err.Error() - } - return "" -} - -type structFrameMarshaling struct { - Input hexutil.Bytes `json:"input"` - Gas math.HexOrDecimal64 `json:"gas"` - Value *math.HexOrDecimal256 `json:"value"` - ErrorString string `json:"error"` -} - // Tracer is used to collect execution traces from an EVM transaction // execution. CaptureState is called for each step of the VM with the // current VM state. @@ -151,7 +122,6 @@ type StructLogger struct { storage map[common.Address]Storage logs []StructLog - frames []StructFrame output []byte err error } @@ -258,25 +228,13 @@ func (l *StructLogger) CaptureEnd(output []byte, gasUsed uint64, t time.Duration } func (l *StructLogger) CaptureEnter(typ OpCode, from common.Address, to common.Address, input []byte, gas uint64, value *big.Int) { - in := make([]byte, len(input)) - copy(in, input) - frame := StructFrame{typ.String(), from, to, in, gas, new(big.Int).Set(value), 0, nil, nil} - l.frames = append(l.frames, frame) } -func (l *StructLogger) CaptureExit(output []byte, gasUsed uint64, err error) { - frame := l.frames[len(l.frames)-1] - frame.GasUsed = gasUsed - frame.Output = common.CopyBytes(output) - frame.Err = err -} +func (l *StructLogger) CaptureExit(output []byte, gasUsed uint64, err error) {} // StructLogs returns the captured log entries. func (l *StructLogger) StructLogs() []StructLog { return l.logs } -// StructFrames returns the captured call frames. -func (l *StructLogger) StructFrames() []StructFrame { return l.frames } - // Error returns the VM error captured by the trace. func (l *StructLogger) Error() error { return l.err } diff --git a/core/vm/logger_json.go b/core/vm/logger_json.go index e70bb21692b4..b90f134cd3b5 100644 --- a/core/vm/logger_json.go +++ b/core/vm/logger_json.go @@ -89,9 +89,6 @@ func (l *JSONLogger) CaptureEnd(output []byte, gasUsed uint64, t time.Duration, } func (l *JSONLogger) CaptureEnter(typ OpCode, from common.Address, to common.Address, input []byte, gas uint64, value *big.Int) { - // Noop } -func (l *JSONLogger) CaptureExit(output []byte, gasUsed uint64, err error) { - // Noop -} +func (l *JSONLogger) CaptureExit(output []byte, gasUsed uint64, err error) {} From 366ecfd5e7265c67ad6b7bfe4e405b5a868d9de3 Mon Sep 17 00:00:00 2001 From: Sina Mahmoodi Date: Tue, 14 Sep 2021 09:24:53 +0200 Subject: [PATCH 35/47] core/vm: minor --- core/vm/logger.go | 5 +---- 1 file changed, 1 insertion(+), 4 deletions(-) diff --git a/core/vm/logger.go b/core/vm/logger.go index 260ef1d90bc5..37737ea57a16 100644 --- a/core/vm/logger.go +++ b/core/vm/logger.go @@ -351,9 +351,6 @@ func (t *mdLogger) CaptureEnd(output []byte, gasUsed uint64, tm time.Duration, e } func (t *mdLogger) CaptureEnter(typ OpCode, from common.Address, to common.Address, input []byte, gas uint64, value *big.Int) { - // TODO } -func (t *mdLogger) CaptureExit(output []byte, gasUsed uint64, err error) { - // TODO -} +func (t *mdLogger) CaptureExit(output []byte, gasUsed uint64, err error) {} From 4ad29ff9a1a90fea409d80b73959685b8c5e3eca Mon Sep 17 00:00:00 2001 From: Sina Mahmoodi Date: Tue, 14 Sep 2021 16:33:02 +0200 Subject: [PATCH 36/47] eth,core/vm: lazy-push callframe fields to JS --- core/vm/runtime/runtime_test.go | 8 +- eth/tracers/internal/tracers/assets.go | 6 +- .../internal/tracers/callframe_tracer.js | 22 +-- eth/tracers/tracer.go | 142 +++++++++++++++--- eth/tracers/tracer_test.go | 2 +- 5 files changed, 139 insertions(+), 41 deletions(-) diff --git a/core/vm/runtime/runtime_test.go b/core/vm/runtime/runtime_test.go index 983b1f482b2f..5e48865bd85d 100644 --- a/core/vm/runtime/runtime_test.go +++ b/core/vm/runtime/runtime_test.go @@ -710,11 +710,11 @@ func TestRuntimeJSTracer(t *testing.T) { }, enter: function(frame) { this.enters++; - this.enterGas = frame.gas; + this.enterGas = frame.getGas(); }, exit: function(res) { this.exits++; - this.gasUsed = res.gasUsed; + this.gasUsed = res.getGasUsed(); }}`, `{enters: 0, exits: 0, enterGas: 0, gasUsed: 0, steps:0, fault: function() {}, @@ -723,11 +723,11 @@ func TestRuntimeJSTracer(t *testing.T) { }, enter: function(frame) { this.enters++; - this.enterGas = frame.gas; + this.enterGas = frame.getGas(); }, exit: function(res) { this.exits++; - this.gasUsed = res.gasUsed; + this.gasUsed = res.getGasUsed(); }}`} tests := []struct { code []byte diff --git a/eth/tracers/internal/tracers/assets.go b/eth/tracers/internal/tracers/assets.go index 7e6ff09dbb1f..78ea10942424 100644 --- a/eth/tracers/internal/tracers/assets.go +++ b/eth/tracers/internal/tracers/assets.go @@ -3,7 +3,7 @@ // 4byte_tracer.js (2.933kB) // bigram_tracer.js (1.712kB) // call_tracer.js (8.956kB) -// callframe_tracer.js (4.064kB) +// callframe_tracer.js (4.119kB) // evmdis_tracer.js (4.195kB) // noop_tracer.js (1.271kB) // opcount_tracer.js (1.372kB) @@ -138,7 +138,7 @@ func call_tracerJs() (*asset, error) { return a, nil } -var _callframe_tracerJs = []byte("\x1f\x8b\x08\x00\x00\x00\x00\x00\x00\xff\xd4\x57\x51\x6f\xdb\xb8\x0f\x7f\x76\x3e\x05\xff\x7d\x58\x1b\x2c\x8b\xdb\xfd\x81\x3d\x64\xcb\x80\xdc\xb0\x6e\x05\x7a\x5d\x91\xa6\x18\x8a\xa2\x0f\x4a\x4c\xdb\xda\x14\xc9\x90\xe8\xa6\xb9\x2e\xdf\xfd\x40\xc9\x4e\xec\x34\xe9\x7a\x4f\x87\xeb\x53\x43\xfe\xf8\x23\x45\x91\x14\x1d\xc7\xf0\xc9\x14\x4b\x2b\xb3\x9c\xe0\xed\xf1\xdb\x13\x98\xe4\x08\x99\x79\x83\x94\xa3\xc5\x72\x0e\xa3\x92\x72\x63\x5d\x27\x8e\x61\x92\x4b\x07\xa9\x54\x08\xd2\x41\x21\x2c\x81\x49\x81\xb6\xf0\x4a\x4e\xad\xb0\xcb\x7e\x27\x8e\x83\xcd\x4e\x35\x33\xa4\x16\x11\x9c\x49\x69\x21\x2c\x0e\x60\x69\x4a\x98\x09\x0d\x16\x13\xe9\xc8\xca\x69\x49\x08\x92\x40\xe8\x24\x36\x16\xe6\x26\x91\xe9\x92\x29\x25\x41\xa9\x13\xb4\xde\x35\xa1\x9d\xbb\x3a\x8e\x2f\x17\xd7\x70\x8e\xce\xa1\x85\x2f\xa8\xd1\x0a\x05\x97\xe5\x54\xc9\x19\x9c\xcb\x19\x6a\x87\x20\x1c\x14\x2c\x71\x39\x26\x30\xf5\x74\x6c\x78\xca\xa1\x5c\x55\xa1\xc0\xa9\x29\x75\x22\x48\x1a\xdd\x03\x94\x1c\x39\xdc\xa3\x75\xd2\x68\xf8\x7f\xed\xaa\x22\xec\x81\xb1\x4c\x72\x24\x88\x0f\x60\xc1\x14\x6c\xd7\x05\xa1\x97\xa0\x04\x6d\x4c\x5f\x90\x90\xcd\xb9\x13\x90\xda\xbb\xc9\x4d\x81\x40\xb9\x20\x3e\xf5\x42\x2a\x05\x53\x84\xd2\x61\x5a\xaa\x1e\xb3\x4d\x4b\x82\xef\x67\x93\xaf\xdf\xae\x27\x30\xba\xb8\x81\xef\xa3\xf1\x78\x74\x31\xb9\x79\x0f\x0b\x49\xb9\x29\x09\xf0\x1e\x03\x95\x9c\x17\x4a\x62\x02\x0b\x61\xad\xd0\xb4\x04\x93\x32\xc3\x9f\x9f\xc7\x9f\xbe\x8e\x2e\x26\xa3\x3f\xce\xce\xcf\x26\x37\x60\x2c\x9c\x9e\x4d\x2e\x3e\x5f\x5d\xc1\xe9\xb7\x31\x8c\xe0\x72\x34\x9e\x9c\x7d\xba\x3e\x1f\x8d\xe1\xf2\x7a\x7c\xf9\xed\xea\x73\x1f\xae\x90\xa3\x42\xb6\xff\x7d\xce\x53\x7f\x7b\x16\x21\x41\x12\x52\xb9\x3a\x13\x37\xa6\x04\x97\x9b\x52\x25\x90\x8b\x7b\x04\x8b\x33\x94\xf7\x98\x80\x80\x99\x29\x96\x2f\xbe\x54\xe6\x12\xca\xe8\xcc\x9f\x79\x6f\x41\xc2\x59\x0a\xda\x50\x0f\x1c\x22\x7c\xc8\x89\x8a\x41\x1c\x2f\x16\x8b\x7e\xa6\xcb\xbe\xb1\x59\xac\x02\x9d\x8b\x3f\xf6\x3b\x1d\x26\x9d\x09\xa5\x4e\xad\x98\xe3\xc4\x8a\x19\x5a\xce\xbb\xf3\xf4\x1a\x17\x5e\x09\x29\x6b\x81\xac\x98\x49\x9d\xc1\x1c\x29\x37\x89\x03\x32\x60\xb1\x30\x96\xaa\x9b\x02\xa9\x53\x63\xe7\xbe\xa2\x7c\xb0\x53\xbe\x18\xa9\x09\xad\x16\x0a\xe6\xe8\x9c\xc8\xd0\x57\xb1\x60\x32\xed\xc4\x8c\x7c\xc9\x3c\x76\x00\xc0\xbb\x72\x24\x66\x3f\x07\x70\xfb\xb8\xba\xeb\x79\xa1\x23\x2c\x06\x90\x96\xda\x43\x8f\x94\xc9\x7a\x90\x4c\xbb\xf0\xb8\x0a\xfa\x54\x94\x8a\x76\x02\xbc\x9a\xff\xee\x85\x05\x85\x1a\x86\x40\xb9\x74\xfd\xb5\x9b\xbe\x42\x9d\x51\xbe\xc6\xc9\x14\x8e\x18\xf7\x11\x4e\x9a\xe6\x35\x85\xcf\xc4\x13\x8e\xc2\x14\x47\xdd\x16\x96\x69\xda\xa0\x5b\x85\xfa\xcd\xc9\x5d\x10\xc0\x70\x38\xf4\x8d\x9d\x4a\x8d\xc9\xb6\x23\xfe\x7b\xd6\x18\x6e\xef\x5a\x06\xab\xce\x0b\x4d\xfb\x45\xe9\xf2\x23\xfe\x77\x13\x6e\x30\xae\x32\x69\xd1\xb5\x53\x39\xa3\x87\xed\x54\xc6\x31\x5c\x5a\x2c\x78\x7a\x98\x92\xbb\xbe\xba\x54\x7f\xf5\xad\x84\x07\x36\x18\x6e\x9d\x8f\x96\x05\x0e\xfc\x65\xd3\x43\x9f\x7f\xf4\x5a\xea\xd4\x9a\xb9\x57\x93\xf9\x8a\x0f\x1c\x41\x9f\x45\xdd\x36\x8a\xcc\xa0\xfe\xa7\x46\x91\xd9\xc2\xdc\x0b\x55\x7a\x4f\x87\xc7\x0f\x87\xf0\xda\xfb\xf3\xb2\x3e\x99\x2b\xb2\x52\x67\x47\x27\xef\xb6\x6c\x32\xe1\x02\x71\x65\x33\x95\xd9\x99\x26\xcf\x9f\x09\xd7\x7d\xde\xf2\xda\x61\x32\xd8\x6d\xc9\xaa\xe7\xac\xa5\x2e\x4a\x1a\xb4\xce\xe3\x45\x5b\x30\x53\x52\xc0\x6d\x60\x41\xd4\xc0\xad\x5a\xd5\xbc\x55\x0e\xc7\x75\x15\xfd\x6f\x7f\x09\x86\x7b\x5b\x57\xdb\x1e\x86\x17\xfb\x43\x6b\x8d\x7d\x81\xbf\x80\xdb\xe5\xcf\x6b\x36\xfe\x00\x95\x43\xef\x8c\xcf\xff\x4f\xe9\xd7\x36\x7b\x0e\xd0\x82\xb7\x68\xe1\xd5\xab\x1d\xea\x03\x7c\xc0\x59\xc9\xdd\x02\x16\xef\xd1\x12\x26\x07\xf0\xeb\x57\xed\x36\x5c\x0f\x77\xfc\xc1\xf1\xc3\x41\xb7\x1d\x5a\x82\x0a\x09\xdb\xd0\x46\x58\x9d\xcd\x11\xa8\xb4\x3a\x64\x26\x95\x5a\x28\xf9\x17\x56\x91\x74\x9b\xfd\x8b\x3c\x68\x1b\xed\xeb\x87\xf6\xf6\x1c\xac\x86\xd8\xae\xa6\xf4\xf8\xbd\x3d\x19\x6a\x2e\x60\xf6\xb4\x64\x13\xf2\xa4\x1f\xab\x1a\x6f\x62\x76\xd5\xb8\x6f\xc1\x76\x13\x05\x70\xbb\x01\x0f\x4f\xde\x1d\xee\xad\xfa\x60\xe0\x9b\x7d\xab\x34\xda\xc7\xe6\x5c\x04\xd8\x70\x97\x47\xaf\x69\xb7\xed\x0e\x87\xdb\xcf\x41\x7b\xc8\xd6\x57\xf3\x20\x69\xfb\x66\xc6\xe1\x06\xff\xbd\x77\xca\x1f\xbf\x9a\x4e\x30\xdc\x95\xf4\x10\xe2\x8e\x09\xe6\xd3\xff\x94\xac\x2e\xf7\xe6\x2d\x8f\x9b\xe5\xfd\xf4\xa1\x6c\x62\x7e\xdb\xcc\x0d\x57\x75\x43\x3f\xb1\x7f\xe6\x71\xe4\x9c\xbd\x19\xc2\xc9\x7f\xfe\xb5\x8e\xe2\x18\xea\x49\xc0\xeb\xa4\x45\x41\xe8\x78\x9f\xe4\xab\x37\xd3\x1f\x38\xe3\x9d\x8c\x77\x35\x5e\xe3\x3c\x14\x12\x74\xd2\x62\x02\xa9\x44\x95\x80\xe1\x0f\x0b\xde\x58\x7f\x38\xa3\x3d\xa1\x43\x2b\x99\xd1\xaf\x6f\xfd\xf0\x11\x24\x99\x54\xcb\x19\xd2\x12\x52\x14\x54\x5a\xe4\xad\xaf\x10\xce\xc1\x1c\x85\x96\x3a\x4b\x4b\xa5\x96\x60\x6c\x82\x4c\x1e\xc6\x92\xf3\x84\x64\x78\x2f\xb4\x0e\x16\xb9\x81\xc4\xe8\xc3\x6a\x17\x2c\x2c\xf2\x9a\xdf\x83\x1f\xa5\x23\xfe\x18\x28\x94\x58\x82\xa4\x7e\x27\xaa\x0f\xd5\x5c\x42\x38\x05\xf0\xd8\x89\x22\xae\x6d\x67\x78\xc4\xfa\x01\x16\x45\xd1\x66\x99\xe0\x92\x08\x93\x2b\x8a\xa2\xf5\x12\xe1\xc5\xfc\xcb\x8b\xd7\x5b\x43\x40\x1b\x2f\x5c\xaf\x09\x9b\x61\xe0\xe5\xeb\x55\xa0\xee\x92\x5a\x1a\x9e\xf9\x66\xef\x78\xcd\xfa\x09\xf7\x1a\xff\xcb\xcb\xd7\x6f\x76\xa3\x41\xbc\xc2\x17\xeb\xa0\x55\xce\x21\x4a\x39\x6f\x9e\x49\xce\x43\x3c\xbe\x28\xd6\x70\xff\x8b\xe5\xab\x4e\x14\xf1\x2d\x1e\x71\x72\x7e\xe2\x92\xbf\xa7\x42\x8e\x42\xce\x22\x2e\xef\x20\xb8\xfd\x89\xcb\xbb\xa7\xe5\x1c\x45\x51\x54\xbd\x44\x0d\x1c\x8b\x57\x15\xff\x86\x62\xdf\xf6\x10\x35\x82\x90\xc3\xe3\xf7\x20\x3f\x34\x0d\xaa\xf9\xf5\x1e\xe4\xeb\xd7\xb5\xcb\xa6\xfe\x56\xde\xd5\xf3\x6a\xfd\xbe\x6d\xe9\xbb\xcd\x80\xaa\x07\x31\x40\x3a\xd1\xaa\xb3\xea\xfc\x1d\x00\x00\xff\xff\x4a\x66\xaf\x2a\xe0\x0f\x00\x00") +var _callframe_tracerJs = []byte("\x1f\x8b\x08\x00\x00\x00\x00\x00\x00\xff\xd4\x57\x4d\x6f\xdb\x38\x13\x3e\xcb\xbf\x62\xde\x1c\x1a\x1b\x75\xad\xa4\x2f\xd0\x83\x5b\x17\xf0\x16\x49\x6b\x20\x9b\x04\x8e\xb3\x45\x10\xe4\x40\x5b\x23\x89\x2d\x4d\x0a\x24\x15\xc7\x9b\xfa\xbf\x2f\x86\x94\x64\x49\xb6\xb3\xd9\xd3\x62\x73\x8a\x87\xcf\x3c\x33\x9c\x2f\x8e\xc2\x10\xbe\xa8\x6c\xad\x79\x92\x5a\x78\x7f\xf2\xfe\x14\x66\x29\x42\xa2\xde\xa1\x4d\x51\x63\xbe\x84\x71\x6e\x53\xa5\x4d\x27\x0c\x61\x96\x72\x03\x31\x17\x08\xdc\x40\xc6\xb4\x05\x15\x83\x6d\xe1\x05\x9f\x6b\xa6\xd7\x83\x4e\x18\x7a\x9d\xbd\xc7\xc4\x10\x6b\x44\x30\x2a\xb6\x2b\xa6\x71\x08\x6b\x95\xc3\x82\x49\xd0\x18\x71\x63\x35\x9f\xe7\x16\x81\x5b\x60\x32\x0a\x95\x86\xa5\x8a\x78\xbc\x26\x4a\x6e\x21\x97\x11\x6a\x67\xda\xa2\x5e\x9a\xd2\x8f\xaf\x97\xb7\x70\x81\xc6\xa0\x86\xaf\x28\x51\x33\x01\xd7\xf9\x5c\xf0\x05\x5c\xf0\x05\x4a\x83\xc0\x0c\x64\x24\x31\x29\x46\x30\x77\x74\xa4\x78\x4e\xae\xdc\x14\xae\xc0\xb9\xca\x65\xc4\x2c\x57\xb2\x0f\xc8\xc9\x73\x78\x44\x6d\xb8\x92\xf0\xff\xd2\x54\x41\xd8\x07\xa5\x89\xa4\xcb\x2c\x5d\x40\x83\xca\x48\xaf\x07\x4c\xae\x41\x30\xbb\x55\x7d\x45\x40\xb6\xf7\x8e\x80\x4b\x67\x26\x55\x19\x82\x4d\x99\xa5\x5b\xaf\xb8\x10\x30\x47\xc8\x0d\xc6\xb9\xe8\x13\xdb\x3c\xb7\xf0\x7d\x32\xfb\x76\x75\x3b\x83\xf1\xe5\x1d\x7c\x1f\x4f\xa7\xe3\xcb\xd9\xdd\x47\x58\x71\x9b\xaa\xdc\x02\x3e\xa2\xa7\xe2\xcb\x4c\x70\x8c\x60\xc5\xb4\x66\xd2\xae\x41\xc5\xc4\xf0\xfb\xd9\xf4\xcb\xb7\xf1\xe5\x6c\xfc\xdb\xe4\x62\x32\xbb\x03\xa5\xe1\x7c\x32\xbb\x3c\xbb\xb9\x81\xf3\xab\x29\x8c\xe1\x7a\x3c\x9d\x4d\xbe\xdc\x5e\x8c\xa7\x70\x7d\x3b\xbd\xbe\xba\x39\x1b\xc0\x0d\x92\x57\x48\xfa\x7f\x1f\xf3\xd8\x65\x4f\x23\x44\x68\x19\x17\xa6\x8c\xc4\x9d\xca\xc1\xa4\x2a\x17\x11\xa4\xec\x11\x41\xe3\x02\xf9\x23\x46\xc0\x60\xa1\xb2\xf5\xab\x93\x4a\x5c\x4c\x28\x99\xb8\x3b\x1f\x2c\x48\x98\xc4\x20\x95\xed\x83\x41\x84\x4f\xa9\xb5\xd9\x30\x0c\x57\xab\xd5\x20\x91\xf9\x40\xe9\x24\x14\x9e\xce\x84\x9f\x07\x9d\x0e\x91\x2e\x98\x10\xe7\x9a\x2d\x71\xa6\xd9\x02\x35\xc5\xdd\x38\x7a\x89\x2b\x77\x08\x31\x9d\x82\xd5\x6c\xc1\x65\x02\x4b\xb4\xa9\x8a\x0c\x58\x05\x1a\x33\xa5\x6d\x91\x29\xe0\x32\x56\x7a\xe9\x2a\xca\x39\x3b\xa7\xc4\x70\x69\x51\x4b\x26\x60\x89\xc6\xb0\x04\x5d\x15\x33\x22\x93\x86\x2d\xac\x2b\x99\xe7\x0e\x00\x38\x53\xc6\xb2\xc5\xcf\x21\xdc\x3f\x6f\x1e\xfa\x4e\x68\x2c\x66\x43\x88\x73\xe9\xa0\x5d\xa1\x92\x3e\x44\xf3\x1e\x3c\x6f\xfc\x79\xcc\x72\x61\xf7\x02\xdc\x31\xfd\x3d\x32\x0d\x02\x25\x8c\xc0\xa6\xdc\x0c\x2a\x33\x03\x81\x32\xb1\x69\x85\xe3\x31\x74\x09\xf7\x19\x4e\xeb\xea\x25\x85\x8b\xc4\x0e\x47\xa6\xb2\x6e\xaf\x81\x25\x9a\x26\xe8\x5e\xa0\x7c\x77\xfa\xe0\x05\x30\x1a\x8d\x5c\x63\xc7\x5c\x62\xd4\x36\x44\x7f\x2f\x2a\xc3\xfd\x43\x43\x61\xd3\x79\xa5\xea\x20\xcb\x4d\xda\xa5\x7f\xb7\xee\x7a\xe5\x22\x92\x1a\x4d\x33\x94\x0b\xfb\xd4\x0e\x65\x18\xc2\xb5\xc6\x8c\xa6\x87\xca\xa9\xeb\x8b\xa4\xba\xd4\x37\x02\xee\xd9\x60\xd4\xba\x9f\x5d\x67\x38\x74\xc9\xb6\x4f\x03\xfa\xd1\x6f\x1c\xc7\x5a\x2d\xdd\xb1\x55\xdf\xf0\x89\x3c\x18\x90\xa8\xd7\x44\x59\x35\x2c\xff\x29\x51\x56\xb5\x30\x8f\x4c\xe4\xce\xd2\xf1\xc9\xd3\x31\xbc\x75\xf6\x9c\x6c\x60\xd5\x8d\xd5\x5c\x26\xdd\xd3\x0f\x2d\x9d\x84\x19\x4f\x5c\xe8\xcc\x79\x32\x91\xd6\xf1\x27\xcc\xf4\x5e\xd6\xbc\x35\x18\x0d\xf7\x6b\xd2\xd1\x4b\xda\x5c\x66\xb9\x1d\x36\xee\xe3\x44\x2d\x98\xca\xad\xc7\x6d\x61\x5e\x54\xc3\x6d\x1a\xd5\xdc\x2a\x87\x93\xb2\x8a\xfe\x77\xb8\x04\x7d\xde\xaa\x6a\x3b\xc0\xf0\x6a\x7b\xa8\xb5\xd2\xaf\xb0\xe7\x71\xfb\xec\xb9\x93\xad\x3d\x40\x61\xd0\x19\xa3\xfb\xff\x53\xfa\x4a\xe7\xc0\x05\x1a\xf0\x06\x2d\xbc\x79\xb3\xe7\xf8\x08\x9f\x70\x91\x53\xb7\x80\xc6\x47\xd4\x16\xa3\x23\xf8\xf5\xab\x34\xeb\xd3\x43\x1d\x7f\x74\xf2\x74\xd4\x6b\xba\x16\xa1\x40\x8b\x4d\x68\xcd\xad\xce\xf6\x0a\x36\xd7\xd2\x47\x26\xe6\x92\x09\xfe\x27\x16\x9e\xf4\xea\xfd\x8b\x34\x68\x6b\xed\xeb\x86\x76\x7b\x0e\x16\x43\x6c\x5f\x53\x3a\xfc\x20\x41\x3b\x5b\x67\xd8\xed\xed\x6b\x4c\x5f\x78\x15\xf0\x5c\xab\x65\xb7\xb7\xa7\x39\x5b\xb8\x99\xda\x41\x15\x25\xdf\x02\x4e\x48\xba\x83\x75\x6d\xd9\x6c\xac\x4a\xe3\x2b\x33\xdd\x5e\xad\xb7\x8e\x4f\x3f\x1c\x1f\x6c\x87\x4a\xeb\x0f\x1a\x04\xdd\x5e\xab\x70\x9a\x41\xa1\x48\xf9\x89\x31\x3a\x60\xbb\x60\x69\x76\xf6\x1e\xd3\xed\x17\xa3\x39\x87\xcb\xec\x3d\x71\xdb\x4e\xde\xd4\x27\xf9\xdf\x7b\xca\x5c\x0c\x8a\x01\x06\xa3\x7d\x39\xf0\x2e\x16\x99\x20\xd8\x6e\x36\x76\x19\xcb\xb6\xa8\xa7\x7f\x4b\x74\xe5\x4e\xbb\xbd\xdd\x57\xb5\x05\x3c\xa3\x36\xdc\xc9\xe2\x9e\x07\xd5\x19\x2d\x47\xc0\x7e\x92\x17\xde\x54\x8a\xe3\xbb\x11\x9c\xfe\xe7\x1f\xf9\x20\x0c\xa1\x1c\x20\xb4\x85\x6a\x64\x16\x0d\xad\xa1\x54\x0e\x6a\xfe\x03\x17\xb4\xca\xd1\x8a\x47\xdb\x9f\x83\x42\x84\x86\x6b\x8c\x20\xe6\x28\x22\x50\xf4\x3d\x42\x8b\xee\x0f\xa3\xa4\x23\x34\xa8\x39\x31\xba\xad\x6f\xe0\xbf\x9d\x38\x91\x4a\xbe\x40\xbb\x86\x18\x99\xcd\x35\xd2\xb2\x98\x31\x63\x60\x89\x4c\x72\x99\xc4\xb9\x10\x6b\x50\x3a\x42\x22\xf7\xd3\xcc\x38\x42\xab\x68\x9d\xd4\x06\x56\xa9\x82\x48\xc9\xe3\x62\x85\xcc\x34\xd2\xd7\x41\x1f\x7e\xe4\xc6\xd2\x37\x44\x26\xd8\x1a\xb8\x1d\x74\x82\xf2\x52\xf5\xdd\x85\x42\x00\xcf\x9d\x20\xa0\x7a\x37\x8a\x26\xb3\x9b\x7b\x41\x10\x6c\x77\x10\xaa\x0b\xbf\x84\x04\x41\x50\xed\x1e\x4e\x4c\xbf\x9c\xb8\x5a\x36\x3c\x5a\x39\x61\xb5\x5d\x6c\xa7\x84\x93\x57\x1b\x44\xd9\x39\xa5\xd4\x6f\x07\xf5\x7e\x72\x27\xd5\xcb\xef\x4e\xdc\x2f\x27\xaf\x9e\xfa\x5a\xbf\xb8\x03\x57\xc5\xc3\x46\x4d\x7b\x2f\xf9\xb2\x7e\x27\xbe\xf4\xfe\xb8\xa2\xa8\xe0\xee\x17\xc9\x37\x9d\x20\xa0\x2c\x76\x29\x38\x3f\x71\x4d\x9f\x61\x3e\x46\x3e\x66\x01\x95\xb7\x17\xdc\xff\xc4\xf5\xc3\x6e\x39\x07\x41\x10\x14\x0f\x58\x0d\x47\xe2\x4d\xc1\xbf\xa5\x38\xb4\x74\x04\x35\x27\xf8\xe8\xe4\x23\xf0\x4f\x75\x85\x62\xa6\x7d\x04\xfe\xf6\x6d\x69\xb2\x7e\x7e\xcf\x1f\xca\x19\x56\x3d\x8b\xad\xf3\x5e\xdd\xa1\xe2\x1d\xf5\x90\x4e\xb0\xe9\x6c\x3a\x7f\x05\x00\x00\xff\xff\x56\x2a\x39\x99\x17\x10\x00\x00") func callframe_tracerJsBytes() ([]byte, error) { return bindataRead( @@ -154,7 +154,7 @@ func callframe_tracerJs() (*asset, error) { } info := bindataFileInfo{name: "callframe_tracer.js", size: 0, mode: os.FileMode(0), modTime: time.Unix(0, 0)} - a := &asset{bytes: bytes, info: info, digest: [32]uint8{0x7a, 0x27, 0x77, 0x51, 0xb3, 0xf0, 0x89, 0xd2, 0x58, 0xcc, 0x30, 0xb2, 0xac, 0x61, 0x3, 0xae, 0x12, 0x93, 0x7a, 0x1a, 0x8a, 0x43, 0x66, 0xdd, 0xef, 0xfa, 0x9a, 0x44, 0x32, 0x67, 0x82, 0xb4}} + a := &asset{bytes: bytes, info: info, digest: [32]uint8{0x99, 0x7e, 0x5a, 0xa6, 0x42, 0x95, 0xf6, 0x69, 0xe8, 0xed, 0x12, 0x42, 0x55, 0x64, 0x75, 0x35, 0xc0, 0x83, 0xd8, 0x1a, 0x57, 0x1e, 0x8c, 0xc9, 0x2a, 0x1b, 0xa7, 0x37, 0xd5, 0x20, 0xd8, 0x50}} return a, nil } diff --git a/eth/tracers/internal/tracers/callframe_tracer.js b/eth/tracers/internal/tracers/callframe_tracer.js index 41cf3d420d80..5a8b51e2cb50 100644 --- a/eth/tracers/internal/tracers/callframe_tracer.js +++ b/eth/tracers/internal/tracers/callframe_tracer.js @@ -58,14 +58,14 @@ }, enter: function(frame) { var call = { - type: frame.type, - from: toHex(frame.from), - to: toHex(frame.to), - input: toHex(frame.input), - gas: '0x' + bigInt(frame.gas).toString('16'), + type: frame.getType(), + from: toHex(frame.getFrom()), + to: toHex(frame.getTo()), + input: toHex(frame.getInput()), + gas: '0x' + bigInt(frame.getGas()).toString('16'), } - if (frame.value !== undefined){ - call.value='0x' + bigInt(frame.value).toString(16) + if (frame.getValue() !== undefined){ + call.value='0x' + bigInt(frame.getValue()).toString(16) } this.callstack.push(call) }, @@ -73,10 +73,10 @@ var len = this.callstack.length if (len > 1) { var call = this.callstack.pop() - call.gasUsed = '0x' + bigInt(frameResult.gasUsed).toString('16') - call.output = toHex(frameResult.output) - if (frameResult.error !== undefined) { - call.error = frameResult.error + call.gasUsed = '0x' + bigInt(frameResult.getGasUsed()).toString('16') + call.output = toHex(frameResult.getOutput()) + if (frameResult.getError() !== undefined) { + call.error = frameResult.getError() } len -= 1 if (this.callstack[len-1].calls === undefined) { diff --git a/eth/tracers/tracer.go b/eth/tracers/tracer.go index 737d301a77c3..88990eb5d362 100644 --- a/eth/tracers/tracer.go +++ b/eth/tracers/tracer.go @@ -284,6 +284,85 @@ func (cw *contractWrapper) pushObject(vm *duktape.Context) { vm.PutPropString(obj, "getInput") } +type frame struct { + typ *string + from *common.Address + to *common.Address + input []byte + gas *uint + value *big.Int +} + +func newFrame() *frame { + return &frame{ + typ: new(string), + from: new(common.Address), + to: new(common.Address), + gas: new(uint), + } +} + +func (f *frame) pushObject(vm *duktape.Context) { + obj := vm.PushObject() + + vm.PushGoFunction(func(ctx *duktape.Context) int { pushValue(ctx, *f.typ); return 1 }) + vm.PutPropString(obj, "getType") + + vm.PushGoFunction(func(ctx *duktape.Context) int { pushValue(ctx, *f.from); return 1 }) + vm.PutPropString(obj, "getFrom") + + vm.PushGoFunction(func(ctx *duktape.Context) int { pushValue(ctx, *f.to); return 1 }) + vm.PutPropString(obj, "getTo") + + vm.PushGoFunction(func(ctx *duktape.Context) int { pushValue(ctx, f.input); return 1 }) + vm.PutPropString(obj, "getInput") + + vm.PushGoFunction(func(ctx *duktape.Context) int { pushValue(ctx, *f.gas); return 1 }) + vm.PutPropString(obj, "getGas") + + vm.PushGoFunction(func(ctx *duktape.Context) int { + if f.value != nil { + pushValue(ctx, f.value) + } else { + ctx.PushUndefined() + } + return 1 + }) + vm.PutPropString(obj, "getValue") +} + +type frameResult struct { + gasUsed *uint + output []byte + errorValue *string +} + +func newFrameResult() *frameResult { + return &frameResult{ + gasUsed: new(uint), + } +} + +func (r *frameResult) pushObject(vm *duktape.Context) { + obj := vm.PushObject() + + vm.PushGoFunction(func(ctx *duktape.Context) int { pushValue(ctx, *r.gasUsed); return 1 }) + vm.PutPropString(obj, "getGasUsed") + + vm.PushGoFunction(func(ctx *duktape.Context) int { pushValue(ctx, r.output); return 1 }) + vm.PutPropString(obj, "getOutput") + + vm.PushGoFunction(func(ctx *duktape.Context) int { + if r.errorValue != nil { + pushValue(ctx, *r.errorValue) + } else { + ctx.PushUndefined() + } + return 1 + }) + vm.PutPropString(obj, "getError") +} + // Tracer provides an implementation of Tracer that evaluates a Javascript // function for each VM execution step. type Tracer struct { @@ -305,6 +384,9 @@ type Tracer struct { errorValue *string // Swappable error value wrapped by a log accessor refundValue *uint // Swappable refund value wrapped by a log accessor + frame *frame // Represents entry into call frame. Fields are swappable + frameResult *frameResult // Represents exit from a call frame. Fields are swappable + ctx map[string]interface{} // Transaction context gathered throughout execution err error // Error, if one has occurred @@ -345,6 +427,8 @@ func New(code string, ctx *Context) (*Tracer, error) { costValue: new(uint), depthValue: new(uint), refundValue: new(uint), + frame: newFrame(), + frameResult: newFrameResult(), } if ctx.BlockHash != (common.Hash{}) { tracer.ctx["blockHash"] = ctx.BlockHash @@ -530,6 +614,12 @@ func New(code string, ctx *Context) (*Tracer, error) { tracer.vm.PutPropString(tracer.stateObject, "log") + tracer.frame.pushObject(tracer.vm) + tracer.vm.PutPropString(tracer.stateObject, "frame") + + tracer.frameResult.pushObject(tracer.vm) + tracer.vm.PutPropString(tracer.stateObject, "frameResult") + tracer.dbWrapper.pushObject(tracer.vm) tracer.vm.PutPropString(tracer.stateObject, "db") @@ -669,6 +759,7 @@ func (jst *Tracer) CaptureEnd(output []byte, gasUsed uint64, t time.Duration, er } } +// CaptureEnter is called when EVM enters a new scope (via call, create or selfdestruct). func (jst *Tracer) CaptureEnter(typ vm.OpCode, from common.Address, to common.Address, input []byte, gas uint64, value *big.Int) { if !jst.traceCallFrames { return @@ -682,23 +773,23 @@ func (jst *Tracer) CaptureEnter(typ vm.OpCode, from common.Address, to common.Ad return } - // Transform the frame into a JavaScript object and inject into the state - obj := jst.vm.PushObject() - jst.addToObj(obj, "type", typ.String()) - jst.addToObj(obj, "from", from) - jst.addToObj(obj, "to", to) - jst.addToObj(obj, "input", input) - jst.addToObj(obj, "gas", gas) + *jst.frame.typ = typ.String() + *jst.frame.from = from + *jst.frame.to = to + jst.frame.input = common.CopyBytes(input) + *jst.frame.gas = uint(gas) + jst.frame.value = nil if value != nil { - jst.addToObj(obj, "value", value) + jst.frame.value = new(big.Int).SetBytes(value.Bytes()) } - jst.vm.PutPropString(jst.stateObject, "frame") if _, err := jst.call(true, "enter", "frame"); err != nil { jst.err = wrapError("enter", err) } } +// CaptureExit is called when EVM exits a scope, even if the scope didn't +// execute any code. func (jst *Tracer) CaptureExit(output []byte, gasUsed uint64, err error) { if !jst.traceCallFrames { return @@ -712,13 +803,14 @@ func (jst *Tracer) CaptureExit(output []byte, gasUsed uint64, err error) { return } - obj := jst.vm.PushObject() - jst.addToObj(obj, "output", output) - jst.addToObj(obj, "gasUsed", gasUsed) + jst.frameResult.output = common.CopyBytes(output) + *jst.frameResult.gasUsed = uint(gasUsed) + jst.frameResult.errorValue = nil if err != nil { - jst.addToObj(obj, "error", err.Error()) + jst.frameResult.errorValue = new(string) + *jst.frameResult.errorValue = err.Error() } - jst.vm.PutPropString(jst.stateObject, "frameResult") + if _, err := jst.call(true, "exit", "frameResult"); err != nil { jst.err = wrapError("exit", err) } @@ -748,26 +840,32 @@ func (jst *Tracer) GetResult() (json.RawMessage, error) { // addToObj pushes a field to a JS object. func (jst *Tracer) addToObj(obj int, key string, val interface{}) { + pushValue(jst.vm, val) + jst.vm.PutPropString(obj, key) +} + +func pushValue(ctx *duktape.Context, val interface{}) { switch val := val.(type) { case uint64: - jst.vm.PushUint(uint(val)) + ctx.PushUint(uint(val)) case string: - jst.vm.PushString(val) + ctx.PushString(val) case []byte: - ptr := jst.vm.PushFixedBuffer(len(val)) + ptr := ctx.PushFixedBuffer(len(val)) copy(makeSlice(ptr, uint(len(val))), val) case common.Address: - ptr := jst.vm.PushFixedBuffer(20) + ptr := ctx.PushFixedBuffer(20) copy(makeSlice(ptr, 20), val[:]) case *big.Int: - pushBigInt(val, jst.vm) + pushBigInt(val, ctx) case int: - jst.vm.PushInt(val) + ctx.PushInt(val) + case uint: + ctx.PushUint(val) case common.Hash: - ptr := jst.vm.PushFixedBuffer(32) + ptr := ctx.PushFixedBuffer(32) copy(makeSlice(ptr, 32), val[:]) default: panic(fmt.Sprintf("unsupported type: %T", val)) } - jst.vm.PutPropString(obj, key) } diff --git a/eth/tracers/tracer_test.go b/eth/tracers/tracer_test.go index 5a0dd806f338..3decca225d7a 100644 --- a/eth/tracers/tracer_test.go +++ b/eth/tracers/tracer_test.go @@ -247,7 +247,7 @@ func TestEnterExit(t *testing.T) { } // test that the enter and exit method are correctly invoked and the values passed - tracer, err := New("{enters: 0, exits: 0, enterGas: 0, gasUsed: 0, step: function() {}, fault: function() {}, result: function() { return {enters: this.enters, exits: this.exits, enterGas: this.enterGas, gasUsed: this.gasUsed} }, enter: function(frame) { this.enters++; this.enterGas = frame.gas; }, exit: function(res) { this.exits++; this.gasUsed = res.gasUsed; }}", new(Context)) + tracer, err := New("{enters: 0, exits: 0, enterGas: 0, gasUsed: 0, step: function() {}, fault: function() {}, result: function() { return {enters: this.enters, exits: this.exits, enterGas: this.enterGas, gasUsed: this.gasUsed} }, enter: function(frame) { this.enters++; this.enterGas = frame.getGas(); }, exit: function(res) { this.exits++; this.gasUsed = res.getGasUsed(); }}", new(Context)) if err != nil { t.Fatal(err) } From 52cc78c574989b61097943547dfe97b67a8744a2 Mon Sep 17 00:00:00 2001 From: Sina Mahmoodi Date: Tue, 14 Sep 2021 16:55:09 +0200 Subject: [PATCH 37/47] eth/tracers: Omit output when error != nil in callframe tracer --- eth/tracers/internal/tracers/assets.go | 6 +++--- eth/tracers/internal/tracers/callframe_tracer.js | 8 +++++--- 2 files changed, 8 insertions(+), 6 deletions(-) diff --git a/eth/tracers/internal/tracers/assets.go b/eth/tracers/internal/tracers/assets.go index 78ea10942424..5b69319c24e3 100644 --- a/eth/tracers/internal/tracers/assets.go +++ b/eth/tracers/internal/tracers/assets.go @@ -3,7 +3,7 @@ // 4byte_tracer.js (2.933kB) // bigram_tracer.js (1.712kB) // call_tracer.js (8.956kB) -// callframe_tracer.js (4.119kB) +// callframe_tracer.js (4.157kB) // evmdis_tracer.js (4.195kB) // noop_tracer.js (1.271kB) // opcount_tracer.js (1.372kB) @@ -138,7 +138,7 @@ func call_tracerJs() (*asset, error) { return a, nil } -var _callframe_tracerJs = []byte("\x1f\x8b\x08\x00\x00\x00\x00\x00\x00\xff\xd4\x57\x4d\x6f\xdb\x38\x13\x3e\xcb\xbf\x62\xde\x1c\x1a\x1b\x75\xad\xa4\x2f\xd0\x83\x5b\x17\xf0\x16\x49\x6b\x20\x9b\x04\x8e\xb3\x45\x10\xe4\x40\x5b\x23\x89\x2d\x4d\x0a\x24\x15\xc7\x9b\xfa\xbf\x2f\x86\x94\x64\x49\xb6\xb3\xd9\xd3\x62\x73\x8a\x87\xcf\x3c\x33\x9c\x2f\x8e\xc2\x10\xbe\xa8\x6c\xad\x79\x92\x5a\x78\x7f\xf2\xfe\x14\x66\x29\x42\xa2\xde\xa1\x4d\x51\x63\xbe\x84\x71\x6e\x53\xa5\x4d\x27\x0c\x61\x96\x72\x03\x31\x17\x08\xdc\x40\xc6\xb4\x05\x15\x83\x6d\xe1\x05\x9f\x6b\xa6\xd7\x83\x4e\x18\x7a\x9d\xbd\xc7\xc4\x10\x6b\x44\x30\x2a\xb6\x2b\xa6\x71\x08\x6b\x95\xc3\x82\x49\xd0\x18\x71\x63\x35\x9f\xe7\x16\x81\x5b\x60\x32\x0a\x95\x86\xa5\x8a\x78\xbc\x26\x4a\x6e\x21\x97\x11\x6a\x67\xda\xa2\x5e\x9a\xd2\x8f\xaf\x97\xb7\x70\x81\xc6\xa0\x86\xaf\x28\x51\x33\x01\xd7\xf9\x5c\xf0\x05\x5c\xf0\x05\x4a\x83\xc0\x0c\x64\x24\x31\x29\x46\x30\x77\x74\xa4\x78\x4e\xae\xdc\x14\xae\xc0\xb9\xca\x65\xc4\x2c\x57\xb2\x0f\xc8\xc9\x73\x78\x44\x6d\xb8\x92\xf0\xff\xd2\x54\x41\xd8\x07\xa5\x89\xa4\xcb\x2c\x5d\x40\x83\xca\x48\xaf\x07\x4c\xae\x41\x30\xbb\x55\x7d\x45\x40\xb6\xf7\x8e\x80\x4b\x67\x26\x55\x19\x82\x4d\x99\xa5\x5b\xaf\xb8\x10\x30\x47\xc8\x0d\xc6\xb9\xe8\x13\xdb\x3c\xb7\xf0\x7d\x32\xfb\x76\x75\x3b\x83\xf1\xe5\x1d\x7c\x1f\x4f\xa7\xe3\xcb\xd9\xdd\x47\x58\x71\x9b\xaa\xdc\x02\x3e\xa2\xa7\xe2\xcb\x4c\x70\x8c\x60\xc5\xb4\x66\xd2\xae\x41\xc5\xc4\xf0\xfb\xd9\xf4\xcb\xb7\xf1\xe5\x6c\xfc\xdb\xe4\x62\x32\xbb\x03\xa5\xe1\x7c\x32\xbb\x3c\xbb\xb9\x81\xf3\xab\x29\x8c\xe1\x7a\x3c\x9d\x4d\xbe\xdc\x5e\x8c\xa7\x70\x7d\x3b\xbd\xbe\xba\x39\x1b\xc0\x0d\x92\x57\x48\xfa\x7f\x1f\xf3\xd8\x65\x4f\x23\x44\x68\x19\x17\xa6\x8c\xc4\x9d\xca\xc1\xa4\x2a\x17\x11\xa4\xec\x11\x41\xe3\x02\xf9\x23\x46\xc0\x60\xa1\xb2\xf5\xab\x93\x4a\x5c\x4c\x28\x99\xb8\x3b\x1f\x2c\x48\x98\xc4\x20\x95\xed\x83\x41\x84\x4f\xa9\xb5\xd9\x30\x0c\x57\xab\xd5\x20\x91\xf9\x40\xe9\x24\x14\x9e\xce\x84\x9f\x07\x9d\x0e\x91\x2e\x98\x10\xe7\x9a\x2d\x71\xa6\xd9\x02\x35\xc5\xdd\x38\x7a\x89\x2b\x77\x08\x31\x9d\x82\xd5\x6c\xc1\x65\x02\x4b\xb4\xa9\x8a\x0c\x58\x05\x1a\x33\xa5\x6d\x91\x29\xe0\x32\x56\x7a\xe9\x2a\xca\x39\x3b\xa7\xc4\x70\x69\x51\x4b\x26\x60\x89\xc6\xb0\x04\x5d\x15\x33\x22\x93\x86\x2d\xac\x2b\x99\xe7\x0e\x00\x38\x53\xc6\xb2\xc5\xcf\x21\xdc\x3f\x6f\x1e\xfa\x4e\x68\x2c\x66\x43\x88\x73\xe9\xa0\x5d\xa1\x92\x3e\x44\xf3\x1e\x3c\x6f\xfc\x79\xcc\x72\x61\xf7\x02\xdc\x31\xfd\x3d\x32\x0d\x02\x25\x8c\xc0\xa6\xdc\x0c\x2a\x33\x03\x81\x32\xb1\x69\x85\xe3\x31\x74\x09\xf7\x19\x4e\xeb\xea\x25\x85\x8b\xc4\x0e\x47\xa6\xb2\x6e\xaf\x81\x25\x9a\x26\xe8\x5e\xa0\x7c\x77\xfa\xe0\x05\x30\x1a\x8d\x5c\x63\xc7\x5c\x62\xd4\x36\x44\x7f\x2f\x2a\xc3\xfd\x43\x43\x61\xd3\x79\xa5\xea\x20\xcb\x4d\xda\xa5\x7f\xb7\xee\x7a\xe5\x22\x92\x1a\x4d\x33\x94\x0b\xfb\xd4\x0e\x65\x18\xc2\xb5\xc6\x8c\xa6\x87\xca\xa9\xeb\x8b\xa4\xba\xd4\x37\x02\xee\xd9\x60\xd4\xba\x9f\x5d\x67\x38\x74\xc9\xb6\x4f\x03\xfa\xd1\x6f\x1c\xc7\x5a\x2d\xdd\xb1\x55\xdf\xf0\x89\x3c\x18\x90\xa8\xd7\x44\x59\x35\x2c\xff\x29\x51\x56\xb5\x30\x8f\x4c\xe4\xce\xd2\xf1\xc9\xd3\x31\xbc\x75\xf6\x9c\x6c\x60\xd5\x8d\xd5\x5c\x26\xdd\xd3\x0f\x2d\x9d\x84\x19\x4f\x5c\xe8\xcc\x79\x32\x91\xd6\xf1\x27\xcc\xf4\x5e\xd6\xbc\x35\x18\x0d\xf7\x6b\xd2\xd1\x4b\xda\x5c\x66\xb9\x1d\x36\xee\xe3\x44\x2d\x98\xca\xad\xc7\x6d\x61\x5e\x54\xc3\x6d\x1a\xd5\xdc\x2a\x87\x93\xb2\x8a\xfe\x77\xb8\x04\x7d\xde\xaa\x6a\x3b\xc0\xf0\x6a\x7b\xa8\xb5\xd2\xaf\xb0\xe7\x71\xfb\xec\xb9\x93\xad\x3d\x40\x61\xd0\x19\xa3\xfb\xff\x53\xfa\x4a\xe7\xc0\x05\x1a\xf0\x06\x2d\xbc\x79\xb3\xe7\xf8\x08\x9f\x70\x91\x53\xb7\x80\xc6\x47\xd4\x16\xa3\x23\xf8\xf5\xab\x34\xeb\xd3\x43\x1d\x7f\x74\xf2\x74\xd4\x6b\xba\x16\xa1\x40\x8b\x4d\x68\xcd\xad\xce\xf6\x0a\x36\xd7\xd2\x47\x26\xe6\x92\x09\xfe\x27\x16\x9e\xf4\xea\xfd\x8b\x34\x68\x6b\xed\xeb\x86\x76\x7b\x0e\x16\x43\x6c\x5f\x53\x3a\xfc\x20\x41\x3b\x5b\x67\xd8\xed\xed\x6b\x4c\x5f\x78\x15\xf0\x5c\xab\x65\xb7\xb7\xa7\x39\x5b\xb8\x99\xda\x41\x15\x25\xdf\x02\x4e\x48\xba\x83\x75\x6d\xd9\x6c\xac\x4a\xe3\x2b\x33\xdd\x5e\xad\xb7\x8e\x4f\x3f\x1c\x1f\x6c\x87\x4a\xeb\x0f\x1a\x04\xdd\x5e\xab\x70\x9a\x41\xa1\x48\xf9\x89\x31\x3a\x60\xbb\x60\x69\x76\xf6\x1e\xd3\xed\x17\xa3\x39\x87\xcb\xec\x3d\x71\xdb\x4e\xde\xd4\x27\xf9\xdf\x7b\xca\x5c\x0c\x8a\x01\x06\xa3\x7d\x39\xf0\x2e\x16\x99\x20\xd8\x6e\x36\x76\x19\xcb\xb6\xa8\xa7\x7f\x4b\x74\xe5\x4e\xbb\xbd\xdd\x57\xb5\x05\x3c\xa3\x36\xdc\xc9\xe2\x9e\x07\xd5\x19\x2d\x47\xc0\x7e\x92\x17\xde\x54\x8a\xe3\xbb\x11\x9c\xfe\xe7\x1f\xf9\x20\x0c\xa1\x1c\x20\xb4\x85\x6a\x64\x16\x0d\xad\xa1\x54\x0e\x6a\xfe\x03\x17\xb4\xca\xd1\x8a\x47\xdb\x9f\x83\x42\x84\x86\x6b\x8c\x20\xe6\x28\x22\x50\xf4\x3d\x42\x8b\xee\x0f\xa3\xa4\x23\x34\xa8\x39\x31\xba\xad\x6f\xe0\xbf\x9d\x38\x91\x4a\xbe\x40\xbb\x86\x18\x99\xcd\x35\xd2\xb2\x98\x31\x63\x60\x89\x4c\x72\x99\xc4\xb9\x10\x6b\x50\x3a\x42\x22\xf7\xd3\xcc\x38\x42\xab\x68\x9d\xd4\x06\x56\xa9\x82\x48\xc9\xe3\x62\x85\xcc\x34\xd2\xd7\x41\x1f\x7e\xe4\xc6\xd2\x37\x44\x26\xd8\x1a\xb8\x1d\x74\x82\xf2\x52\xf5\xdd\x85\x42\x00\xcf\x9d\x20\xa0\x7a\x37\x8a\x26\xb3\x9b\x7b\x41\x10\x6c\x77\x10\xaa\x0b\xbf\x84\x04\x41\x50\xed\x1e\x4e\x4c\xbf\x9c\xb8\x5a\x36\x3c\x5a\x39\x61\xb5\x5d\x6c\xa7\x84\x93\x57\x1b\x44\xd9\x39\xa5\xd4\x6f\x07\xf5\x7e\x72\x27\xd5\xcb\xef\x4e\xdc\x2f\x27\xaf\x9e\xfa\x5a\xbf\xb8\x03\x57\xc5\xc3\x46\x4d\x7b\x2f\xf9\xb2\x7e\x27\xbe\xf4\xfe\xb8\xa2\xa8\xe0\xee\x17\xc9\x37\x9d\x20\xa0\x2c\x76\x29\x38\x3f\x71\x4d\x9f\x61\x3e\x46\x3e\x66\x01\x95\xb7\x17\xdc\xff\xc4\xf5\xc3\x6e\x39\x07\x41\x10\x14\x0f\x58\x0d\x47\xe2\x4d\xc1\xbf\xa5\x38\xb4\x74\x04\x35\x27\xf8\xe8\xe4\x23\xf0\x4f\x75\x85\x62\xa6\x7d\x04\xfe\xf6\x6d\x69\xb2\x7e\x7e\xcf\x1f\xca\x19\x56\x3d\x8b\xad\xf3\x5e\xdd\xa1\xe2\x1d\xf5\x90\x4e\xb0\xe9\x6c\x3a\x7f\x05\x00\x00\xff\xff\x56\x2a\x39\x99\x17\x10\x00\x00") +var _callframe_tracerJs = []byte("\x1f\x8b\x08\x00\x00\x00\x00\x00\x00\xff\xd4\x57\xcd\x6e\xdb\x38\x10\x3e\xcb\x4f\x31\x9b\x43\x63\xa3\xae\x95\x74\x81\x1e\xdc\xba\x80\xb7\x48\x5a\x03\xd9\x24\x70\x9c\x2d\x82\x20\x07\xda\x1a\x49\x6c\x69\x52\x20\xa9\x38\xde\xd4\xef\xbe\x18\x52\x92\x25\xd9\x6e\xb3\xa7\xc5\xe6\x14\x0f\xbf\xf9\x66\x38\x7f\x1c\x85\x21\x7c\x52\xd9\x5a\xf3\x24\xb5\xf0\xf6\xe4\xed\x29\xcc\x52\x84\x44\xbd\x41\x9b\xa2\xc6\x7c\x09\xe3\xdc\xa6\x4a\x9b\x4e\x18\xc2\x2c\xe5\x06\x62\x2e\x10\xb8\x81\x8c\x69\x0b\x2a\x06\xdb\xc2\x0b\x3e\xd7\x4c\xaf\x07\x9d\x30\xf4\x3a\x7b\x8f\x89\x21\xd6\x88\x60\x54\x6c\x57\x4c\xe3\x10\xd6\x2a\x87\x05\x93\xa0\x31\xe2\xc6\x6a\x3e\xcf\x2d\x02\xb7\xc0\x64\x14\x2a\x0d\x4b\x15\xf1\x78\x4d\x94\xdc\x42\x2e\x23\xd4\xce\xb4\x45\xbd\x34\xa5\x1f\x9f\x2f\x6f\xe1\x02\x8d\x41\x0d\x9f\x51\xa2\x66\x02\xae\xf3\xb9\xe0\x0b\xb8\xe0\x0b\x94\x06\x81\x19\xc8\x48\x62\x52\x8c\x60\xee\xe8\x48\xf1\x9c\x5c\xb9\x29\x5c\x81\x73\x95\xcb\x88\x59\xae\x64\x1f\x90\x93\xe7\xf0\x88\xda\x70\x25\xe1\xf7\xd2\x54\x41\xd8\x07\xa5\x89\xa4\xcb\x2c\x5d\x40\x83\xca\x48\xaf\x07\x4c\xae\x41\x30\xbb\x55\x7d\x41\x40\xb6\xf7\x8e\x80\x4b\x67\x26\x55\x19\x82\x4d\x99\xa5\x5b\xaf\xb8\x10\x30\x47\xc8\x0d\xc6\xb9\xe8\x13\xdb\x3c\xb7\xf0\x75\x32\xfb\x72\x75\x3b\x83\xf1\xe5\x1d\x7c\x1d\x4f\xa7\xe3\xcb\xd9\xdd\x7b\x58\x71\x9b\xaa\xdc\x02\x3e\xa2\xa7\xe2\xcb\x4c\x70\x8c\x60\xc5\xb4\x66\xd2\xae\x41\xc5\xc4\xf0\xe7\xd9\xf4\xd3\x97\xf1\xe5\x6c\xfc\xc7\xe4\x62\x32\xbb\x03\xa5\xe1\x7c\x32\xbb\x3c\xbb\xb9\x81\xf3\xab\x29\x8c\xe1\x7a\x3c\x9d\x4d\x3e\xdd\x5e\x8c\xa7\x70\x7d\x3b\xbd\xbe\xba\x39\x1b\xc0\x0d\x92\x57\x48\xfa\xbf\x8e\x79\xec\xb2\xa7\x11\x22\xb4\x8c\x0b\x53\x46\xe2\x4e\xe5\x60\x52\x95\x8b\x08\x52\xf6\x88\xa0\x71\x81\xfc\x11\x23\x60\xb0\x50\xd9\xfa\xc5\x49\x25\x2e\x26\x94\x4c\xdc\x9d\x0f\x16\x24\x4c\x62\x90\xca\xf6\xc1\x20\xc2\x87\xd4\xda\x6c\x18\x86\xab\xd5\x6a\x90\xc8\x7c\xa0\x74\x12\x0a\x4f\x67\xc2\x8f\x83\x4e\x87\x48\x17\x4c\x88\x73\xcd\x96\x38\xd3\x6c\x81\x9a\xe2\x6e\x1c\xbd\xc4\x95\x3b\x84\x98\x4e\xc1\x6a\xb6\xe0\x32\x81\x25\xda\x54\x45\x06\xac\x02\x8d\x99\xd2\xb6\xc8\x14\x70\x19\x2b\xbd\x74\x15\xe5\x9c\x9d\x53\x62\xb8\xb4\xa8\x25\x13\xb0\x44\x63\x58\x82\xae\x8a\x19\x91\x49\xc3\x16\xd6\x95\xcc\x73\x07\x00\x9c\x29\x63\xd9\xe2\xfb\x10\xee\x9f\x37\x0f\x7d\x27\x34\x16\xb3\x21\xc4\xb9\x74\xd0\xae\x50\x49\x1f\xa2\x79\x0f\x9e\x37\xfe\x3c\x66\xb9\xb0\x7b\x01\xee\x98\xfe\x1e\x99\x06\x81\x12\x46\x60\x53\x6e\x06\x95\x99\x81\x40\x99\xd8\xb4\xc2\xf1\x18\xba\x84\xfb\x08\xa7\x75\xf5\x92\xc2\x45\x62\x87\x23\x53\x59\xb7\xd7\xc0\x12\x4d\x13\x74\x2f\x50\xbe\x39\x7d\xf0\x02\x18\x8d\x46\xae\xb1\x63\x2e\x31\x6a\x1b\xa2\xbf\x9f\x2a\xc3\xfd\x43\x43\x61\xd3\x79\xa1\xea\x20\xcb\x4d\xda\xa5\x7f\xb7\xee\x7a\xe5\x22\x92\x1a\x4d\x33\x94\x0b\xfb\xd4\x0e\x65\x18\xc2\xb5\xc6\x8c\xa6\x87\xca\xa9\xeb\x8b\xa4\xba\xd4\x37\x02\xee\xd9\x60\xd4\xba\x9f\x5d\x67\x38\x74\xc9\xb6\x4f\x03\xfa\xd1\x6f\x1c\xc7\x5a\x2d\xdd\xb1\x55\x5f\xf0\x89\x3c\x18\x90\xa8\xd7\x44\x59\x35\x2c\xff\x29\x51\x56\xb5\x30\x8f\x4c\xe4\xce\xd2\xf1\xc9\xd3\x31\xbc\x76\xf6\x9c\x6c\x60\xd5\x8d\xd5\x5c\x26\xdd\xd3\x77\x2d\x9d\x84\x19\x4f\x5c\xe8\xcc\x79\x32\x91\xd6\xf1\x27\xcc\xf4\x7e\xae\x79\x6b\x30\x1a\xee\xd7\xa4\xa3\x9f\x69\x73\x99\xe5\x76\xd8\xb8\x8f\x13\xb5\x60\x2a\xb7\x1e\xb7\x85\x79\x51\x0d\xb7\x69\x54\x73\xab\x1c\x4e\xca\x2a\xfa\xed\x70\x09\xfa\xbc\x55\xd5\x76\x80\xe1\xc5\xf6\x50\x6b\xa5\x5f\x60\xcf\xe3\xf6\xd9\x73\x27\x5b\x7b\x80\xc2\xa0\x33\x46\xf7\xff\xb7\xf4\x95\xce\x81\x0b\x34\xe0\x0d\x5a\x78\xf5\x6a\xcf\xf1\x11\x3e\xe1\x22\xa7\x6e\x01\x8d\x8f\xa8\x2d\x46\x47\xf0\xe3\x47\x69\xd6\xa7\x87\x3a\xfe\xe8\xe4\xe9\xa8\xd7\x74\x2d\x42\x81\x16\x9b\xd0\x9a\x5b\x9d\xed\x15\x6c\xae\xa5\x8f\x4c\xcc\x25\x13\xfc\x6f\x2c\x3c\xe9\xd5\xfb\x17\x69\xd0\xd6\xda\xd7\x0d\xed\xf6\x1c\x2c\x86\xd8\xbe\xa6\x74\xf8\x41\x82\x76\xb6\xce\xb0\xdb\xdb\xd7\x98\xbe\xf0\x2a\xe0\xb9\x56\xcb\x6e\x6f\x4f\x73\xb6\x70\x33\xb5\x83\x2a\x4a\xbe\x05\x9c\x90\x74\x07\xeb\xda\xb2\xd9\x58\x95\xc6\x67\x66\xba\xbd\x5a\x6f\x1d\x9f\xbe\x3b\x3e\xd8\x0e\x95\xd6\x5f\x34\x08\xba\xbd\x56\xe1\x34\x83\x42\x91\xf2\x13\x63\x74\xc0\x76\xc1\xd2\xec\xec\x3d\xa6\xdb\x2f\x46\x73\x0e\x97\xd9\x7b\xe2\xb6\x9d\xbc\xa9\x4f\xf2\x7f\xf7\x94\xb9\x18\x14\x03\x0c\x46\xfb\x72\xe0\x5d\x2c\x32\x41\xb0\xdd\x6c\xec\x58\x2f\x9b\xb1\x45\x70\x46\xe2\x3d\x6f\x69\x01\xff\xd5\xab\xe9\x7c\x2d\x1b\xae\x5e\x58\x5b\x0b\x57\xee\xb4\xdb\x6b\xda\x28\x46\xca\x01\xc6\xd2\xd9\xe6\xd4\x80\x9d\x97\x97\xa2\xfd\x66\x04\xa7\xff\xfb\x55\x20\x08\x43\x28\xc7\x0c\xed\xaa\x1a\x99\x45\x43\xcb\x2a\x15\x8d\x9a\x7f\xc3\x05\x2d\x7c\xb4\x08\xd2\x8e\xe8\xa0\x10\xa1\xe1\x1a\x23\x88\x39\x8a\x08\x14\x7d\xb5\xd0\x3a\xfc\xcd\x28\xe9\x08\x0d\x6a\x4e\x8c\x6e\x37\x1c\xf8\x2f\x2c\x4e\xa4\x92\x2f\xd0\xae\x21\x46\x66\x73\x8d\xb4\x52\x66\xcc\x18\x58\x22\x93\x5c\x26\x71\x2e\xc4\x1a\x94\x8e\x90\xc8\xfd\xcc\x33\x8e\xd0\x2a\x5a\x3a\xb5\x81\x55\xaa\x20\x52\xf2\xb8\x58\x34\x33\x8d\xf4\x0d\xd1\x87\x6f\xb9\xb1\xf4\xa5\x91\x09\xb6\x06\x6e\x07\x9d\xa0\xbc\x54\x7d\xc3\xa1\x10\xc0\x73\x27\x08\xa8\x2e\x8d\xa2\xf9\xed\xa6\x63\x10\x04\xdb\x4d\x85\xca\xc0\xaf\x2a\x41\x10\x54\x1b\x8a\x13\xd3\x2f\x27\xae\x56\x12\x8f\x56\x4e\x58\xed\x20\xdb\x59\xe2\xe4\xd5\x9e\x51\xf6\x57\x29\xf5\x3b\x44\xbd\xeb\xdc\x49\xb5\x1f\xb8\x13\xf7\xcb\xc9\xab\x85\xa0\x56\xfb\xee\xc0\x15\xeb\xb0\x51\xc2\xde\x4b\xbe\xac\xdf\x89\x2f\xbd\x3f\xae\x28\x2a\xb8\xfb\x45\xf2\x4d\x27\x08\x28\x8b\x5d\x0a\xce\x77\x5c\xd3\xc7\x9a\x8f\x91\x8f\x59\x40\xe5\xed\x05\xf7\xdf\x71\xfd\xb0\x5b\xce\x41\x10\x04\xc5\x33\x57\xc3\x91\x78\x53\xf0\x6f\x29\x0e\xad\x26\x41\xcd\x09\x3e\x3a\x79\x0f\xfc\x43\x5d\xa1\x98\x7c\xef\x81\xbf\x7e\x5d\x9a\xac\x9f\xdf\xf3\x87\x72\xd2\x55\x8f\x67\xeb\xbc\x57\x77\xa8\x78\x6d\x3d\xa4\x13\x6c\x3a\x9b\xce\x3f\x01\x00\x00\xff\xff\x98\xee\xed\xbe\x3d\x10\x00\x00") func callframe_tracerJsBytes() ([]byte, error) { return bindataRead( @@ -154,7 +154,7 @@ func callframe_tracerJs() (*asset, error) { } info := bindataFileInfo{name: "callframe_tracer.js", size: 0, mode: os.FileMode(0), modTime: time.Unix(0, 0)} - a := &asset{bytes: bytes, info: info, digest: [32]uint8{0x99, 0x7e, 0x5a, 0xa6, 0x42, 0x95, 0xf6, 0x69, 0xe8, 0xed, 0x12, 0x42, 0x55, 0x64, 0x75, 0x35, 0xc0, 0x83, 0xd8, 0x1a, 0x57, 0x1e, 0x8c, 0xc9, 0x2a, 0x1b, 0xa7, 0x37, 0xd5, 0x20, 0xd8, 0x50}} + a := &asset{bytes: bytes, info: info, digest: [32]uint8{0xf3, 0x8a, 0xda, 0xfc, 0x95, 0xb, 0x3b, 0x17, 0xaf, 0x2e, 0x1c, 0x76, 0xc2, 0x95, 0xf9, 0xf8, 0x4b, 0xa8, 0x22, 0x5a, 0x62, 0xf, 0xd6, 0xfc, 0xb4, 0x4b, 0x5f, 0xc6, 0x84, 0x28, 0x56, 0x10}} return a, nil } diff --git a/eth/tracers/internal/tracers/callframe_tracer.js b/eth/tracers/internal/tracers/callframe_tracer.js index 5a8b51e2cb50..0034b4c45079 100644 --- a/eth/tracers/internal/tracers/callframe_tracer.js +++ b/eth/tracers/internal/tracers/callframe_tracer.js @@ -74,9 +74,11 @@ if (len > 1) { var call = this.callstack.pop() call.gasUsed = '0x' + bigInt(frameResult.getGasUsed()).toString('16') - call.output = toHex(frameResult.getOutput()) - if (frameResult.getError() !== undefined) { - call.error = frameResult.getError() + var error = frameResult.getError() + if (error === undefined) { + call.output = toHex(frameResult.getOutput()) + } else { + call.error = error } len -= 1 if (this.callstack[len-1].calls === undefined) { From 07240e51442b4a0aaec533a4d0a0eebf2d45adc9 Mon Sep 17 00:00:00 2001 From: Sina Mahmoodi Date: Tue, 14 Sep 2021 17:22:14 +0200 Subject: [PATCH 38/47] core/vm: add tracer test for create txes --- core/vm/runtime/runtime_test.go | 34 +++++++++++++++++++++++++++++++++ 1 file changed, 34 insertions(+) diff --git a/core/vm/runtime/runtime_test.go b/core/vm/runtime/runtime_test.go index 5e48865bd85d..9f4bafbc7fd5 100644 --- a/core/vm/runtime/runtime_test.go +++ b/core/vm/runtime/runtime_test.go @@ -874,6 +874,40 @@ func TestRuntimeJSTracer(t *testing.T) { } } +func TestJSTracerCreateTx(t *testing.T) { + jsTracer := ` + {enters: 0, exits: 0, + step: function() {}, + fault: function() {}, + result: function() { return [this.enters, this.exits].join(",") }, + enter: function(frame) { this.enters++ }, + exit: function(res) { this.exits++ }}` + code := []byte{byte(vm.PUSH1), 0, byte(vm.PUSH1), 0, byte(vm.RETURN)} + + statedb, _ := state.New(common.Hash{}, state.NewDatabase(rawdb.NewMemoryDatabase()), nil) + tracer, err := tracers.New(jsTracer, new(tracers.Context)) + if err != nil { + t.Fatal(err) + } + _, _, _, err = Create(code, &Config{ + State: statedb, + EVMConfig: vm.Config{ + Debug: true, + Tracer: tracer, + }}) + if err != nil { + t.Fatal(err) + } + + res, err := tracer.GetResult() + if err != nil { + t.Fatal(err) + } + if have, want := string(res), `"0,0"`; have != want { + t.Errorf("wrong result for tracer, have \n%v\nwant\n%v\n", have, want) + } +} + func BenchmarkTracerStepVsCallFrame(b *testing.B) { // Simply pushes and pops some values in a loop code := []byte{ From f7f15207b8f6a4e8c5d096c03a22c09f0110827c Mon Sep 17 00:00:00 2001 From: Martin Holst Swende Date: Tue, 14 Sep 2021 23:11:46 +0200 Subject: [PATCH 39/47] eth/tracers: benchmark for calltracer vs scoped tracer --- eth/tracers/tracers_test.go | 89 ++++++++++++++++++++++++++++++++++--- 1 file changed, 84 insertions(+), 5 deletions(-) diff --git a/eth/tracers/tracers_test.go b/eth/tracers/tracers_test.go index 602f2a86be27..fc5f7875afd6 100644 --- a/eth/tracers/tracers_test.go +++ b/eth/tracers/tracers_test.go @@ -207,11 +207,6 @@ func TestCallTracer(t *testing.T) { testCallTracer("callTracer", t) } -func TestCallFrameTracer(t *testing.T) { - t.Skip("not yet passing all tests") - testCallTracer("callframeTracer", t) -} - func testCallTracer(tracer string, t *testing.T) { files, err := ioutil.ReadDir("testdata") if err != nil { @@ -292,6 +287,11 @@ func testCallTracer(tracer string, t *testing.T) { } } +func TestCallFrameTracer(t *testing.T) { + t.Skip("not yet passing all tests") + testCallTracer("callframeTracer", t) +} + // jsonEqual is similar to reflect.DeepEqual, but does a 'bounce' via json prior to // comparison func jsonEqual(x, y interface{}) bool { @@ -387,3 +387,82 @@ func BenchmarkTransactionTrace(b *testing.B) { tracer.Reset() } } + +func BenchmarkTracers(b *testing.B) { + files, err := ioutil.ReadDir("testdata") + if err != nil { + b.Fatalf("failed to retrieve tracer test suite: %v", err) + } + + for _, file := range files { + if !strings.HasPrefix(file.Name(), "call_tracer_") { + continue + } + file := file // capture range variable + b.Run(camel(strings.TrimSuffix(strings.TrimPrefix(file.Name(), "call_tracer_"), ".json")), func(b *testing.B) { + // Call tracer test found, read if from disk + blob, err := ioutil.ReadFile(filepath.Join("testdata", file.Name())) + if err != nil { + b.Fatalf("failed to read testcase: %v", err) + } + test := new(callTracerTest) + if err := json.Unmarshal(blob, test); err != nil { + b.Fatalf("failed to parse testcase: %v", err) + } + + b.Run("legacy", func(b *testing.B) { + benchTracer("callTracer", test, b) + }) + b.Run("scoped", func(b *testing.B) { + benchTracer("callframeTracer", test, b) + }) + }) + } +} + +func benchTracer(tracerName string, test *callTracerTest, b *testing.B) { + // Configure a blockchain with the given prestate + tx := new(types.Transaction) + if err := rlp.DecodeBytes(common.FromHex(test.Input), tx); err != nil { + b.Fatalf("failed to parse testcase input: %v", err) + } + signer := types.MakeSigner(test.Genesis.Config, new(big.Int).SetUint64(uint64(test.Context.Number))) + msg, err := tx.AsMessage(signer, nil) + if err != nil { + b.Fatalf("failed to prepare transaction for tracing: %v", err) + } + origin, _ := signer.Sender(tx) + txContext := vm.TxContext{ + Origin: origin, + GasPrice: tx.GasPrice(), + } + context := vm.BlockContext{ + CanTransfer: core.CanTransfer, + Transfer: core.Transfer, + Coinbase: test.Context.Miner, + BlockNumber: new(big.Int).SetUint64(uint64(test.Context.Number)), + Time: new(big.Int).SetUint64(uint64(test.Context.Time)), + Difficulty: (*big.Int)(test.Context.Difficulty), + GasLimit: uint64(test.Context.GasLimit), + } + _, statedb := tests.MakePreState(rawdb.NewMemoryDatabase(), test.Genesis.Alloc, false) + + // Create the tracer, the EVM environment and run it + tracer, err := New(tracerName, new(Context)) + if err != nil { + b.Fatalf("failed to create call tracer: %v", err) + } + evm := vm.NewEVM(context, txContext, statedb, test.Genesis.Config, vm.Config{Debug: true, Tracer: tracer}) + + b.ReportAllocs() + b.ResetTimer() + for i := 0; i < b.N; i++ { + snap := statedb.Snapshot() + st := core.NewStateTransition(evm, msg, new(core.GasPool).AddGas(tx.Gas())) + if _, err = st.TransitionDb(); err != nil { + b.Fatalf("failed to execute transaction: %v", err) + } + statedb.RevertToSnapshot(snap) + } + +} From 57901b285fb38f1d57f183e67d4bd53fba2dfa71 Mon Sep 17 00:00:00 2001 From: Sina Mahmoodi Date: Wed, 15 Sep 2021 10:27:26 +0200 Subject: [PATCH 40/47] eth/tracers: copy call tracers test set for new vs legacy --- .../create.json} | 0 .../deep_calls.json} | 0 .../delegatecall.json} | 0 .../inner_create_oog_outer_throw.json} | 0 .../inner_instafail.json} | 0 .../inner_throw_outer_revert.json} | 0 .../oog.json} | 0 .../revert.json} | 0 .../revert_reason.json} | 0 .../selfdestruct.json} | 0 .../simple.json} | 0 .../throw.json} | 0 .../testdata/call_tracer_legacy/create.json | 58 +++ .../call_tracer_legacy/deep_calls.json | 415 ++++++++++++++++++ .../call_tracer_legacy/delegatecall.json | 97 ++++ .../inner_create_oog_outer_throw.json | 77 ++++ .../call_tracer_legacy/inner_instafail.json | 72 +++ .../inner_throw_outer_revert.json | 81 ++++ .../testdata/call_tracer_legacy/oog.json | 60 +++ .../testdata/call_tracer_legacy/revert.json | 58 +++ .../call_tracer_legacy/revert_reason.json | 64 +++ .../call_tracer_legacy/selfdestruct.json | 73 +++ .../testdata/call_tracer_legacy/simple.json | 78 ++++ .../testdata/call_tracer_legacy/throw.json | 62 +++ eth/tracers/tracers_test.go | 35 +- 25 files changed, 1214 insertions(+), 16 deletions(-) rename eth/tracers/testdata/{call_tracer_create.json => call_tracer/create.json} (100%) rename eth/tracers/testdata/{call_tracer_deep_calls.json => call_tracer/deep_calls.json} (100%) rename eth/tracers/testdata/{call_tracer_delegatecall.json => call_tracer/delegatecall.json} (100%) rename eth/tracers/testdata/{call_tracer_inner_create_oog_outer_throw.json => call_tracer/inner_create_oog_outer_throw.json} (100%) rename eth/tracers/testdata/{call_tracer_inner_instafail.json => call_tracer/inner_instafail.json} (100%) rename eth/tracers/testdata/{call_tracer_inner_throw_outer_revert.json => call_tracer/inner_throw_outer_revert.json} (100%) rename eth/tracers/testdata/{call_tracer_oog.json => call_tracer/oog.json} (100%) rename eth/tracers/testdata/{call_tracer_revert.json => call_tracer/revert.json} (100%) rename eth/tracers/testdata/{call_tracer_revert_reason.json => call_tracer/revert_reason.json} (100%) rename eth/tracers/testdata/{call_tracer_selfdestruct.json => call_tracer/selfdestruct.json} (100%) rename eth/tracers/testdata/{call_tracer_simple.json => call_tracer/simple.json} (100%) rename eth/tracers/testdata/{call_tracer_throw.json => call_tracer/throw.json} (100%) create mode 100644 eth/tracers/testdata/call_tracer_legacy/create.json create mode 100644 eth/tracers/testdata/call_tracer_legacy/deep_calls.json create mode 100644 eth/tracers/testdata/call_tracer_legacy/delegatecall.json create mode 100644 eth/tracers/testdata/call_tracer_legacy/inner_create_oog_outer_throw.json create mode 100644 eth/tracers/testdata/call_tracer_legacy/inner_instafail.json create mode 100644 eth/tracers/testdata/call_tracer_legacy/inner_throw_outer_revert.json create mode 100644 eth/tracers/testdata/call_tracer_legacy/oog.json create mode 100644 eth/tracers/testdata/call_tracer_legacy/revert.json create mode 100644 eth/tracers/testdata/call_tracer_legacy/revert_reason.json create mode 100644 eth/tracers/testdata/call_tracer_legacy/selfdestruct.json create mode 100644 eth/tracers/testdata/call_tracer_legacy/simple.json create mode 100644 eth/tracers/testdata/call_tracer_legacy/throw.json diff --git a/eth/tracers/testdata/call_tracer_create.json b/eth/tracers/testdata/call_tracer/create.json similarity index 100% rename from eth/tracers/testdata/call_tracer_create.json rename to eth/tracers/testdata/call_tracer/create.json diff --git a/eth/tracers/testdata/call_tracer_deep_calls.json b/eth/tracers/testdata/call_tracer/deep_calls.json similarity index 100% rename from eth/tracers/testdata/call_tracer_deep_calls.json rename to eth/tracers/testdata/call_tracer/deep_calls.json diff --git a/eth/tracers/testdata/call_tracer_delegatecall.json b/eth/tracers/testdata/call_tracer/delegatecall.json similarity index 100% rename from eth/tracers/testdata/call_tracer_delegatecall.json rename to eth/tracers/testdata/call_tracer/delegatecall.json diff --git a/eth/tracers/testdata/call_tracer_inner_create_oog_outer_throw.json b/eth/tracers/testdata/call_tracer/inner_create_oog_outer_throw.json similarity index 100% rename from eth/tracers/testdata/call_tracer_inner_create_oog_outer_throw.json rename to eth/tracers/testdata/call_tracer/inner_create_oog_outer_throw.json diff --git a/eth/tracers/testdata/call_tracer_inner_instafail.json b/eth/tracers/testdata/call_tracer/inner_instafail.json similarity index 100% rename from eth/tracers/testdata/call_tracer_inner_instafail.json rename to eth/tracers/testdata/call_tracer/inner_instafail.json diff --git a/eth/tracers/testdata/call_tracer_inner_throw_outer_revert.json b/eth/tracers/testdata/call_tracer/inner_throw_outer_revert.json similarity index 100% rename from eth/tracers/testdata/call_tracer_inner_throw_outer_revert.json rename to eth/tracers/testdata/call_tracer/inner_throw_outer_revert.json diff --git a/eth/tracers/testdata/call_tracer_oog.json b/eth/tracers/testdata/call_tracer/oog.json similarity index 100% rename from eth/tracers/testdata/call_tracer_oog.json rename to eth/tracers/testdata/call_tracer/oog.json diff --git a/eth/tracers/testdata/call_tracer_revert.json b/eth/tracers/testdata/call_tracer/revert.json similarity index 100% rename from eth/tracers/testdata/call_tracer_revert.json rename to eth/tracers/testdata/call_tracer/revert.json diff --git a/eth/tracers/testdata/call_tracer_revert_reason.json b/eth/tracers/testdata/call_tracer/revert_reason.json similarity index 100% rename from eth/tracers/testdata/call_tracer_revert_reason.json rename to eth/tracers/testdata/call_tracer/revert_reason.json diff --git a/eth/tracers/testdata/call_tracer_selfdestruct.json b/eth/tracers/testdata/call_tracer/selfdestruct.json similarity index 100% rename from eth/tracers/testdata/call_tracer_selfdestruct.json rename to eth/tracers/testdata/call_tracer/selfdestruct.json diff --git a/eth/tracers/testdata/call_tracer_simple.json b/eth/tracers/testdata/call_tracer/simple.json similarity index 100% rename from eth/tracers/testdata/call_tracer_simple.json rename to eth/tracers/testdata/call_tracer/simple.json diff --git a/eth/tracers/testdata/call_tracer_throw.json b/eth/tracers/testdata/call_tracer/throw.json similarity index 100% rename from eth/tracers/testdata/call_tracer_throw.json rename to eth/tracers/testdata/call_tracer/throw.json diff --git a/eth/tracers/testdata/call_tracer_legacy/create.json b/eth/tracers/testdata/call_tracer_legacy/create.json new file mode 100644 index 000000000000..8699bf3e7e9c --- /dev/null +++ b/eth/tracers/testdata/call_tracer_legacy/create.json @@ -0,0 +1,58 @@ +{ + "context": { + "difficulty": "3755480783", + "gasLimit": "5401723", + "miner": "0xd049bfd667cb46aa3ef5df0da3e57db3be39e511", + "number": "2294702", + "timestamp": "1513676146" + }, + "genesis": { + "alloc": { + "0x13e4acefe6a6700604929946e70e6443e4e73447": { + "balance": "0xcf3e0938579f000", + "code": "0x", + "nonce": "9", + "storage": {} + }, + "0x7dc9c9730689ff0b0fd506c67db815f12d90a448": { + "balance": "0x0", + "code": "0x", + "nonce": "0", + "storage": {} + } + }, + "config": { + "byzantiumBlock": 1700000, + "chainId": 3, + "daoForkSupport": true, + "eip150Block": 0, + "eip150Hash": "0x41941023680923e0fe4d74a34bdac8141f2540e3ae90623718e47d66d1ca4a2d", + "eip155Block": 10, + "eip158Block": 10, + "ethash": {}, + "homesteadBlock": 0 + }, + "difficulty": "3757315409", + "extraData": "0x566961425443", + "gasLimit": "5406414", + "hash": "0xae107f592eebdd9ff8d6ba00363676096e6afb0e1007a7d3d0af88173077378d", + "miner": "0xd049bfd667cb46aa3ef5df0da3e57db3be39e511", + "mixHash": "0xc927aa05a38bc3de864e95c33b3ae559d3f39c4ccd51cef6f113f9c50ba0caf1", + "nonce": "0x93363bbd2c95f410", + "number": "2294701", + "stateRoot": "0x6b6737d5bde8058990483e915866bd1578014baeff57bd5e4ed228a2bfad635c", + "timestamp": "1513676127", + "totalDifficulty": "7160808139332585" + }, + "input": "0xf907ef098504e3b29200830897be8080b9079c606060405260405160208061077c83398101604052808051906020019091905050600160009054906101000a900473ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff163373ffffffffffffffffffffffffffffffffffffffff161415151561007d57600080fd5b336000806101000a81548173ffffffffffffffffffffffffffffffffffffffff021916908373ffffffffffffffffffffffffffffffffffffffff16021790555080600160006101000a81548173ffffffffffffffffffffffffffffffffffffffff021916908373ffffffffffffffffffffffffffffffffffffffff1602179055506001600460006101000a81548160ff02191690831515021790555050610653806101296000396000f300606060405260043610610083576000357c0100000000000000000000000000000000000000000000000000000000900463ffffffff16806305e4382a146100855780631c02708d146100ae5780632e1a7d4d146100c35780635114cb52146100e6578063a37dda2c146100fe578063ae200e7914610153578063b5769f70146101a8575b005b341561009057600080fd5b6100986101d1565b6040518082815260200191505060405180910390f35b34156100b957600080fd5b6100c16101d7565b005b34156100ce57600080fd5b6100e460048080359060200190919050506102eb565b005b6100fc6004808035906020019091905050610513565b005b341561010957600080fd5b6101116105d6565b604051808273ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff16815260200191505060405180910390f35b341561015e57600080fd5b6101666105fc565b604051808273ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff16815260200191505060405180910390f35b34156101b357600080fd5b6101bb610621565b6040518082815260200191505060405180910390f35b60025481565b60011515600460009054906101000a900460ff1615151415156101f957600080fd5b6000809054906101000a900473ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff163373ffffffffffffffffffffffffffffffffffffffff1614806102a15750600160009054906101000a900473ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff163373ffffffffffffffffffffffffffffffffffffffff16145b15156102ac57600080fd5b6000600460006101000a81548160ff0219169083151502179055506003543073ffffffffffffffffffffffffffffffffffffffff163103600281905550565b6000809054906101000a900473ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff163373ffffffffffffffffffffffffffffffffffffffff1614806103935750600160009054906101000a900473ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff163373ffffffffffffffffffffffffffffffffffffffff16145b151561039e57600080fd5b6000809054906101000a900473ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff163373ffffffffffffffffffffffffffffffffffffffff16141561048357600060025411801561040757506002548111155b151561041257600080fd5b80600254036002819055506000809054906101000a900473ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff166108fc829081150290604051600060405180830381858888f19350505050151561047e57600080fd5b610510565b600060035411801561049757506003548111155b15156104a257600080fd5b8060035403600381905550600160009054906101000a900473ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff166108fc829081150290604051600060405180830381858888f19350505050151561050f57600080fd5b5b50565b60011515600460009054906101000a900460ff16151514151561053557600080fd5b6000809054906101000a900473ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff163373ffffffffffffffffffffffffffffffffffffffff1614801561059657506003548160035401115b80156105bd575080600354013073ffffffffffffffffffffffffffffffffffffffff163110155b15156105c857600080fd5b806003540160038190555050565b600160009054906101000a900473ffffffffffffffffffffffffffffffffffffffff1681565b6000809054906101000a900473ffffffffffffffffffffffffffffffffffffffff1681565b600354815600a165627a7a72305820c3b849e8440987ce43eae3097b77672a69234d516351368b03fe5b7de03807910029000000000000000000000000c65e620a3a55451316168d57e268f5702ef56a1129a01060f46676a5dff6f407f0f51eb6f37f5c8c54e238c70221e18e65fc29d3ea65a0557b01c50ff4ffaac8ed6e5d31237a4ecbac843ab1bfe8bb0165a0060df7c54f", + "result": { + "from": "0x13e4acefe6a6700604929946e70e6443e4e73447", + "gas": "0x5e106", + "gasUsed": "0x5e106", + "input": "0x606060405260405160208061077c83398101604052808051906020019091905050600160009054906101000a900473ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff163373ffffffffffffffffffffffffffffffffffffffff161415151561007d57600080fd5b336000806101000a81548173ffffffffffffffffffffffffffffffffffffffff021916908373ffffffffffffffffffffffffffffffffffffffff16021790555080600160006101000a81548173ffffffffffffffffffffffffffffffffffffffff021916908373ffffffffffffffffffffffffffffffffffffffff1602179055506001600460006101000a81548160ff02191690831515021790555050610653806101296000396000f300606060405260043610610083576000357c0100000000000000000000000000000000000000000000000000000000900463ffffffff16806305e4382a146100855780631c02708d146100ae5780632e1a7d4d146100c35780635114cb52146100e6578063a37dda2c146100fe578063ae200e7914610153578063b5769f70146101a8575b005b341561009057600080fd5b6100986101d1565b6040518082815260200191505060405180910390f35b34156100b957600080fd5b6100c16101d7565b005b34156100ce57600080fd5b6100e460048080359060200190919050506102eb565b005b6100fc6004808035906020019091905050610513565b005b341561010957600080fd5b6101116105d6565b604051808273ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff16815260200191505060405180910390f35b341561015e57600080fd5b6101666105fc565b604051808273ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff16815260200191505060405180910390f35b34156101b357600080fd5b6101bb610621565b6040518082815260200191505060405180910390f35b60025481565b60011515600460009054906101000a900460ff1615151415156101f957600080fd5b6000809054906101000a900473ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff163373ffffffffffffffffffffffffffffffffffffffff1614806102a15750600160009054906101000a900473ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff163373ffffffffffffffffffffffffffffffffffffffff16145b15156102ac57600080fd5b6000600460006101000a81548160ff0219169083151502179055506003543073ffffffffffffffffffffffffffffffffffffffff163103600281905550565b6000809054906101000a900473ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff163373ffffffffffffffffffffffffffffffffffffffff1614806103935750600160009054906101000a900473ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff163373ffffffffffffffffffffffffffffffffffffffff16145b151561039e57600080fd5b6000809054906101000a900473ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff163373ffffffffffffffffffffffffffffffffffffffff16141561048357600060025411801561040757506002548111155b151561041257600080fd5b80600254036002819055506000809054906101000a900473ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff166108fc829081150290604051600060405180830381858888f19350505050151561047e57600080fd5b610510565b600060035411801561049757506003548111155b15156104a257600080fd5b8060035403600381905550600160009054906101000a900473ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff166108fc829081150290604051600060405180830381858888f19350505050151561050f57600080fd5b5b50565b60011515600460009054906101000a900460ff16151514151561053557600080fd5b6000809054906101000a900473ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff163373ffffffffffffffffffffffffffffffffffffffff1614801561059657506003548160035401115b80156105bd575080600354013073ffffffffffffffffffffffffffffffffffffffff163110155b15156105c857600080fd5b806003540160038190555050565b600160009054906101000a900473ffffffffffffffffffffffffffffffffffffffff1681565b6000809054906101000a900473ffffffffffffffffffffffffffffffffffffffff1681565b600354815600a165627a7a72305820c3b849e8440987ce43eae3097b77672a69234d516351368b03fe5b7de03807910029000000000000000000000000c65e620a3a55451316168d57e268f5702ef56a11", + "output": "0x606060405260043610610083576000357c0100000000000000000000000000000000000000000000000000000000900463ffffffff16806305e4382a146100855780631c02708d146100ae5780632e1a7d4d146100c35780635114cb52146100e6578063a37dda2c146100fe578063ae200e7914610153578063b5769f70146101a8575b005b341561009057600080fd5b6100986101d1565b6040518082815260200191505060405180910390f35b34156100b957600080fd5b6100c16101d7565b005b34156100ce57600080fd5b6100e460048080359060200190919050506102eb565b005b6100fc6004808035906020019091905050610513565b005b341561010957600080fd5b6101116105d6565b604051808273ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff16815260200191505060405180910390f35b341561015e57600080fd5b6101666105fc565b604051808273ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff16815260200191505060405180910390f35b34156101b357600080fd5b6101bb610621565b6040518082815260200191505060405180910390f35b60025481565b60011515600460009054906101000a900460ff1615151415156101f957600080fd5b6000809054906101000a900473ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff163373ffffffffffffffffffffffffffffffffffffffff1614806102a15750600160009054906101000a900473ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff163373ffffffffffffffffffffffffffffffffffffffff16145b15156102ac57600080fd5b6000600460006101000a81548160ff0219169083151502179055506003543073ffffffffffffffffffffffffffffffffffffffff163103600281905550565b6000809054906101000a900473ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff163373ffffffffffffffffffffffffffffffffffffffff1614806103935750600160009054906101000a900473ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff163373ffffffffffffffffffffffffffffffffffffffff16145b151561039e57600080fd5b6000809054906101000a900473ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff163373ffffffffffffffffffffffffffffffffffffffff16141561048357600060025411801561040757506002548111155b151561041257600080fd5b80600254036002819055506000809054906101000a900473ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff166108fc829081150290604051600060405180830381858888f19350505050151561047e57600080fd5b610510565b600060035411801561049757506003548111155b15156104a257600080fd5b8060035403600381905550600160009054906101000a900473ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff166108fc829081150290604051600060405180830381858888f19350505050151561050f57600080fd5b5b50565b60011515600460009054906101000a900460ff16151514151561053557600080fd5b6000809054906101000a900473ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff163373ffffffffffffffffffffffffffffffffffffffff1614801561059657506003548160035401115b80156105bd575080600354013073ffffffffffffffffffffffffffffffffffffffff163110155b15156105c857600080fd5b806003540160038190555050565b600160009054906101000a900473ffffffffffffffffffffffffffffffffffffffff1681565b6000809054906101000a900473ffffffffffffffffffffffffffffffffffffffff1681565b600354815600a165627a7a72305820c3b849e8440987ce43eae3097b77672a69234d516351368b03fe5b7de03807910029", + "to": "0x7dc9c9730689ff0b0fd506c67db815f12d90a448", + "type": "CREATE", + "value": "0x0" + } +} diff --git a/eth/tracers/testdata/call_tracer_legacy/deep_calls.json b/eth/tracers/testdata/call_tracer_legacy/deep_calls.json new file mode 100644 index 000000000000..0353d4cfa9ac --- /dev/null +++ b/eth/tracers/testdata/call_tracer_legacy/deep_calls.json @@ -0,0 +1,415 @@ +{ + "context": { + "difficulty": "117066904", + "gasLimit": "4712384", + "miner": "0x1977c248e1014cc103929dd7f154199c916e39ec", + "number": "25001", + "timestamp": "1479891545" + }, + "genesis": { + "alloc": { + "0x2a98c5f40bfa3dee83431103c535f6fae9a8ad38": { + "balance": "0x0", + "code": "0x606060405236156100825760e060020a600035046302d05d3f811461008a5780630accce061461009c5780631ab9075a146100c757806331ed274614610102578063645a3b7214610133578063772fdae314610155578063a7f4377914610180578063ae5f80801461019e578063c9bded21146101ea578063f905c15a14610231575b61023a610002565b61023c600054600160a060020a031681565b61023a600435602435604435606435608435600254600160a060020a03166000141561024657610002565b61023a600435600254600160a060020a03166000148015906100f8575060025433600160a060020a03908116911614155b156102f457610002565b61023a60043560243560443560643560843560a43560c435600254600160a060020a03166000141561031657610002565b61023a600435602435600254600160a060020a0316600014156103d057610002565b61023a600435602435604435606435608435600254600160a060020a03166000141561046157610002565b61023a60025433600160a060020a0390811691161461051657610002565b61023a6004356024356044356060828152600160a060020a0382169060ff8516907fa6c2f0913db6f79ff0a4365762c61718973b3413d6e40382e704782a9a5099f690602090a3505050565b61023a600435602435600160a060020a038116606090815260ff8316907fee6348a7ec70f74e3d6cba55a53e9f9110d180d7698e9117fc466ae29a43e34790602090a25050565b61023c60035481565b005b6060908152602090f35b60025460e060020a6313bc6d4b02606090815233600160a060020a0390811660645291909116906313bc6d4b906084906020906024816000876161da5a03f115610002575050604051511515905061029d57610002565b60408051858152602081018390528151600160a060020a03858116939087169260ff8a16927f5a690ecd0cb15c1c1fd6b6f8a32df0d4f56cb41a54fea7e94020f013595de796929181900390910190a45050505050565b6002805473ffffffffffffffffffffffffffffffffffffffff19168217905550565b60025460e060020a6313bc6d4b02606090815233600160a060020a0390811660645291909116906313bc6d4b906084906020906024816000876161da5a03f115610002575050604051511515905061036d57610002565b6040805186815260208101869052808201859052606081018490529051600160a060020a03831691889160ff8b16917fd65d9ddafbad8824e2bbd6f56cc9f4ac27ba60737035c10a321ea2f681c94d47919081900360800190a450505050505050565b60025460e060020a6313bc6d4b02606090815233600160a060020a0390811660645291909116906313bc6d4b906084906020906024816000876161da5a03f115610002575050604051511515905061042757610002565b60408051828152905183917fa9c6cbc4bd352a6940479f6d802a1001550581858b310d7f68f7bea51218cda6919081900360200190a25050565b60025460e060020a6313bc6d4b02606090815233600160a060020a0390811660645291909116906313bc6d4b906084906020906024816000876161da5a03f11561000257505060405151151590506104b857610002565b80600160a060020a031684600160a060020a03168660ff167f69bdaf789251e1d3a0151259c0c715315496a7404bce9fd0b714674685c2cab78686604051808381526020018281526020019250505060405180910390a45050505050565b600254600160a060020a0316ff", + "nonce": "1", + "storage": { + "0x0000000000000000000000000000000000000000000000000000000000000002": "0x0000000000000000000000002cccf5e0538493c235d1c5ef6580f77d99e91396" + } + }, + "0x2cccf5e0538493c235d1c5ef6580f77d99e91396": { + "balance": "0x0", + "code": "0x606060405236156100775760e060020a600035046302d05d3f811461007f57806313bc6d4b146100915780633688a877146100b95780635188f9961461012f5780637eadc976146101545780638ad79680146101d3578063a43e04d814610238578063a7f437791461025e578063e16c7d981461027c575b61029f610002565b6102a1600054600160a060020a031681565b6102be600435600160a060020a03811660009081526002602052604090205460ff165b919050565b6102d26004356040805160208181018352600080835284815260038252835190849020805460026001821615610100026000190190911604601f8101849004840283018401909552848252929390929183018282801561037d5780601f106103525761010080835404028352916020019161037d565b61029f6004356024356000805433600160a060020a039081169116146104a957610002565b61034060043560008181526001602090815260408083205481517ff905c15a0000000000000000000000000000000000000000000000000000000081529151600160a060020a03909116928392839263f905c15a92600483810193919291829003018189876161da5a03f1156100025750506040515195945050505050565b60408051602060248035600481810135601f810185900485028601850190965285855261029f9581359591946044949293909201918190840183828082843750949650505050505050600054600160a060020a0390811633909116146104f657610002565b61029f6004355b600080548190600160a060020a0390811633909116146105a457610002565b61029f60005433600160a060020a0390811691161461072957610002565b6102a1600435600081815260016020526040902054600160a060020a03166100b4565b005b60408051600160a060020a03929092168252519081900360200190f35b604080519115158252519081900360200190f35b60405180806020018281038252838181518152602001915080519060200190808383829060006004602084601f0104600f02600301f150905090810190601f1680156103325780820380516001836020036101000a031916815260200191505b509250505060405180910390f35b60408051918252519081900360200190f35b820191906000526020600020905b81548152906001019060200180831161036057829003601f168201915b505050505090506100b4565b506000828152600160208181526040808420805473ffffffffffffffffffffffffffffffffffffffff191686179055600160a060020a038581168086526002909352818520805460ff191690941790935580517f1ab9075a0000000000000000000000000000000000000000000000000000000081523090931660048401525184939192631ab9075a926024828101939192829003018183876161da5a03f11561000257505060408051602081018690528082019290925243606083015260808083526003908301527f414444000000000000000000000000000000000000000000000000000000000060a0830152517f8ac68d4e97d65912f220b4c5f87978b8186320a5e378c1369850b5b5f90323d39181900360c00190a15b505050565b600083815260016020526040902054600160a060020a03838116911614156104d0576104a4565b600083815260016020526040812054600160a060020a031614610389576103898361023f565b600082815260036020908152604082208054845182855293839020919360026001831615610100026000190190921691909104601f90810184900483019391929186019083901061056a57805160ff19168380011785555b5061059a9291505b808211156105a05760008155600101610556565b8280016001018555821561054e579182015b8281111561054e57825182600050559160200191906001019061057c565b50505050565b5090565b600083815260016020526040812054600160a060020a031614156105c757610002565b50506000818152600160205260408082205481517fa7f437790000000000000000000000000000000000000000000000000000000081529151600160a060020a0391909116928392839263a7f4377992600483810193919291829003018183876161da5a03f11561000257505050600160005060008460001916815260200190815260200160002060006101000a815490600160a060020a0302191690556002600050600083600160a060020a0316815260200190815260200160002060006101000a81549060ff02191690557f8ac68d4e97d65912f220b4c5f87978b8186320a5e378c1369850b5b5f90323d383834360405180806020018560001916815260200184600160a060020a03168152602001838152602001828103825260038152602001807f44454c000000000000000000000000000000000000000000000000000000000081526020015060200194505050505060405180910390a1505050565b600054600160a060020a0316ff", + "nonce": "1", + "storage": { + "0x0684ac65a9fa32414dda56996f4183597d695987fdb82b145d722743891a6fe8": "0x0000000000000000000000003e9286eafa2db8101246c2131c09b49080d00690", + "0x1cd76f78169a420d99346e3501dd3e541622c38a226f9b63e01cfebc69879dc7": "0x000000000000000000000000b4fe7aa695b326c9d219158d2ca50db77b39f99f", + "0x8e54a4494fe5da016bfc01363f4f6cdc91013bb5434bd2a4a3359f13a23afa2f": "0x000000000000000000000000cf00ffd997ad14939736f026006498e3f099baaf", + "0x94edf7f600ba56655fd65fca1f1424334ce369326c1dc3e53151dcd1ad06bc13": "0x0000000000000000000000000000000000000000000000000000000000000001", + "0xbbee47108b275f55f98482c6800f6372165e88b0330d3f5dae6419df4734366c": "0x0000000000000000000000002a98c5f40bfa3dee83431103c535f6fae9a8ad38", + "0xd38c0c4e84de118cfdcc775130155d83b8bbaaf23dc7f3c83a626b10473213bd": "0x0000000000000000000000000000000000000000000000000000000000000001", + "0xfb3aa5c655c2ec9d40609401f88d505d1da61afaa550e36ef5da0509ada257ba": "0x0000000000000000000000007986bad81f4cbd9317f5a46861437dae58d69113" + } + }, + "0x3e9286eafa2db8101246c2131c09b49080d00690": { + "balance": "0x0", + "code": "0x606060405236156100cf5760e060020a600035046302d05d3f81146100d7578063056d4470146100e957806316c66cc61461010c5780631ab9075a146101935780633ae1005c146101ce57806358541662146101fe5780635ed61af014610231578063644e3b791461025457806384dbac3b146102db578063949ae479146102fd5780639859387b14610321578063a7f4377914610340578063ab03fc261461035e578063e8161b7814610385578063e964d4e114610395578063f905c15a146103a5578063f92eb774146103ae575b6103be610002565b6103c0600054600160a060020a031681565b6103be6004356002546000908190600160a060020a031681141561040357610002565b6103dd60043560006108365b6040805160025460e360020a631c2d8fb30282527f636f6e747261637464620000000000000000000000000000000000000000000060048301529151600092600160a060020a03169163e16c7d98916024828101926020929190829003018187876161da5a03f1156100025750506040515191506104e29050565b6103be600435600254600160a060020a03166000148015906101c4575060025433600160a060020a03908116911614155b1561088d57610002565b6103be600435602435604435606435600254600090819081908190600160a060020a03168114156108af57610002565b6103c0600435602435604435606435608435600254600090819081908190600160a060020a03168114156110e857610002565b6103be6004356002546000908190600160a060020a03168114156115ec57610002565b6103c06004356000611b635b6040805160025460e360020a631c2d8fb30282527f6d61726b6574646200000000000000000000000000000000000000000000000060048301529151600092600160a060020a03169163e16c7d98916024828101926020929190829003018187876161da5a03f1156100025750506040515191506104e29050565b6103be600435602435600254600160a060020a031660001415611bb557610002565b6103be600435602435600254600090600160a060020a0316811415611d2e57610002565b6103be600435600254600160a060020a031660001415611fc657610002565b6103be60025433600160a060020a0390811691161461207e57610002565b6103be600435602435604435600254600090600160a060020a031681141561208c57610002565b6103dd60043560006124b8610260565b6103c0600435600061250a610118565b6103f160035481565b6103f16004356000612561610260565b005b60408051600160a060020a03929092168252519081900360200190f35b604080519115158252519081900360200190f35b60408051918252519081900360200190f35b6040805160025460e060020a6313bc6d4b02825233600160a060020a03908116600484015292519216916313bc6d4b9160248181019260209290919082900301816000876161da5a03f115610002575050604051511515905061046557610002565b8291506104e55b6040805160025460e360020a631c2d8fb30282527f63706f6f6c00000000000000000000000000000000000000000000000000000060048301529151600092600160a060020a03169163e16c7d98916024828101926020929190829003018187876161da5a03f115610002575050604051519150505b90565b600160a060020a031663b2206e6d83600160a060020a0316632e94420f6040518160e060020a0281526004018090506020604051808303816000876161da5a03f1156100025750506040805180517fb2206e6d0000000000000000000000000000000000000000000000000000000082526004820152600160a060020a038816602482015290516044808301935060209282900301816000876161da5a03f11561000257505060405151915061059b90506106ba565b600160a060020a031663d5b205ce83600160a060020a03166336da44686040518160e060020a0281526004018090506020604051808303816000876161da5a03f11561000257505060408051805160e160020a636ad902e7028252600160a060020a0390811660048301526024820187905288166044820152905160648281019350600092829003018183876161da5a03f115610002575050506107355b6040805160025460e360020a631c2d8fb30282527f6c6f676d6772000000000000000000000000000000000000000000000000000060048301529151600092600160a060020a03169163e16c7d98916024828101926020929190829003018187876161da5a03f1156100025750506040515191506104e29050565b50826120ee5b6040805160025460e360020a631c2d8fb30282527f6163636f756e7463746c0000000000000000000000000000000000000000000060048301529151600092600160a060020a03169163e16c7d98916024828101926020929190829003018187876161da5a03f1156100025750506040515191506104e29050565b600160a060020a0316630accce06600684600160a060020a0316632e94420f6040518160e060020a0281526004018090506020604051808303816000876161da5a03f11561000257505060408051805160e360020a6306db488d02825291519192899290916336da446891600482810192602092919082900301816000876161da5a03f1156100025750505060405180519060200150866040518660e060020a028152600401808681526020018560001916815260200184600160a060020a0316815260200183600160a060020a03168152602001828152602001955050505050506000604051808303816000876161da5a03f11561000257505050505050565b600160a060020a03166316c66cc6836040518260e060020a0281526004018082600160a060020a031681526020019150506020604051808303816000876161da5a03f115610002575050604051519150505b919050565b6002805473ffffffffffffffffffffffffffffffffffffffff19168217905550565b6040805160025460e060020a6313bc6d4b02825233600160a060020a03908116600484015292519216916313bc6d4b9160248181019260209290919082900301816000876161da5a03f115610002575050604051511515905061091157610002565b87935061091c610260565b600160a060020a031663bdbdb08685600160a060020a0316632e94420f6040518160e060020a0281526004018090506020604051808303816000876161da5a03f1156100025750506040805180517fbdbdb0860000000000000000000000000000000000000000000000000000000082526004820152602481018a905290516044808301935060209282900301816000876161da5a03f1156100025750506040515193506109ca90506106ba565b600160a060020a03166381982a7a8885876040518460e060020a0281526004018084600160a060020a0316815260200183815260200182600160a060020a0316815260200193505050506000604051808303816000876161da5a03f11561000257505050610a3661046c565b600160a060020a03166308636bdb85600160a060020a0316632e94420f6040518160e060020a0281526004018090506020604051808303816000876161da5a03f1156100025750506040805180517f08636bdb000000000000000000000000000000000000000000000000000000008252600482015260248101889052604481019290925251606482810192602092919082900301816000876161da5a03f11561000257505060408051805160e160020a630a5d50db028252600482018190529151919450600160a060020a03871692506314baa1b6916024828101926000929190829003018183876161da5a03f11561000257505050610b3561046c565b600160a060020a0316630a3b6ede85600160a060020a0316632e94420f6040518160e060020a0281526004018090506020604051808303816000876161da5a03f11561000257505060408051805160e160020a63051db76f0282526004820152600160a060020a038d16602482015290516044808301935060209282900301816000876161da5a03f115610002575050604051519150610bd590506106ba565b600160a060020a031663d5b205ce87838b6040518460e060020a0281526004018084600160a060020a0316815260200183815260200182600160a060020a0316815260200193505050506000604051808303816000876161da5a03f11561000257505050610c41610118565b600160a060020a031663988db79c888a6040518360e060020a0281526004018083600160a060020a0316815260200182600160a060020a03168152602001925050506000604051808303816000876161da5a03f11561000257505050610ca5610260565b600160a060020a031663f4f2821b896040518260e060020a0281526004018082600160a060020a031681526020019150506000604051808303816000876161da5a03f11561000257505050610d6f5b6040805160025460e360020a631c2d8fb30282527f747261646564620000000000000000000000000000000000000000000000000060048301529151600092600160a060020a03169163e16c7d98916024828101926020929190829003018187876161da5a03f1156100025750506040515191506104e29050565b600160a060020a0316635f539d69896040518260e060020a0281526004018082600160a060020a031681526020019150506000604051808303816000876161da5a03f11561000257505050610dc2610639565b600160a060020a0316630accce06600386600160a060020a0316632e94420f6040518160e060020a0281526004018090506020604051808303816000876161da5a03f11561000257505060408051805160e360020a6315b1ea01028252915191928e928e9263ad8f500891600482810192602092919082900301816000876161da5a03f11561000257505050604051805190602001506040518660e060020a028152600401808681526020018560001916815260200184600160a060020a0316815260200183600160a060020a03168152602001828152602001955050505050506000604051808303816000876161da5a03f11561000257505050610ec5610639565b600160a060020a0316630accce06600386600160a060020a0316632e94420f6040518160e060020a0281526004018090506020604051808303816000876161da5a03f11561000257505060408051805160e360020a6315b1ea01028252915191928e928d9263ad8f500891600482810192602092919082900301816000876161da5a03f11561000257505050604051805190602001506040518660e060020a028152600401808681526020018560001916815260200184600160a060020a0316815260200183600160a060020a03168152602001828152602001955050505050506000604051808303816000876161da5a03f11561000257505050610fc8610639565b600160a060020a031663645a3b7285600160a060020a0316632e94420f6040518160e060020a0281526004018090506020604051808303816000876161da5a03f11561000257505060405151905061101e610260565b600160a060020a031663f92eb77488600160a060020a0316632e94420f6040518160e060020a0281526004018090506020604051808303816000876161da5a03f11561000257505060408051805160e260020a633e4baddd028252600482015290516024828101935060209282900301816000876161da5a03f11561000257505060408051805160e060020a86028252600482019490945260248101939093525160448381019360009350829003018183876161da5a03f115610002575050505050505050505050565b6040805160025460e060020a6313bc6d4b02825233600160a060020a03908116600484015292519216916313bc6d4b9160248181019260209290919082900301816000876161da5a03f115610002575050604051511515905061114a57610002565b604051600254600160a060020a0316908a908a908a908a908a90611579806125b38339018087600160a060020a0316815260200186600160a060020a03168152602001856000191681526020018481526020018381526020018281526020019650505050505050604051809103906000f092506111c5610118565b600160a060020a031663b9858a288a856040518360e060020a0281526004018083600160a060020a0316815260200182600160a060020a03168152602001925050506000604051808303816000876161da5a03f11561000257505050611229610260565b600160a060020a0316635188f99689856040518360e060020a028152600401808360001916815260200182600160a060020a03168152602001925050506000604051808303816000876161da5a03f11561000257505050611288610260565b600160a060020a031663bdbdb08689896040518360e060020a0281526004018083600019168152602001828152602001925050506020604051808303816000876161da5a03f1156100025750506040515192506112e590506106ba565b600160a060020a03166346d88e7d8a858a6040518460e060020a0281526004018084600160a060020a0316815260200183600160a060020a0316815260200182815260200193505050506000604051808303816000876161da5a03f115610002575050506113516106ba565b600160a060020a03166381982a7a8a84866040518460e060020a0281526004018084600160a060020a0316815260200183815260200182600160a060020a0316815260200193505050506000604051808303816000876161da5a03f115610002575050506113bd61046c565b600160a060020a0316632b58469689856040518360e060020a028152600401808360001916815260200182600160a060020a03168152602001925050506000604051808303816000876161da5a03f1156100025750505061141c61046c565b600160a060020a03166308636bdb8984866040518460e060020a028152600401808460001916815260200183815260200182600160a060020a0316815260200193505050506020604051808303816000876161da5a03f11561000257505060408051805160e160020a630a5d50db028252600482018190529151919350600160a060020a03861692506314baa1b6916024828101926000929190829003018183876161da5a03f115610002575050506114d3610639565b6040805160e160020a630566670302815260016004820152602481018b9052600160a060020a0386811660448301528c811660648301526000608483018190529251931692630accce069260a480840193919291829003018183876161da5a03f11561000257505050611544610639565b600160a060020a031663645a3b728961155b610260565b600160a060020a031663f92eb7748c6040518260e060020a02815260040180826000191681526020019150506020604051808303816000876161da5a03f11561000257505060408051805160e060020a86028252600482019490945260248101939093525160448084019360009350829003018183876161da5a03f1156100025750939a9950505050505050505050565b6040805160025460e060020a6313bc6d4b02825233600160a060020a03908116600484015292519216916313bc6d4b9160248181019260209290919082900301816000876161da5a03f115610002575050604051511515905061164e57610002565b82915061165961046c565b600160a060020a0316630a3b6ede83600160a060020a0316632e94420f6040518160e060020a0281526004018090506020604051808303816000876161da5a03f11561000257505060408051805160e160020a63051db76f0282526004820152600160a060020a038816602482015290516044808301935060209282900301816000876161da5a03f1156100025750506040515191506116f990506106ba565b600160a060020a031663d5b205ce83600160a060020a03166336da44686040518160e060020a0281526004018090506020604051808303816000876161da5a03f11561000257505060408051805160e160020a636ad902e7028252600160a060020a0390811660048301526024820187905288166044820152905160648281019350600092829003018183876161da5a03f1156100025750505061179b6106ba565b600160a060020a031663d653078983600160a060020a03166336da44686040518160e060020a0281526004018090506020604051808303816000876161da5a03f1156100025750506040805180517ff1ff78a0000000000000000000000000000000000000000000000000000000008252915191929163f1ff78a09160048181019260209290919082900301816000876161da5a03f1156100025750505060405180519060200150866040518460e060020a0281526004018084600160a060020a0316815260200183815260200182600160a060020a0316815260200193505050506000604051808303816000876161da5a03f1156100025750505061189f610260565b600160a060020a031663f4f2821b846040518260e060020a0281526004018082600160a060020a031681526020019150506000604051808303816000876161da5a03f115610002575050506118f2610118565b600160a060020a031663f4f2821b846040518260e060020a0281526004018082600160a060020a031681526020019150506000604051808303816000876161da5a03f11561000257505050611945610639565b600160a060020a0316630accce06600484600160a060020a0316632e94420f6040518160e060020a0281526004018090506020604051808303816000876161da5a03f11561000257505060408051805160e360020a6306db488d02825291519192899290916336da44689181870191602091908190038801816000876161da5a03f115610002575050506040518051906020015060006040518660e060020a028152600401808681526020018560001916815260200184600160a060020a0316815260200183600160a060020a03168152602001828152602001955050505050506000604051808303816000876161da5a03f11561000257505050611a48610639565b600160a060020a031663645a3b7283600160a060020a0316632e94420f6040518160e060020a0281526004018090506020604051808303816000876161da5a03f115610002575050604051519050611a9e610260565b600160a060020a031663f92eb77486600160a060020a0316632e94420f6040518160e060020a0281526004018090506020604051808303816000876161da5a03f11561000257505060408051805160e260020a633e4baddd028252600482015290516024828101935060209282900301816000876161da5a03f11561000257505060408051805160e060020a86028252600482019490945260248101939093525160448381019360009350829003018183876161da5a03f11561000257505050505050565b600160a060020a03166381738c59836040518260e060020a02815260040180826000191681526020019150506020604051808303816000876161da5a03f1156100025750506040515191506108889050565b6040805160025460e060020a6313bc6d4b02825233600160a060020a03908116600484015292519216916313bc6d4b9160248181019260209290919082900301816000876161da5a03f1156100025750506040515115159050611c1757610002565b611c1f610260565b600160a060020a03166338a699a4836040518260e060020a02815260040180826000191681526020019150506020604051808303816000876161da5a03f11561000257505060405151159050611c7457610002565b611c7c610260565b600160a060020a0316632243118a836040518260e060020a02815260040180826000191681526020019150506000604051808303816000876161da5a03f11561000257505050611cca610639565b600160a060020a031663ae5f8080600184846040518460e060020a028152600401808481526020018360001916815260200182600160a060020a0316815260200193505050506000604051808303816000876161da5a03f115610002575050505050565b6040805160025460e060020a6313bc6d4b02825233600160a060020a03908116600484015292519216916313bc6d4b9160248181019260209290919082900301816000876161da5a03f1156100025750506040515115159050611d9057610002565b5081611d9a610260565b600160a060020a031663581d5d6084846040518360e060020a0281526004018083600160a060020a03168152602001828152602001925050506000604051808303816000876161da5a03f11561000257505050611df5610639565b600160a060020a0316630accce06600283600160a060020a0316632e94420f6040518160e060020a0281526004018090506020604051808303816000876161da5a03f11561000257505060408051805160e160020a630566670302825260048201949094526024810193909352600160a060020a038816604484015260006064840181905260848401819052905160a4808501949293509091829003018183876161da5a03f11561000257505050611eab610639565b600160a060020a031663645a3b7282600160a060020a0316632e94420f6040518160e060020a0281526004018090506020604051808303816000876161da5a03f115610002575050604051519050611f01610260565b600160a060020a031663f92eb77485600160a060020a0316632e94420f6040518160e060020a0281526004018090506020604051808303816000876161da5a03f11561000257505060408051805160e260020a633e4baddd028252600482015290516024828101935060209282900301816000876161da5a03f11561000257505060408051805160e060020a86028252600482019490945260248101939093525160448381019360009350829003018183876161da5a03f11561000257505050505050565b6040805160025460e060020a6313bc6d4b02825233600160a060020a03908116600484015292519216916313bc6d4b9160248181019260209290919082900301816000876161da5a03f115610002575050604051511515905061202857610002565b612030610118565b600160a060020a0316639859387b826040518260e060020a0281526004018082600160a060020a031681526020019150506000604051808303816000876161da5a03f1156100025750505050565b600254600160a060020a0316ff5b6040805160025460e060020a6313bc6d4b02825233600160a060020a03908116600484015292519216916313bc6d4b9160248181019260209290919082900301816000876161da5a03f11561000257505060405151151590506106b457610002565b600160a060020a031663d65307898383600160a060020a031663f1ff78a06040518160e060020a0281526004018090506020604051808303816000876161da5a03f1156100025750506040805180517fd6530789000000000000000000000000000000000000000000000000000000008252600160a060020a039485166004830152602482015292891660448401525160648381019360009350829003018183876161da5a03f115610002575050506121a5610118565b600160a060020a031663f4f2821b856040518260e060020a0281526004018082600160a060020a031681526020019150506000604051808303816000876161da5a03f115610002575050506121f8610cf4565b600160a060020a031663f4f2821b856040518260e060020a0281526004018082600160a060020a031681526020019150506000604051808303816000876161da5a03f1156100025750505061224b610639565b600160a060020a0316630accce06600583600160a060020a0316632e94420f6040518160e060020a0281526004018090506020604051808303816000876161da5a03f11561000257505060408051805160e360020a6306db488d028252915191928a9290916336da446891600482810192602092919082900301816000876161da5a03f1156100025750505060405180519060200150886040518660e060020a028152600401808681526020018560001916815260200184600160a060020a0316815260200183600160a060020a03168152602001828152602001955050505050506000604051808303816000876161da5a03f1156100025750505080600160a060020a031663ea71b02d6040518160e060020a0281526004018090506020604051808303816000876161da5a03f11561000257505060405151600160a060020a031660001490506124b25761239f610639565b600160a060020a0316630accce06600583600160a060020a0316632e94420f6040518160e060020a0281526004018090506020604051808303816000876161da5a03f1156100025750506040805180517fea71b02d000000000000000000000000000000000000000000000000000000008252915191928a92909163ea71b02d91600482810192602092919082900301816000876161da5a03f1156100025750505060405180519060200150886040518660e060020a028152600401808681526020018560001916815260200184600160a060020a0316815260200183600160a060020a03168152602001828152602001955050505050506000604051808303816000876161da5a03f115610002575050505b50505050565b600160a060020a03166338a699a4836040518260e060020a02815260040180826000191681526020019150506020604051808303816000876161da5a03f1156100025750506040515191506108889050565b600160a060020a031663213fe2b7836040518260e060020a0281526004018082600160a060020a031681526020019150506020604051808303816000876161da5a03f1156100025750506040515191506108889050565b600160a060020a031663f92eb774836040518260e060020a02815260040180826000191681526020019150506020604051808303816000876161da5a03f115610002575050604051519150610888905056606060405260405160c08061157983396101206040819052825160805160a051935160e0516101005160008054600160a060020a03199081163317909155600180546005805484168817905560048a90556006869055600b8590556008849055909116861760a060020a60ff02191690554360038190556002558686526101408390526101608190529396929594919390929091600160a060020a033016917f76885d242fb71c6f74a7e717416e42eff4d96faf54f6de75c6a0a6bbd8890c6b91a230600160a060020a03167fa609f6bd4ad0b4f419ddad4ac9f0d02c2b9295c5e6891469055cf73c2b568fff600b600050546040518082815260200191505060405180910390a250505050505061145e8061011b6000396000f3606060405236156101745760e060020a600035046302d05d3f811461017c57806304a7fdbc1461018e5780630e90f957146101fb5780630fb5a6b41461021257806314baa1b61461021b57806317fc45e21461023a5780632b096926146102435780632e94420f1461025b578063325a19f11461026457806336da44681461026d5780633f81a2c01461027f5780633fc306821461029757806345ecd3d7146102d45780634665096d146102dd5780634e71d92d146102e657806351a34eb8146103085780636111bb951461032d5780636f265b93146103445780637e9014e11461034d57806390ba009114610360578063927df5e014610393578063a7f437791461046c578063ad8f50081461046e578063bc6d909414610477578063bdec3ad114610557578063c19d93fb1461059a578063c9503fe2146105ad578063e0a73a93146105b6578063ea71b02d146105bf578063ea8a1af0146105d1578063ee4a96f9146105f3578063f1ff78a01461065c575b61046c610002565b610665600054600160a060020a031681565b6040805160c081810190925261046c9160049160c4918390600690839083908082843760408051808301909152929750909561018495509193509091908390839080828437509095505050505050600554600090600160a060020a0390811633909116146106a857610002565b61068260015460a060020a900460ff166000145b90565b61069660085481565b61046c600435600154600160a060020a03166000141561072157610002565b610696600d5481565b610696600435600f8160068110156100025750015481565b61069660045481565b61069660035481565b610665600554600160a060020a031681565b61069660043560158160068110156100025750015481565b6106966004355b600b54600f5460009160028202808203928083039290810191018386101561078357601054840186900394505b50505050919050565b61069660025481565b61069660095481565b61046c600554600090600160a060020a03908116339091161461085857610002565b61046c600435600554600090600160a060020a03908116339091161461092e57610002565b6106826001805460a060020a900460ff161461020f565b610696600b5481565b61068260075460a060020a900460ff1681565b6106966004355b600b54601554600091600282028082039280830392908101910183861015610a6c5760165494506102cb565b61046c6004356024356044356040805160015460e360020a631c2d8fb302825260b260020a691858d8dbdd5b9d18dd1b02600483015291516000928392600160a060020a03919091169163e16c7d9891602481810192602092909190829003018187876161da5a03f1156100025750505060405180519060200150905080600160a060020a031663c4b0c96a336040518260e060020a0281526004018082600160a060020a031681526020019150506020604051808303816000876161da5a03f1156100025750506040515115159050610b4657610002565b005b610696600a5481565b61046c60006000600060006000600160009054906101000a9004600160a060020a0316600160a060020a031663e16c7d986040518160e060020a028152600401808060b260020a691858d8dbdd5b9d18dd1b0281526020015060200190506020604051808303816000876161da5a03f1156100025750505060405180519060200150905080600160a060020a031663c4b0c96a336040518260e060020a0281526004018082600160a060020a031681526020019150506020604051808303816000876161da5a03f1156100025750506040515115159050610f1757610002565b61046c5b60015b60058160ff16101561071e57600f6001820160ff166006811015610002578101549060ff83166006811015610002570154101561129057610002565b61069660015460a060020a900460ff1681565b61069660065481565b610696600c5481565b610665600754600160a060020a031681565b61046c600554600090600160a060020a0390811633909116146112c857610002565b6040805160c081810190925261046c9160049160c4918390600690839083908082843760408051808301909152929750909561018495509193509091908390839080828437509095505050505050600154600090600160a060020a03168114156113fb57610002565b610696600e5481565b60408051600160a060020a03929092168252519081900360200190f35b604080519115158252519081900360200190f35b60408051918252519081900360200190f35b5060005b60068160ff16101561070857828160ff166006811015610002576020020151600f60ff831660068110156100025701558160ff82166006811015610002576020020151601560ff831660068110156100025701556001016106ac565b61071061055b565b505050565b600e8054820190555b50565b6040805160015460e060020a6313bc6d4b02825233600160a060020a03908116600484015292519216916313bc6d4b9160248181019260209290919082900301816000876161da5a03f115610002575050604051511515905061071557610002565b83861015801561079257508286105b156107b457600f546010546011548689039082030291909104900394506102cb565b8286101580156107c55750600b5486105b156107e757600f546011546012548589039082030291909104900394506102cb565b600b5486108015906107f857508186105b1561081d57600b54600f546012546013549289039281039290920204900394506102cb565b81861015801561082c57508086105b1561084e57600f546013546014548489039082030291909104900394506102cb565b60145494506102cb565b60015460a060020a900460ff1660001461087157610002565b600254600a01431161088257610002565b6040805160015460e360020a631c2d8fb302825260a860020a6a636f6e74726163746170690260048301529151600160a060020a03929092169163e16c7d989160248181019260209290919082900301816000876161da5a03f1156100025750505060405180519060200150905080600160a060020a031663771d50e16040518160e060020a0281526004018090506000604051808303816000876161da5a03f1156100025750505050565b60015460a060020a900460ff1660001461094757610002565b600254600a01431161095857610002565b6040805160015460e360020a631c2d8fb302825260a860020a6a636f6e74726163746170690260048301529151600160a060020a03929092169163e16c7d989160248181019260209290919082900301816000876161da5a03f1156100025750506040805180517f51a34eb8000000000000000000000000000000000000000000000000000000008252600482018690529151919350600160a060020a03841692506351a34eb8916024808301926000929190829003018183876161da5a03f11561000257505050600b8290554360025560408051838152905130600160a060020a0316917fa609f6bd4ad0b4f419ddad4ac9f0d02c2b9295c5e6891469055cf73c2b568fff919081900360200190a25050565b838610158015610a7b57508286105b15610a9d576015546016546017548689039082900302919091040194506102cb565b828610158015610aae5750600b5486105b15610ad0576015546017546018548589039082900302919091040194506102cb565b600b548610801590610ae157508186105b15610b0657600b546015546018546019549289039281900392909202040194506102cb565b818610158015610b1557508086105b15610b3757601554601954601a548489039082900302919091040194506102cb565b601a54860181900394506102cb565b60015460a060020a900460ff16600014610b5f57610002565b6001805460a060020a60ff02191660a060020a17908190556040805160e360020a631c2d8fb302815260a860020a6a636f6e74726163746170690260048201529051600160a060020a03929092169163e16c7d989160248181019260209290919082900301816000876161da5a03f1156100025750506040805180516004805460e260020a633e4baddd028452908301529151919450600160a060020a038516925063f92eb77491602482810192602092919082900301816000876161da5a03f115610002575050604080518051600a556005547ffebf661200000000000000000000000000000000000000000000000000000000825233600160a060020a03908116600484015216602482015260448101879052905163febf661291606480820192600092909190829003018183876161da5a03f115610002575050508215610cc7576007805473ffffffffffffffffffffffffffffffffffffffff191633179055610dbb565b6040805160055460065460e060020a63599efa6b028352600160a060020a039182166004840152602483015291519184169163599efa6b91604481810192600092909190829003018183876161da5a03f115610002575050604080516006547f56ccb6f000000000000000000000000000000000000000000000000000000000825233600160a060020a03166004830152602482015290516356ccb6f091604480820192600092909190829003018183876161da5a03f115610002575050600580546007805473ffffffffffffffffffffffffffffffffffffffff19908116600160a060020a038416179091551633179055505b6007805460a060020a60ff02191660a060020a87810291909117918290556008544301600955900460ff1615610df757600a54610e039061029e565b600a54610e0b90610367565b600c55610e0f565b600c555b600c54670de0b6b3a7640000850204600d55600754600554604080517f759297bb000000000000000000000000000000000000000000000000000000008152600160a060020a039384166004820152918316602483015260448201879052519184169163759297bb91606481810192600092909190829003018183876161da5a03f11561000257505060408051600754600a54600d54600554600c5460a060020a850460ff161515865260208601929092528486019290925260608401529251600160a060020a0391821694509281169230909116917f3b3d1986083d191be01d28623dc19604728e29ae28bdb9ba52757fdee1a18de2919081900360800190a45050505050565b600954431015610f2657610002565b6001805460a060020a900460ff1614610f3e57610002565b6001805460a060020a60ff0219167402000000000000000000000000000000000000000017908190556040805160e360020a631c2d8fb302815260a860020a6a636f6e74726163746170690260048201529051600160a060020a03929092169163e16c7d989160248181019260209290919082900301816000876161da5a03f1156100025750506040805180516004805460e260020a633e4baddd028452908301529151919750600160a060020a038816925063f92eb77491602482810192602092919082900301816000876161da5a03f115610002575050604051516007549095506000945060a060020a900460ff1615905061105c57600a5484111561105757600a54600d54670de0b6b3a7640000918603020492505b61107e565b600a5484101561107e57600a54600d54670de0b6b3a764000091869003020492505b60065483111561108e5760065492505b6006548390039150600083111561111857604080516005546007547f5928d37f000000000000000000000000000000000000000000000000000000008352600160a060020a0391821660048401528116602483015260448201869052915191871691635928d37f91606481810192600092909190829003018183876161da5a03f115610002575050505b600082111561117a576040805160055460e060020a63599efa6b028252600160a060020a0390811660048301526024820185905291519187169163599efa6b91604481810192600092909190829003018183876161da5a03f115610002575050505b6040805185815260208101849052808201859052905130600160a060020a0316917f89e690b1d5aaae14f3e85f108dc92d9ab3763a58d45aed8b59daedbbae8fe794919081900360600190a260008311156112285784600160a060020a0316634cc927d785336040518360e060020a0281526004018083815260200182600160a060020a03168152602001925050506000604051808303816000876161da5a03f11561000257505050611282565b84600160a060020a0316634cc927d7600a60005054336040518360e060020a0281526004018083815260200182600160a060020a03168152602001925050506000604051808303816000876161da5a03f115610002575050505b600054600160a060020a0316ff5b60156001820160ff166006811015610002578101549060ff8316600681101561000257015411156112c057610002565b60010161055e565b60015460a060020a900460ff166000146112e157610002565b600254600a0143116112f257610002565b6001546040805160e360020a631c2d8fb302815260a860020a6a636f6e74726163746170690260048201529051600160a060020a03929092169163e16c7d989160248181019260209290919082900301816000876161da5a03f11561000257505060408051805160055460065460e060020a63599efa6b028452600160a060020a03918216600485015260248401529251909450918416925063599efa6b916044808301926000929190829003018183876161da5a03f1156100025750505080600160a060020a0316632b68bb2d6040518160e060020a0281526004018090506000604051808303816000876161da5a03f115610002575050600054600160a060020a03169050ff5b6001546040805160e060020a6313bc6d4b02815233600160a060020a039081166004830152915191909216916313bc6d4b91602480830192602092919082900301816000876161da5a03f11561000257505060405151151590506106a85761000256", + "nonce": "16", + "storage": { + "0x0000000000000000000000000000000000000000000000000000000000000002": "0x0000000000000000000000002cccf5e0538493c235d1c5ef6580f77d99e91396" + } + }, + "0x70c9217d814985faef62b124420f8dfbddd96433": { + "balance": "0x4ef436dcbda6cd4a", + "code": "0x", + "nonce": "1634", + "storage": {} + }, + "0x7986bad81f4cbd9317f5a46861437dae58d69113": { + "balance": "0x0", + "code": "0x6060604052361561008d5760e060020a600035046302d05d3f811461009557806316c66cc6146100a75780631ab9075a146100d7578063213fe2b7146101125780639859387b1461013f578063988db79c1461015e578063a7f4377914610180578063b9858a281461019e578063c8e40fbf146101c0578063f4f2821b146101e8578063f905c15a14610209575b610212610002565b610214600054600160a060020a031681565b600160a060020a0360043581811660009081526005602052604081205461023193168114610257575060016101e3565b610212600435600254600160a060020a0316600014801590610108575060025433600160a060020a03908116911614155b1561025f57610002565b610214600435600160a060020a03811660009081526004602052604081205460ff16151561027557610002565b610212600435600254600160a060020a03166000141561029b57610002565b610212600435602435600254600160a060020a03166000141561050457610002565b61021260025433600160a060020a0390811691161461056757610002565b610212600435602435600254600160a060020a03166000141561057557610002565b610231600435600160a060020a03811660009081526004602052604090205460ff165b919050565b610212600435600254600090600160a060020a031681141561072057610002565b61024560035481565b005b60408051600160a060020a03929092168252519081900360200190f35b604080519115158252519081900360200190f35b60408051918252519081900360200190f35b5060006101e3565b60028054600160a060020a031916821790555b50565b50600160a060020a038181166000908152600460205260409020546101009004166101e3565b6002546040805160e060020a6313bc6d4b02815233600160a060020a039081166004830152915191909216916313bc6d4b91602482810192602092919082900301816000876161da5a03f11561000257505060405151151590506102fe57610002565b600160a060020a03811660009081526004602052604090205460ff161515610272576040516104028061092e833901809050604051809103906000f06004600050600083600160a060020a0316815260200190815260200160002060005060000160016101000a815481600160a060020a030219169083021790555060016004600050600083600160a060020a0316815260200190815260200160002060005060000160006101000a81548160ff0219169083021790555050565b600160a060020a03821660009081526004602052604090205460ff1615156104725760405161040280610d30833901809050604051809103906000f06004600050600084600160a060020a0316815260200190815260200160002060005060000160016101000a815481600160a060020a030219169083021790555060016004600050600084600160a060020a0316815260200190815260200160002060005060000160006101000a81548160ff021916908302179055505b600160a060020a03828116600090815260046020819052604080518184205460e060020a630a3b0a4f02825286861693820193909352905161010090920490931692630a3b0a4f926024828101939192829003018183876161da5a03f11561000257505050600160a060020a03811660009081526006602052604090208054600160a060020a031916831790555b5050565b6002546040805160e060020a6313bc6d4b02815233600160a060020a039081166004830152915191909216916313bc6d4b91602482810192602092919082900301816000876161da5a03f11561000257505060405151151590506103b957610002565b600254600160a060020a0316ff5b6002546040805160e060020a6313bc6d4b02815233600160a060020a039081166004830152915191909216916313bc6d4b91602482810192602092919082900301816000876161da5a03f11561000257505060405151151590506105d857610002565b600160a060020a03821660009081526004602052604090205460ff1615156106915760405161040280611132833901809050604051809103906000f06004600050600084600160a060020a0316815260200190815260200160002060005060000160016101000a815481600160a060020a030219169083021790555060016004600050600084600160a060020a0316815260200190815260200160002060005060000160006101000a81548160ff021916908302179055505b600160a060020a03828116600090815260046020819052604080518184205460e060020a630a3b0a4f02825286861693820193909352905161010090920490931692630a3b0a4f926024828101939192829003018183876161da5a03f11561000257505050600160a060020a031660009081526005602052604090208054600160a060020a0319169091179055565b6002546040805160e060020a6313bc6d4b02815233600160a060020a039081166004830152915191909216916313bc6d4b91602482810192602092919082900301816000876161da5a03f115610002575050604051511515905061078357610002565b50600160a060020a0381811660009081526005602090815260408083205490931680835260049091529190205460ff161561080f576040600081812054825160e260020a632e72bafd028152600160a060020a03868116600483015293516101009092049093169263b9caebf4926024828101939192829003018183876161da5a03f115610002575050505b600160a060020a03828116600090815260056020526040812054909116146108545760406000908120600160a060020a0384169091528054600160a060020a03191690555b50600160a060020a0381811660009081526006602090815260408083205490931680835260049091529190205460ff16156108e657600160a060020a038181166000908152604080518183205460e260020a632e72bafd028252868516600483015291516101009092049093169263b9caebf4926024828101939192829003018183876161da5a03f115610002575050505b600160a060020a03828116600090815260066020526040812054909116146105005760406000908120600160a060020a0384169091528054600160a060020a0319169055505056606060405260008054600160a060020a031916331790556103de806100246000396000f3606060405236156100615760e060020a600035046302d05d3f81146100695780630a3b0a4f1461007b5780630d327fa7146100f6578063524d81d314610109578063a7f4377914610114578063b9caebf414610132578063bbec3bae14610296575b6102ce610002565b6102d0600054600160a060020a031681565b6102ce600435600254600090600160a060020a03168114156102ed5760028054600160a060020a03199081168417808355600160a060020a03808616855260036020526040852060018101805493831694909316939093179091559154815461010060a860020a031916921661010002919091179055610372565b6102d0600254600160a060020a03165b90565b6102e3600154610106565b6102ce60005433600160a060020a039081169116146103c657610002565b6102ce600435600160a060020a038116600090815260036020526040812054819060ff16801561016457506001548190115b1561029157506040808220600180820154915461010090819004600160a060020a039081168087528587209093018054600160a060020a031916948216948517905583865293909420805461010060a860020a03191694820294909417909355600254909190811690841614156101e85760028054600160a060020a031916821790555b600254600160a060020a0390811690841614156102105760028054600160a060020a03191690555b6003600050600084600160a060020a0316815260200190815260200160002060006000820160006101000a81549060ff02191690556000820160016101000a815490600160a060020a0302191690556001820160006101000a815490600160a060020a03021916905550506001600081815054809291906001900391905055505b505050565b600160a060020a036004358181166000908152600360205260408120600101546002546102d09491821691168114156103d4576103d8565b005b600160a060020a03166060908152602090f35b6060908152602090f35b60028054600160a060020a03908116835260036020526040808420805461010060a860020a0319808216610100808a029190911790935590829004841680875283872060019081018054600160a060020a03199081168b179091559654868a168952949097209687018054949095169390951692909217909255835416908202179091555b60016003600050600084600160a060020a0316815260200190815260200160002060005060000160006101000a81548160ff0219169083021790555060016000818150548092919060010191905055505050565b600054600160a060020a0316ff5b8091505b5091905056606060405260008054600160a060020a031916331790556103de806100246000396000f3606060405236156100615760e060020a600035046302d05d3f81146100695780630a3b0a4f1461007b5780630d327fa7146100f6578063524d81d314610109578063a7f4377914610114578063b9caebf414610132578063bbec3bae14610296575b6102ce610002565b6102d0600054600160a060020a031681565b6102ce600435600254600090600160a060020a03168114156102ed5760028054600160a060020a03199081168417808355600160a060020a03808616855260036020526040852060018101805493831694909316939093179091559154815461010060a860020a031916921661010002919091179055610372565b6102d0600254600160a060020a03165b90565b6102e3600154610106565b6102ce60005433600160a060020a039081169116146103c657610002565b6102ce600435600160a060020a038116600090815260036020526040812054819060ff16801561016457506001548190115b1561029157506040808220600180820154915461010090819004600160a060020a039081168087528587209093018054600160a060020a031916948216948517905583865293909420805461010060a860020a03191694820294909417909355600254909190811690841614156101e85760028054600160a060020a031916821790555b600254600160a060020a0390811690841614156102105760028054600160a060020a03191690555b6003600050600084600160a060020a0316815260200190815260200160002060006000820160006101000a81549060ff02191690556000820160016101000a815490600160a060020a0302191690556001820160006101000a815490600160a060020a03021916905550506001600081815054809291906001900391905055505b505050565b600160a060020a036004358181166000908152600360205260408120600101546002546102d09491821691168114156103d4576103d8565b005b600160a060020a03166060908152602090f35b6060908152602090f35b60028054600160a060020a03908116835260036020526040808420805461010060a860020a0319808216610100808a029190911790935590829004841680875283872060019081018054600160a060020a03199081168b179091559654868a168952949097209687018054949095169390951692909217909255835416908202179091555b60016003600050600084600160a060020a0316815260200190815260200160002060005060000160006101000a81548160ff0219169083021790555060016000818150548092919060010191905055505050565b600054600160a060020a0316ff5b8091505b5091905056606060405260008054600160a060020a031916331790556103de806100246000396000f3606060405236156100615760e060020a600035046302d05d3f81146100695780630a3b0a4f1461007b5780630d327fa7146100f6578063524d81d314610109578063a7f4377914610114578063b9caebf414610132578063bbec3bae14610296575b6102ce610002565b6102d0600054600160a060020a031681565b6102ce600435600254600090600160a060020a03168114156102ed5760028054600160a060020a03199081168417808355600160a060020a03808616855260036020526040852060018101805493831694909316939093179091559154815461010060a860020a031916921661010002919091179055610372565b6102d0600254600160a060020a03165b90565b6102e3600154610106565b6102ce60005433600160a060020a039081169116146103c657610002565b6102ce600435600160a060020a038116600090815260036020526040812054819060ff16801561016457506001548190115b1561029157506040808220600180820154915461010090819004600160a060020a039081168087528587209093018054600160a060020a031916948216948517905583865293909420805461010060a860020a03191694820294909417909355600254909190811690841614156101e85760028054600160a060020a031916821790555b600254600160a060020a0390811690841614156102105760028054600160a060020a03191690555b6003600050600084600160a060020a0316815260200190815260200160002060006000820160006101000a81549060ff02191690556000820160016101000a815490600160a060020a0302191690556001820160006101000a815490600160a060020a03021916905550506001600081815054809291906001900391905055505b505050565b600160a060020a036004358181166000908152600360205260408120600101546002546102d09491821691168114156103d4576103d8565b005b600160a060020a03166060908152602090f35b6060908152602090f35b60028054600160a060020a03908116835260036020526040808420805461010060a860020a0319808216610100808a029190911790935590829004841680875283872060019081018054600160a060020a03199081168b179091559654868a168952949097209687018054949095169390951692909217909255835416908202179091555b60016003600050600084600160a060020a0316815260200190815260200160002060005060000160006101000a81548160ff0219169083021790555060016000818150548092919060010191905055505050565b600054600160a060020a0316ff5b8091505b5091905056", + "nonce": "7", + "storage": { + "0xffc4df2d4f3d2cffad590bed6296406ab7926ca9e74784f74a95191fa069a174": "0x00000000000000000000000070c9217d814985faef62b124420f8dfbddd96433" + } + }, + "0xb4fe7aa695b326c9d219158d2ca50db77b39f99f": { + "balance": "0x0", + "code": "0x606060405236156100ae5760e060020a600035046302d05d3f81146100b65780631ab9075a146100c85780632b68bb2d146101035780634cc927d7146101c557806351a34eb81461028e57806356ccb6f0146103545780635928d37f1461041d578063599efa6b146104e9578063759297bb146105b2578063771d50e11461067e578063a7f4377914610740578063f905c15a1461075e578063f92eb77414610767578063febf661214610836575b610902610002565b610904600054600160a060020a031681565b610902600435600254600160a060020a03166000148015906100f9575060025433600160a060020a03908116911614155b1561092057610002565b60025460e360020a631c2d8fb302606090815260aa60020a6a18dbdb9d1c9858dd18dd1b02606452610902916000918291600160a060020a03169063e16c7d989060849060209060248187876161da5a03f1156100025750505060405180519060200150905080600160a060020a03166316c66cc6336040518260e060020a0281526004018082600160a060020a031681526020019150506020604051808303816000876161da5a03f115610002575050604051511515905061094257610002565b61090260043560243560025460e360020a631c2d8fb302606090815260aa60020a6a18dbdb9d1c9858dd18dd1b026064526000918291600160a060020a039091169063e16c7d989060849060209060248187876161da5a03f1156100025750505060405180519060200150905080600160a060020a03166316c66cc6336040518260e060020a0281526004018082600160a060020a031681526020019150506020604051808303816000876161da5a03f1156100025750506040515115159050610a0d57610002565b61090260043560025460e360020a631c2d8fb302606090815260aa60020a6a18dbdb9d1c9858dd18dd1b026064526000918291600160a060020a039091169063e16c7d989060849060209060248187876161da5a03f1156100025750505060405180519060200150905080600160a060020a03166316c66cc6336040518260e060020a0281526004018082600160a060020a031681526020019150506020604051808303816000876161da5a03f1156100025750506040515115159050610ae957610002565b61090260043560243560025460e360020a631c2d8fb302606090815260aa60020a6a18dbdb9d1c9858dd18dd1b026064526000918291600160a060020a039091169063e16c7d989060849060209060248187876161da5a03f1156100025750505060405180519060200150905080600160a060020a03166316c66cc6336040518260e060020a0281526004018082600160a060020a031681526020019150506020604051808303816000876161da5a03f1156100025750506040515115159050610bbc57610002565b61090260043560243560443560025460e360020a631c2d8fb302606090815260aa60020a6a18dbdb9d1c9858dd18dd1b026064526000918291600160a060020a039091169063e16c7d989060849060209060248187876161da5a03f1156100025750505060405180519060200150905080600160a060020a03166316c66cc6336040518260e060020a0281526004018082600160a060020a031681526020019150506020604051808303816000876161da5a03f1156100025750506040515115159050610c9657610002565b61090260043560243560025460e360020a631c2d8fb302606090815260aa60020a6a18dbdb9d1c9858dd18dd1b026064526000918291600160a060020a039091169063e16c7d989060849060209060248187876161da5a03f1156100025750505060405180519060200150905080600160a060020a03166316c66cc6336040518260e060020a0281526004018082600160a060020a031681526020019150506020604051808303816000876161da5a03f1156100025750506040515115159050610de057610002565b61090260043560243560443560025460e360020a631c2d8fb302606090815260aa60020a6a18dbdb9d1c9858dd18dd1b026064526000918291600160a060020a039091169063e16c7d989060849060209060248187876161da5a03f1156100025750505060405180519060200150905080600160a060020a03166316c66cc6336040518260e060020a0281526004018082600160a060020a031681526020019150506020604051808303816000876161da5a03f1156100025750506040515115159050610ebb57610002565b60025460e360020a631c2d8fb302606090815260aa60020a6a18dbdb9d1c9858dd18dd1b02606452610902916000918291600160a060020a03169063e16c7d989060849060209060248187876161da5a03f1156100025750505060405180519060200150905080600160a060020a03166316c66cc6336040518260e060020a0281526004018082600160a060020a031681526020019150506020604051808303816000876161da5a03f1156100025750506040515115159050610f9e57610002565b61090260025433600160a060020a0390811691161461106957610002565b61090e60035481565b61090e60043560025460e360020a631c2d8fb302606090815260aa60020a6a18dbdb9d1c9858dd18dd1b026064526000918291600160a060020a039091169063e16c7d989060849060209060248187876161da5a03f1156100025750506040805180517ff92eb774000000000000000000000000000000000000000000000000000000008252600482018790529151919350600160a060020a038416925063f92eb774916024828101926020929190829003018188876161da5a03f11561000257505060405151949350505050565b61090260043560243560443560025460e360020a631c2d8fb302606090815260aa60020a6a18dbdb9d1c9858dd18dd1b026064526000918291600160a060020a039091169063e16c7d989060849060209060248187876161da5a03f1156100025750505060405180519060200150905080600160a060020a03166316c66cc6336040518260e060020a0281526004018082600160a060020a031681526020019150506020604051808303816000876161da5a03f115610002575050604051511515905061107757610002565b005b6060908152602090f35b60408051918252519081900360200190f35b6002805473ffffffffffffffffffffffffffffffffffffffff19168217905550565b6040805160025460e360020a631c2d8fb302825260aa60020a6a18dbdb9d1c9858dd18dd1b0260048301529151600160a060020a03929092169163e16c7d9891602481810192602092909190829003018188876161da5a03f1156100025750506040805180517f5ed61af000000000000000000000000000000000000000000000000000000000825233600160a060020a039081166004840152925190959286169350635ed61af092602483810193919291829003018183876161da5a03f115610002575050505050565b6040805160025460e360020a631c2d8fb302825260aa60020a6a18dbdb9d1c9858dd18dd1b0260048301529151600160a060020a03929092169163e16c7d9891602481810192602092909190829003018188876161da5a03f1156100025750506040805180517fab03fc2600000000000000000000000000000000000000000000000000000000825233600160a060020a03908116600484015260248301899052808816604484015292519095928616935063ab03fc2692606483810193919291829003018183876161da5a03f1156100025750505050505050565b6040805160025460e360020a631c2d8fb302825260aa60020a6a18dbdb9d1c9858dd18dd1b0260048301529151600160a060020a03929092169163e16c7d9891602481810192602092909190829003018188876161da5a03f1156100025750506040805180517f949ae47900000000000000000000000000000000000000000000000000000000825233600160a060020a0390811660048401526024830188905292519095928616935063949ae47992604483810193919291829003018183876161da5a03f11561000257505050505050565b6040805160025460e360020a631c2d8fb302825260b260020a691858d8dbdd5b9d18dd1b0260048301529151600160a060020a03929092169163e16c7d9891602481810192602092909190829003018188876161da5a03f1156100025750506040805180517f46d88e7d000000000000000000000000000000000000000000000000000000008252600160a060020a0380891660048401523381166024840152604483018890529251909592861693506346d88e7d92606483810193919291829003018183876161da5a03f1156100025750505050505050565b6040805160025460e360020a631c2d8fb302825260b260020a691858d8dbdd5b9d18dd1b0260048301529151600160a060020a03929092169163e16c7d9891602481810192602092909190829003018188876161da5a03f1156100025750506040805180517f5315cdde00000000000000000000000000000000000000000000000000000000825233600160a060020a039081166004840152808a16602484015260448301889052925190959286169350635315cdde92606483810193919291829003018183876161da5a03f115610002575050604080517f5928d37f00000000000000000000000000000000000000000000000000000000815233600160a060020a03908116600483015287166024820152604481018690529051635928d37f91606481810192600092909190829003018183876161da5a03f115610002575050505050505050565b6040805160025460e360020a631c2d8fb302825260b260020a691858d8dbdd5b9d18dd1b0260048301529151600160a060020a03929092169163e16c7d9891602481810192602092909190829003018188876161da5a03f1156100025750506040805180517fe68e401c00000000000000000000000000000000000000000000000000000000825233600160a060020a03908116600484015280891660248401526044830188905292519095928616935063e68e401c92606483810193919291829003018183876161da5a03f1156100025750505050505050565b6040805160025460e360020a631c2d8fb302825260b260020a691858d8dbdd5b9d18dd1b0260048301529151600160a060020a03929092169163e16c7d9891602481810192602092909190829003018188876161da5a03f1156100025750506040805180517f5152f381000000000000000000000000000000000000000000000000000000008252600160a060020a03808a1660048401528089166024840152604483018890523381166064840152925190959286169350635152f38192608483810193919291829003018183876161da5a03f115610002575050505050505050565b6040805160025460e360020a631c2d8fb302825260aa60020a6a18dbdb9d1c9858dd18dd1b0260048301529151600160a060020a03929092169163e16c7d9891602481810192602092909190829003018188876161da5a03f1156100025750506040805180517f056d447000000000000000000000000000000000000000000000000000000000825233600160a060020a03908116600484015292519095928616935063056d447092602483810193919291829003018183876161da5a03f115610002575050505050565b600254600160a060020a0316ff5b6040805160025460e360020a631c2d8fb302825260aa60020a6a18dbdb9d1c9858dd18dd1b0260048301529151600160a060020a03929092169163e16c7d9891602481810192602092909190829003018188876161da5a03f1156100025750506040805180517f3ae1005c00000000000000000000000000000000000000000000000000000000825233600160a060020a039081166004840152808a166024840152808916604484015260648301889052925190959286169350633ae1005c92608483810193919291829003018183876161da5a03f11561000257505050505050505056", + "nonce": "1", + "storage": { + "0x0000000000000000000000000000000000000000000000000000000000000002": "0x0000000000000000000000002cccf5e0538493c235d1c5ef6580f77d99e91396" + } + }, + "0xc212e03b9e060e36facad5fd8f4435412ca22e6b": { + "balance": "0x0", + "code": "0x606060405236156101745760e060020a600035046302d05d3f811461017c57806304a7fdbc1461018e5780630e90f957146101fb5780630fb5a6b41461021257806314baa1b61461021b57806317fc45e21461023a5780632b096926146102435780632e94420f1461025b578063325a19f11461026457806336da44681461026d5780633f81a2c01461027f5780633fc306821461029757806345ecd3d7146102d45780634665096d146102dd5780634e71d92d146102e657806351a34eb8146103085780636111bb951461032d5780636f265b93146103445780637e9014e11461034d57806390ba009114610360578063927df5e014610393578063a7f437791461046c578063ad8f50081461046e578063bc6d909414610477578063bdec3ad114610557578063c19d93fb1461059a578063c9503fe2146105ad578063e0a73a93146105b6578063ea71b02d146105bf578063ea8a1af0146105d1578063ee4a96f9146105f3578063f1ff78a01461065c575b61046c610002565b610665600054600160a060020a031681565b6040805160c081810190925261046c9160049160c4918390600690839083908082843760408051808301909152929750909561018495509193509091908390839080828437509095505050505050600554600090600160a060020a0390811633909116146106a857610002565b61068260015460a060020a900460ff166000145b90565b61069660085481565b61046c600435600154600160a060020a03166000141561072157610002565b610696600d5481565b610696600435600f8160068110156100025750015481565b61069660045481565b61069660035481565b610665600554600160a060020a031681565b61069660043560158160068110156100025750015481565b6106966004355b600b54600f5460009160028202808203928083039290810191018386101561078357601054840186900394505b50505050919050565b61069660025481565b61069660095481565b61046c600554600090600160a060020a03908116339091161461085857610002565b61046c600435600554600090600160a060020a03908116339091161461092e57610002565b6106826001805460a060020a900460ff161461020f565b610696600b5481565b61068260075460a060020a900460ff1681565b6106966004355b600b54601554600091600282028082039280830392908101910183861015610a6c5760165494506102cb565b61046c6004356024356044356040805160015460e360020a631c2d8fb302825260b260020a691858d8dbdd5b9d18dd1b02600483015291516000928392600160a060020a03919091169163e16c7d9891602481810192602092909190829003018187876161da5a03f1156100025750505060405180519060200150905080600160a060020a031663c4b0c96a336040518260e060020a0281526004018082600160a060020a031681526020019150506020604051808303816000876161da5a03f1156100025750506040515115159050610b4657610002565b005b610696600a5481565b61046c60006000600060006000600160009054906101000a9004600160a060020a0316600160a060020a031663e16c7d986040518160e060020a028152600401808060b260020a691858d8dbdd5b9d18dd1b0281526020015060200190506020604051808303816000876161da5a03f1156100025750505060405180519060200150905080600160a060020a031663c4b0c96a336040518260e060020a0281526004018082600160a060020a031681526020019150506020604051808303816000876161da5a03f1156100025750506040515115159050610f1757610002565b61046c5b60015b60058160ff16101561071e57600f6001820160ff166006811015610002578101549060ff83166006811015610002570154101561129057610002565b61069660015460a060020a900460ff1681565b61069660065481565b610696600c5481565b610665600754600160a060020a031681565b61046c600554600090600160a060020a0390811633909116146112c857610002565b6040805160c081810190925261046c9160049160c4918390600690839083908082843760408051808301909152929750909561018495509193509091908390839080828437509095505050505050600154600090600160a060020a03168114156113fb57610002565b610696600e5481565b60408051600160a060020a03929092168252519081900360200190f35b604080519115158252519081900360200190f35b60408051918252519081900360200190f35b5060005b60068160ff16101561070857828160ff166006811015610002576020020151600f60ff831660068110156100025701558160ff82166006811015610002576020020151601560ff831660068110156100025701556001016106ac565b61071061055b565b505050565b600e8054820190555b50565b6040805160015460e060020a6313bc6d4b02825233600160a060020a03908116600484015292519216916313bc6d4b9160248181019260209290919082900301816000876161da5a03f115610002575050604051511515905061071557610002565b83861015801561079257508286105b156107b457600f546010546011548689039082030291909104900394506102cb565b8286101580156107c55750600b5486105b156107e757600f546011546012548589039082030291909104900394506102cb565b600b5486108015906107f857508186105b1561081d57600b54600f546012546013549289039281039290920204900394506102cb565b81861015801561082c57508086105b1561084e57600f546013546014548489039082030291909104900394506102cb565b60145494506102cb565b60015460a060020a900460ff1660001461087157610002565b600254600a01431161088257610002565b6040805160015460e360020a631c2d8fb302825260a860020a6a636f6e74726163746170690260048301529151600160a060020a03929092169163e16c7d989160248181019260209290919082900301816000876161da5a03f1156100025750505060405180519060200150905080600160a060020a031663771d50e16040518160e060020a0281526004018090506000604051808303816000876161da5a03f1156100025750505050565b60015460a060020a900460ff1660001461094757610002565b600254600a01431161095857610002565b6040805160015460e360020a631c2d8fb302825260a860020a6a636f6e74726163746170690260048301529151600160a060020a03929092169163e16c7d989160248181019260209290919082900301816000876161da5a03f1156100025750506040805180517f51a34eb8000000000000000000000000000000000000000000000000000000008252600482018690529151919350600160a060020a03841692506351a34eb8916024808301926000929190829003018183876161da5a03f11561000257505050600b8290554360025560408051838152905130600160a060020a0316917fa609f6bd4ad0b4f419ddad4ac9f0d02c2b9295c5e6891469055cf73c2b568fff919081900360200190a25050565b838610158015610a7b57508286105b15610a9d576015546016546017548689039082900302919091040194506102cb565b828610158015610aae5750600b5486105b15610ad0576015546017546018548589039082900302919091040194506102cb565b600b548610801590610ae157508186105b15610b0657600b546015546018546019549289039281900392909202040194506102cb565b818610158015610b1557508086105b15610b3757601554601954601a548489039082900302919091040194506102cb565b601a54860181900394506102cb565b60015460a060020a900460ff16600014610b5f57610002565b6001805460a060020a60ff02191660a060020a17908190556040805160e360020a631c2d8fb302815260a860020a6a636f6e74726163746170690260048201529051600160a060020a03929092169163e16c7d989160248181019260209290919082900301816000876161da5a03f1156100025750506040805180516004805460e260020a633e4baddd028452908301529151919450600160a060020a038516925063f92eb77491602482810192602092919082900301816000876161da5a03f115610002575050604080518051600a556005547ffebf661200000000000000000000000000000000000000000000000000000000825233600160a060020a03908116600484015216602482015260448101879052905163febf661291606480820192600092909190829003018183876161da5a03f115610002575050508215610cc7576007805473ffffffffffffffffffffffffffffffffffffffff191633179055610dbb565b6040805160055460065460e060020a63599efa6b028352600160a060020a039182166004840152602483015291519184169163599efa6b91604481810192600092909190829003018183876161da5a03f115610002575050604080516006547f56ccb6f000000000000000000000000000000000000000000000000000000000825233600160a060020a03166004830152602482015290516356ccb6f091604480820192600092909190829003018183876161da5a03f115610002575050600580546007805473ffffffffffffffffffffffffffffffffffffffff19908116600160a060020a038416179091551633179055505b6007805460a060020a60ff02191660a060020a87810291909117918290556008544301600955900460ff1615610df757600a54610e039061029e565b600a54610e0b90610367565b600c55610e0f565b600c555b600c54670de0b6b3a7640000850204600d55600754600554604080517f759297bb000000000000000000000000000000000000000000000000000000008152600160a060020a039384166004820152918316602483015260448201879052519184169163759297bb91606481810192600092909190829003018183876161da5a03f11561000257505060408051600754600a54600d54600554600c5460a060020a850460ff161515865260208601929092528486019290925260608401529251600160a060020a0391821694509281169230909116917f3b3d1986083d191be01d28623dc19604728e29ae28bdb9ba52757fdee1a18de2919081900360800190a45050505050565b600954431015610f2657610002565b6001805460a060020a900460ff1614610f3e57610002565b6001805460a060020a60ff0219167402000000000000000000000000000000000000000017908190556040805160e360020a631c2d8fb302815260a860020a6a636f6e74726163746170690260048201529051600160a060020a03929092169163e16c7d989160248181019260209290919082900301816000876161da5a03f1156100025750506040805180516004805460e260020a633e4baddd028452908301529151919750600160a060020a038816925063f92eb77491602482810192602092919082900301816000876161da5a03f115610002575050604051516007549095506000945060a060020a900460ff1615905061105c57600a5484111561105757600a54600d54670de0b6b3a7640000918603020492505b61107e565b600a5484101561107e57600a54600d54670de0b6b3a764000091869003020492505b60065483111561108e5760065492505b6006548390039150600083111561111857604080516005546007547f5928d37f000000000000000000000000000000000000000000000000000000008352600160a060020a0391821660048401528116602483015260448201869052915191871691635928d37f91606481810192600092909190829003018183876161da5a03f115610002575050505b600082111561117a576040805160055460e060020a63599efa6b028252600160a060020a0390811660048301526024820185905291519187169163599efa6b91604481810192600092909190829003018183876161da5a03f115610002575050505b6040805185815260208101849052808201859052905130600160a060020a0316917f89e690b1d5aaae14f3e85f108dc92d9ab3763a58d45aed8b59daedbbae8fe794919081900360600190a260008311156112285784600160a060020a0316634cc927d785336040518360e060020a0281526004018083815260200182600160a060020a03168152602001925050506000604051808303816000876161da5a03f11561000257505050611282565b84600160a060020a0316634cc927d7600a60005054336040518360e060020a0281526004018083815260200182600160a060020a03168152602001925050506000604051808303816000876161da5a03f115610002575050505b600054600160a060020a0316ff5b60156001820160ff166006811015610002578101549060ff8316600681101561000257015411156112c057610002565b60010161055e565b60015460a060020a900460ff166000146112e157610002565b600254600a0143116112f257610002565b6001546040805160e360020a631c2d8fb302815260a860020a6a636f6e74726163746170690260048201529051600160a060020a03929092169163e16c7d989160248181019260209290919082900301816000876161da5a03f11561000257505060408051805160055460065460e060020a63599efa6b028452600160a060020a03918216600485015260248401529251909450918416925063599efa6b916044808301926000929190829003018183876161da5a03f1156100025750505080600160a060020a0316632b68bb2d6040518160e060020a0281526004018090506000604051808303816000876161da5a03f115610002575050600054600160a060020a03169050ff5b6001546040805160e060020a6313bc6d4b02815233600160a060020a039081166004830152915191909216916313bc6d4b91602480830192602092919082900301816000876161da5a03f11561000257505060405151151590506106a85761000256", + "nonce": "1", + "storage": { + "0x0000000000000000000000000000000000000000000000000000000000000001": "0x0000000000000000000000002cccf5e0538493c235d1c5ef6580f77d99e91396", + "0x0000000000000000000000000000000000000000000000000000000000000002": "0x0000000000000000000000000000000000000000000000000000000000006195", + "0x0000000000000000000000000000000000000000000000000000000000000004": "0x5842545553440000000000000000000000000000000000000000000000000000", + "0x0000000000000000000000000000000000000000000000000000000000000005": "0x00000000000000000000000070c9217d814985faef62b124420f8dfbddd96433", + "0x0000000000000000000000000000000000000000000000000000000000000006": "0x0000000000000000000000000000000000000000000000008ac7230489e80000", + "0x000000000000000000000000000000000000000000000000000000000000000b": "0x0000000000000000000000000000000000000000000000283c7b9181eca20000" + } + }, + "0xcf00ffd997ad14939736f026006498e3f099baaf": { + "balance": "0x0", + "code": "0x606060405236156100cf5760e060020a600035046302d05d3f81146100d7578063031e7f5d146100e95780631ab9075a1461010b5780632243118a1461014657806327aad68a1461016557806338a699a4146101da5780635188f996146101f8578063581d5d601461021e57806381738c5914610246578063977da54014610269578063a07421ce14610288578063a7f43779146102be578063bdbdb086146102dc578063e1c7111914610303578063f4f2821b14610325578063f905c15a1461034a578063f92eb77414610353575b610387610002565b610389600054600160a060020a031681565b610387600435602435600254600160a060020a0316600014156103a857610002565b610387600435600254600160a060020a031660001480159061013c575060025433600160a060020a03908116911614155b1561042957610002565b610387600435600254600160a060020a03166000141561044b57610002565b6102ac60043560008181526004602081815260408320547f524d81d3000000000000000000000000000000000000000000000000000000006060908152610100909104600160a060020a031692839263524d81d3926064928188876161da5a03f1156100025750506040515192506103819050565b61039c60043560008181526004602052604090205460ff165b919050565b6103876004356024356002546000908190600160a060020a031681141561079457610002565b61038760043560243560025460009081908190600160a060020a031681141561080457610002565b61038960043560008181526004602052604081205460ff1615156109e357610002565b610387600435600254600160a060020a0316600014156109fb57610002565b600435600090815260096020526040902054670de0b6b3a764000090810360243502045b60408051918252519081900360200190f35b61038760025433600160a060020a03908116911614610a9257610002565b600435600090815260086020526040902054670de0b6b3a7640000602435909102046102ac565b610387600435602435600254600160a060020a031660001415610aa057610002565b61038760043560025460009081908190600160a060020a0316811415610b3657610002565b6102ac60035481565b6102ac600435600081815260076020908152604080832054600690925290912054670de0b6b3a76400000204805b50919050565b005b600160a060020a03166060908152602090f35b15156060908152602090f35b60025460e060020a6313bc6d4b02606090815233600160a060020a03908116606452909116906313bc6d4b906084906020906024816000876161da5a03f11561000257505060405151151590506103fe57610002565b60008281526004602052604090205460ff16151561041b57610002565b600860205260406000205550565b6002805473ffffffffffffffffffffffffffffffffffffffff19168217905550565b60025460e060020a6313bc6d4b02606090815233600160a060020a03908116606452909116906313bc6d4b906084906020906024816000876161da5a03f11561000257505060405151151590506104a157610002565b604080516000838152600460205291909120805460ff1916600117905561040280610de2833901809050604051809103906000f0600460005060008360001916815260200190815260200160002060005060000160016101000a815481600160a060020a030219169083021790555066470de4df8200006008600050600083600019168152602001908152602001600020600050819055506703782dace9d9000060096000506000836000191681526020019081526020016000206000508190555050565b600460005060008560001916815260200190815260200160002060005060000160019054906101000a9004600160a060020a0316915081600160a060020a031663524d81d36040518160e060020a0281526004018090506020604051808303816000876161da5a03f11561000257505060405151821415905061060057838152600660209081526040808320839055600790915281208190555b81600160a060020a0316630a3b0a4f846040518260e060020a0281526004018082600160a060020a031681526020019150506000604051808303816000876161da5a03f11561000257505050600160a060020a038316808252600560209081526040808420879055805160e160020a6364a81ff102815290518694670de0b6b3a7640000949363c9503fe29360048181019492939183900301908290876161da5a03f11561000257505060408051805160e060020a636f265b930282529151919291636f265b939160048181019260209290919082900301816000876161da5a03f11561000257505050604051805190602001500204600660005060008660001916815260200190815260200160002060008282825054019250508190555080600160a060020a031663c9503fe26040518160e060020a0281526004018090506020604051808303816000876161da5a03f115610002575050506040518051906020015060076000506000866000191681526020019081526020016000206000828282505401925050819055505b50505050565b60025460e060020a6313bc6d4b02606090815233600160a060020a03908116606452909116906313bc6d4b9060849060209060248187876161da5a03f11561000257505060405151151590506107e957610002565b8381526004602052604081205460ff16151561056657610002565b60025460e060020a6313bc6d4b02606090815233600160a060020a03908116606452909116906313bc6d4b9060849060209060248187876161da5a03f115610002575050604051511515905061085957610002565b849250670de0b6b3a764000083600160a060020a031663c9503fe26040518160e060020a0281526004018090506020604051808303816000876161da5a03f115610002575060408051805160e160020a6364a81ff102825291519189028590049650600481810192602092909190829003018188876161da5a03f11561000257505060408051805160e060020a636f265b930282529151919291636f265b9391600481810192602092909190829003018189876161da5a03f115610002575050506040518051906020015002049050806006600050600085600160a060020a0316632e94420f6040518160e060020a0281526004018090506020604051808303816000876161da5a03f1156100025750604080518051855260208681528286208054989098039097557f2e94420f00000000000000000000000000000000000000000000000000000000815290518896600483810193919291829003018187876161da5a03f115610002575050604080515183526020939093525020805490910190555050505050565b60409020546101009004600160a060020a03166101f3565b60025460e060020a6313bc6d4b02606090815233600160a060020a03908116606452909116906313bc6d4b906084906020906024816000876161da5a03f1156100025750506040515115159050610a5157610002565b60008181526004602052604090205460ff161515610a6e57610002565b6040600020805474ffffffffffffffffffffffffffffffffffffffffff1916905550565b600254600160a060020a0316ff5b60025460e060020a6313bc6d4b02606090815233600160a060020a03908116606452909116906313bc6d4b906084906020906024816000876161da5a03f1156100025750506040515115159050610af657610002565b60008281526004602052604090205460ff161515610b1357610002565b670de0b6b3a7640000811115610b2857610002565b600960205260406000205550565b60025460e060020a6313bc6d4b02606090815233600160a060020a03908116606452909116906313bc6d4b9060849060209060248187876161da5a03f1156100025750506040515115159050610b8b57610002565b600160a060020a038416815260056020908152604080832054808452600490925282205490935060ff161515610bc057610002565b600460005060008460001916815260200190815260200160002060005060000160019054906101000a9004600160a060020a0316915081600160a060020a031663b9caebf4856040518260e060020a0281526004018082600160a060020a031681526020019150506000604051808303816000876161da5a03f115610002575050506005600050600085600160a060020a0316815260200190815260200160002060005060009055839050600082600160a060020a031663524d81d36040518160e060020a0281526004018090506020604051808303816000876161da5a03f115610002575050604051519190911115905061078e57670de0b6b3a764000081600160a060020a031663c9503fe26040518160e060020a0281526004018090506020604051808303816000876161da5a03f11561000257505060408051805160e060020a636f265b930282529151919291636f265b939160048181019260209290919082900301816000876161da5a03f11561000257505050604051805190602001500204600660005060008560001916815260200190815260200160002060008282825054039250508190555080600160a060020a031663c9503fe26040518160e060020a0281526004018090506020604051808303816000876161da5a03f115610002575050506040518051906020015060076000506000856000191681526020019081526020016000206000828282505403925050819055505050505056606060405260008054600160a060020a031916331790556103de806100246000396000f3606060405236156100615760e060020a600035046302d05d3f81146100695780630a3b0a4f1461007b5780630d327fa7146100f6578063524d81d314610109578063a7f4377914610114578063b9caebf414610132578063bbec3bae14610296575b6102ce610002565b6102d0600054600160a060020a031681565b6102ce600435600254600090600160a060020a03168114156102ed5760028054600160a060020a03199081168417808355600160a060020a03808616855260036020526040852060018101805493831694909316939093179091559154815461010060a860020a031916921661010002919091179055610372565b6102d0600254600160a060020a03165b90565b6102e3600154610106565b6102ce60005433600160a060020a039081169116146103c657610002565b6102ce600435600160a060020a038116600090815260036020526040812054819060ff16801561016457506001548190115b1561029157506040808220600180820154915461010090819004600160a060020a039081168087528587209093018054600160a060020a031916948216948517905583865293909420805461010060a860020a03191694820294909417909355600254909190811690841614156101e85760028054600160a060020a031916821790555b600254600160a060020a0390811690841614156102105760028054600160a060020a03191690555b6003600050600084600160a060020a0316815260200190815260200160002060006000820160006101000a81549060ff02191690556000820160016101000a815490600160a060020a0302191690556001820160006101000a815490600160a060020a03021916905550506001600081815054809291906001900391905055505b505050565b600160a060020a036004358181166000908152600360205260408120600101546002546102d09491821691168114156103d4576103d8565b005b600160a060020a03166060908152602090f35b6060908152602090f35b60028054600160a060020a03908116835260036020526040808420805461010060a860020a0319808216610100808a029190911790935590829004841680875283872060019081018054600160a060020a03199081168b179091559654868a168952949097209687018054949095169390951692909217909255835416908202179091555b60016003600050600084600160a060020a0316815260200190815260200160002060005060000160006101000a81548160ff0219169083021790555060016000818150548092919060010191905055505050565b600054600160a060020a0316ff5b8091505b5091905056", + "nonce": "3", + "storage": { + "0x0000000000000000000000000000000000000000000000000000000000000002": "0x0000000000000000000000002cccf5e0538493c235d1c5ef6580f77d99e91396", + "0x3571d73f14f31a1463bd0a2f92f7fde1653d4e1ead7aedf4b0a5df02f16092ab": "0x0000000000000000000000000000000000000000000007d634e4c55188be0000", + "0x4e64fe2d1b72d95a0a31945cc6e4f4e524ac5ad56d6bd44a85ec7bc9cc0462c0": "0x000000000000000000000000000000000000000000000002b5e3af16b1880000" + } + } + }, + "config": { + "byzantiumBlock": 1700000, + "chainId": 3, + "daoForkSupport": true, + "eip150Block": 0, + "eip150Hash": "0x41941023680923e0fe4d74a34bdac8141f2540e3ae90623718e47d66d1ca4a2d", + "eip155Block": 10, + "eip158Block": 10, + "ethash": {}, + "homesteadBlock": 0 + }, + "difficulty": "117124093", + "extraData": "0xd5830105008650617269747986312e31322e31826d61", + "gasLimit": "4707788", + "hash": "0xad325e4c49145fb7a4058a68ac741cc8607a71114e23fc88083c7e881dd653e7", + "miner": "0x00714b9ac97fd6bd9325a059a70c9b9fa94ce050", + "mixHash": "0x0af918f65cb4af04b608fc1f14a849707696986a0e7049e97ef3981808bcc65f", + "nonce": "0x38dee147326a8d40", + "number": "25000", + "stateRoot": "0xc5d6bbcd46236fcdcc80b332ffaaa5476b980b01608f9708408cfef01b58bd5b", + "timestamp": "1479891517", + "totalDifficulty": "1895410389427" + }, + "input": "0xf88b8206628504a817c8008303d09094c212e03b9e060e36facad5fd8f4435412ca22e6b80a451a34eb80000000000000000000000000000000000000000000000280faf689c35ac00002aa0a7ee5b7877811bf671d121b40569462e722657044808dc1d6c4f1e4233ec145ba0417e7543d52b65738d9df419cbe40a708424f4d54b0fc145c0a64545a2bb1065", + "result": { + "calls": [ + { + "from": "0xc212e03b9e060e36facad5fd8f4435412ca22e6b", + "gas": "0x31217", + "gasUsed": "0x334", + "input": "0xe16c7d98636f6e7472616374617069000000000000000000000000000000000000000000", + "output": "0x000000000000000000000000b4fe7aa695b326c9d219158d2ca50db77b39f99f", + "to": "0x2cccf5e0538493c235d1c5ef6580f77d99e91396", + "type": "CALL", + "value": "0x0" + }, + { + "calls": [ + { + "from": "0xb4fe7aa695b326c9d219158d2ca50db77b39f99f", + "gas": "0x2a68d", + "gasUsed": "0x334", + "input": "0xe16c7d98636f6e747261637463746c000000000000000000000000000000000000000000", + "output": "0x0000000000000000000000003e9286eafa2db8101246c2131c09b49080d00690", + "to": "0x2cccf5e0538493c235d1c5ef6580f77d99e91396", + "type": "CALL", + "value": "0x0" + }, + { + "calls": [ + { + "from": "0x3e9286eafa2db8101246c2131c09b49080d00690", + "gas": "0x23ac9", + "gasUsed": "0x334", + "input": "0xe16c7d98636f6e7472616374646200000000000000000000000000000000000000000000", + "output": "0x0000000000000000000000007986bad81f4cbd9317f5a46861437dae58d69113", + "to": "0x2cccf5e0538493c235d1c5ef6580f77d99e91396", + "type": "CALL", + "value": "0x0" + }, + { + "from": "0x3e9286eafa2db8101246c2131c09b49080d00690", + "gas": "0x23366", + "gasUsed": "0x273", + "input": "0x16c66cc6000000000000000000000000c212e03b9e060e36facad5fd8f4435412ca22e6b", + "output": "0x0000000000000000000000000000000000000000000000000000000000000001", + "to": "0x7986bad81f4cbd9317f5a46861437dae58d69113", + "type": "CALL", + "value": "0x0" + } + ], + "from": "0xb4fe7aa695b326c9d219158d2ca50db77b39f99f", + "gas": "0x29f35", + "gasUsed": "0xf8d", + "input": "0x16c66cc6000000000000000000000000c212e03b9e060e36facad5fd8f4435412ca22e6b", + "output": "0x0000000000000000000000000000000000000000000000000000000000000001", + "to": "0x3e9286eafa2db8101246c2131c09b49080d00690", + "type": "CALL", + "value": "0x0" + }, + { + "from": "0xb4fe7aa695b326c9d219158d2ca50db77b39f99f", + "gas": "0x28a9e", + "gasUsed": "0x334", + "input": "0xe16c7d98636f6e747261637463746c000000000000000000000000000000000000000000", + "output": "0x0000000000000000000000003e9286eafa2db8101246c2131c09b49080d00690", + "to": "0x2cccf5e0538493c235d1c5ef6580f77d99e91396", + "type": "CALL", + "value": "0x0" + }, + { + "calls": [ + { + "from": "0x3e9286eafa2db8101246c2131c09b49080d00690", + "gas": "0x21d79", + "gasUsed": "0x24d", + "input": "0x13bc6d4b000000000000000000000000b4fe7aa695b326c9d219158d2ca50db77b39f99f", + "output": "0x0000000000000000000000000000000000000000000000000000000000000001", + "to": "0x2cccf5e0538493c235d1c5ef6580f77d99e91396", + "type": "CALL", + "value": "0x0" + }, + { + "from": "0x3e9286eafa2db8101246c2131c09b49080d00690", + "gas": "0x2165b", + "gasUsed": "0x334", + "input": "0xe16c7d986d61726b65746462000000000000000000000000000000000000000000000000", + "output": "0x000000000000000000000000cf00ffd997ad14939736f026006498e3f099baaf", + "to": "0x2cccf5e0538493c235d1c5ef6580f77d99e91396", + "type": "CALL", + "value": "0x0" + }, + { + "calls": [ + { + "from": "0xcf00ffd997ad14939736f026006498e3f099baaf", + "gas": "0x1a8e8", + "gasUsed": "0x24d", + "input": "0x13bc6d4b0000000000000000000000003e9286eafa2db8101246c2131c09b49080d00690", + "output": "0x0000000000000000000000000000000000000000000000000000000000000001", + "to": "0x2cccf5e0538493c235d1c5ef6580f77d99e91396", + "type": "CALL", + "value": "0x0" + }, + { + "from": "0xcf00ffd997ad14939736f026006498e3f099baaf", + "gas": "0x1a2c6", + "gasUsed": "0x3cb", + "input": "0xc9503fe2", + "output": "0x0000000000000000000000000000000000000000000000008ac7230489e80000", + "to": "0xc212e03b9e060e36facad5fd8f4435412ca22e6b", + "type": "CALL", + "value": "0x0" + }, + { + "from": "0xcf00ffd997ad14939736f026006498e3f099baaf", + "gas": "0x19b72", + "gasUsed": "0x3cb", + "input": "0xc9503fe2", + "output": "0x0000000000000000000000000000000000000000000000008ac7230489e80000", + "to": "0xc212e03b9e060e36facad5fd8f4435412ca22e6b", + "type": "CALL", + "value": "0x0" + }, + { + "from": "0xcf00ffd997ad14939736f026006498e3f099baaf", + "gas": "0x19428", + "gasUsed": "0x305", + "input": "0x6f265b93", + "output": "0x0000000000000000000000000000000000000000000000283c7b9181eca20000", + "to": "0xc212e03b9e060e36facad5fd8f4435412ca22e6b", + "type": "CALL", + "value": "0x0" + }, + { + "from": "0xcf00ffd997ad14939736f026006498e3f099baaf", + "gas": "0x18d45", + "gasUsed": "0x229", + "input": "0x2e94420f", + "output": "0x5842545553440000000000000000000000000000000000000000000000000000", + "to": "0xc212e03b9e060e36facad5fd8f4435412ca22e6b", + "type": "CALL", + "value": "0x0" + }, + { + "from": "0xcf00ffd997ad14939736f026006498e3f099baaf", + "gas": "0x1734e", + "gasUsed": "0x229", + "input": "0x2e94420f", + "output": "0x5842545553440000000000000000000000000000000000000000000000000000", + "to": "0xc212e03b9e060e36facad5fd8f4435412ca22e6b", + "type": "CALL", + "value": "0x0" + } + ], + "from": "0x3e9286eafa2db8101246c2131c09b49080d00690", + "gas": "0x20ee1", + "gasUsed": "0x5374", + "input": "0x581d5d60000000000000000000000000c212e03b9e060e36facad5fd8f4435412ca22e6b0000000000000000000000000000000000000000000000280faf689c35ac0000", + "output": "0x", + "to": "0xcf00ffd997ad14939736f026006498e3f099baaf", + "type": "CALL", + "value": "0x0" + }, + { + "from": "0x3e9286eafa2db8101246c2131c09b49080d00690", + "gas": "0x1b6c1", + "gasUsed": "0x334", + "input": "0xe16c7d986c6f676d67720000000000000000000000000000000000000000000000000000", + "output": "0x0000000000000000000000002a98c5f40bfa3dee83431103c535f6fae9a8ad38", + "to": "0x2cccf5e0538493c235d1c5ef6580f77d99e91396", + "type": "CALL", + "value": "0x0" + }, + { + "from": "0x3e9286eafa2db8101246c2131c09b49080d00690", + "gas": "0x1af69", + "gasUsed": "0x229", + "input": "0x2e94420f", + "output": "0x5842545553440000000000000000000000000000000000000000000000000000", + "to": "0xc212e03b9e060e36facad5fd8f4435412ca22e6b", + "type": "CALL", + "value": "0x0" + }, + { + "calls": [ + { + "from": "0x2a98c5f40bfa3dee83431103c535f6fae9a8ad38", + "gas": "0x143a5", + "gasUsed": "0x24d", + "input": "0x13bc6d4b0000000000000000000000003e9286eafa2db8101246c2131c09b49080d00690", + "output": "0x0000000000000000000000000000000000000000000000000000000000000001", + "to": "0x2cccf5e0538493c235d1c5ef6580f77d99e91396", + "type": "CALL", + "value": "0x0" + } + ], + "from": "0x3e9286eafa2db8101246c2131c09b49080d00690", + "gas": "0x1a91d", + "gasUsed": "0x12fa", + "input": "0x0accce0600000000000000000000000000000000000000000000000000000000000000025842545553440000000000000000000000000000000000000000000000000000000000000000000000000000c212e03b9e060e36facad5fd8f4435412ca22e6b00000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000", + "output": "0x", + "to": "0x2a98c5f40bfa3dee83431103c535f6fae9a8ad38", + "type": "CALL", + "value": "0x0" + }, + { + "from": "0x3e9286eafa2db8101246c2131c09b49080d00690", + "gas": "0x19177", + "gasUsed": "0x334", + "input": "0xe16c7d986c6f676d67720000000000000000000000000000000000000000000000000000", + "output": "0x0000000000000000000000002a98c5f40bfa3dee83431103c535f6fae9a8ad38", + "to": "0x2cccf5e0538493c235d1c5ef6580f77d99e91396", + "type": "CALL", + "value": "0x0" + }, + { + "from": "0x3e9286eafa2db8101246c2131c09b49080d00690", + "gas": "0x18a22", + "gasUsed": "0x229", + "input": "0x2e94420f", + "output": "0x5842545553440000000000000000000000000000000000000000000000000000", + "to": "0xc212e03b9e060e36facad5fd8f4435412ca22e6b", + "type": "CALL", + "value": "0x0" + }, + { + "from": "0x3e9286eafa2db8101246c2131c09b49080d00690", + "gas": "0x18341", + "gasUsed": "0x334", + "input": "0xe16c7d986d61726b65746462000000000000000000000000000000000000000000000000", + "output": "0x000000000000000000000000cf00ffd997ad14939736f026006498e3f099baaf", + "to": "0x2cccf5e0538493c235d1c5ef6580f77d99e91396", + "type": "CALL", + "value": "0x0" + }, + { + "from": "0x3e9286eafa2db8101246c2131c09b49080d00690", + "gas": "0x17bec", + "gasUsed": "0x229", + "input": "0x2e94420f", + "output": "0x5842545553440000000000000000000000000000000000000000000000000000", + "to": "0xc212e03b9e060e36facad5fd8f4435412ca22e6b", + "type": "CALL", + "value": "0x0" + }, + { + "from": "0x3e9286eafa2db8101246c2131c09b49080d00690", + "gas": "0x1764e", + "gasUsed": "0x45c", + "input": "0xf92eb7745842545553440000000000000000000000000000000000000000000000000000", + "output": "0x00000000000000000000000000000000000000000000002816d180e30c390000", + "to": "0xcf00ffd997ad14939736f026006498e3f099baaf", + "type": "CALL", + "value": "0x0" + }, + { + "calls": [ + { + "from": "0x2a98c5f40bfa3dee83431103c535f6fae9a8ad38", + "gas": "0x108ba", + "gasUsed": "0x24d", + "input": "0x13bc6d4b0000000000000000000000003e9286eafa2db8101246c2131c09b49080d00690", + "output": "0x0000000000000000000000000000000000000000000000000000000000000001", + "to": "0x2cccf5e0538493c235d1c5ef6580f77d99e91396", + "type": "CALL", + "value": "0x0" + } + ], + "from": "0x3e9286eafa2db8101246c2131c09b49080d00690", + "gas": "0x16e62", + "gasUsed": "0xebb", + "input": "0x645a3b72584254555344000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000002816d180e30c390000", + "output": "0x", + "to": "0x2a98c5f40bfa3dee83431103c535f6fae9a8ad38", + "type": "CALL", + "value": "0x0" + } + ], + "from": "0xb4fe7aa695b326c9d219158d2ca50db77b39f99f", + "gas": "0x283b9", + "gasUsed": "0xc51c", + "input": "0x949ae479000000000000000000000000c212e03b9e060e36facad5fd8f4435412ca22e6b0000000000000000000000000000000000000000000000280faf689c35ac0000", + "output": "0x", + "to": "0x3e9286eafa2db8101246c2131c09b49080d00690", + "type": "CALL", + "value": "0x0" + } + ], + "from": "0xc212e03b9e060e36facad5fd8f4435412ca22e6b", + "gas": "0x30b4a", + "gasUsed": "0xedb7", + "input": "0x51a34eb80000000000000000000000000000000000000000000000280faf689c35ac0000", + "output": "0x", + "to": "0xb4fe7aa695b326c9d219158d2ca50db77b39f99f", + "type": "CALL", + "value": "0x0" + } + ], + "from": "0x70c9217d814985faef62b124420f8dfbddd96433", + "gas": "0x37b38", + "gasUsed": "0x12bb3", + "input": "0x51a34eb80000000000000000000000000000000000000000000000280faf689c35ac0000", + "output": "0x", + "to": "0xc212e03b9e060e36facad5fd8f4435412ca22e6b", + "type": "CALL", + "value": "0x0" + } +} diff --git a/eth/tracers/testdata/call_tracer_legacy/delegatecall.json b/eth/tracers/testdata/call_tracer_legacy/delegatecall.json new file mode 100644 index 000000000000..f7ad6df5f526 --- /dev/null +++ b/eth/tracers/testdata/call_tracer_legacy/delegatecall.json @@ -0,0 +1,97 @@ +{ + "context": { + "difficulty": "31927752", + "gasLimit": "4707788", + "miner": "0x5659922ce141eedbc2733678f9806c77b4eebee8", + "number": "11495", + "timestamp": "1479735917" + }, + "genesis": { + "alloc": { + "0x13204f5d64c28326fd7bd05fd4ea855302d7f2ff": { + "balance": "0x0", + "code": "0x606060405236156100825760e060020a60003504630a0313a981146100875780630a3b0a4f146101095780630cd40fea1461021257806329092d0e1461021f5780634cd06a5f146103295780635dbe47e8146103395780637a9e5410146103d9578063825db5f7146103e6578063a820b44d146103f3578063efa52fb31461047a575b610002565b34610002576104fc600435600060006000507342b02b5deeb78f34cd5ac896473b63e6c99a71a26333556e849091846000604051602001526040518360e060020a028152600401808381526020018281526020019250505060206040518083038186803b156100025760325a03f415610002575050604051519150505b919050565b346100025761051060043560006000507342b02b5deeb78f34cd5ac896473b63e6c99a71a2637d65837a9091336000604051602001526040518360e060020a0281526004018083815260200182600160a060020a031681526020019250505060206040518083038186803b156100025760325a03f4156100025750506040515115905061008257604080517f21ce24d4000000000000000000000000000000000000000000000000000000008152600060048201819052600160a060020a038416602483015291517342b02b5deeb78f34cd5ac896473b63e6c99a71a2926321ce24d49260448082019391829003018186803b156100025760325a03f415610002575050505b50565b3461000257610512600181565b346100025761051060043560006000507342b02b5deeb78f34cd5ac896473b63e6c99a71a2637d65837a9091336000604051602001526040518360e060020a0281526004018083815260200182600160a060020a031681526020019250505060206040518083038186803b156100025760325a03f4156100025750506040515115905061008257604080517f89489a87000000000000000000000000000000000000000000000000000000008152600060048201819052600160a060020a038416602483015291517342b02b5deeb78f34cd5ac896473b63e6c99a71a2926389489a879260448082019391829003018186803b156100025760325a03f4156100025750505061020f565b3461000257610528600435610403565b34610002576104fc600435604080516000602091820181905282517f7d65837a00000000000000000000000000000000000000000000000000000000815260048101829052600160a060020a0385166024820152925190927342b02b5deeb78f34cd5ac896473b63e6c99a71a292637d65837a92604480840193829003018186803b156100025760325a03f4156100025750506040515191506101049050565b3461000257610512600c81565b3461000257610512600081565b3461000257610528600061055660005b600060006000507342b02b5deeb78f34cd5ac896473b63e6c99a71a263685a1f3c9091846000604051602001526040518360e060020a028152600401808381526020018281526020019250505060206040518083038186803b156100025760325a03f4156100025750506040515191506101049050565b346100025761053a600435600060006000507342b02b5deeb78f34cd5ac896473b63e6c99a71a263f775b6b59091846000604051602001526040518360e060020a028152600401808381526020018281526020019250505060206040518083038186803b156100025760325a03f4156100025750506040515191506101049050565b604080519115158252519081900360200190f35b005b6040805160ff9092168252519081900360200190f35b60408051918252519081900360200190f35b60408051600160a060020a039092168252519081900360200190f35b90509056", + "nonce": "1", + "storage": { + "0x4d140b25abf3c71052885c66f73ce07cff141c1afabffdaf5cba04d625b7ebcc": "0x0000000000000000000000000000000000000000000000000000000000000001" + } + }, + "0x269296dddce321a6bcbaa2f0181127593d732cba": { + "balance": "0x0", + "code": "0x606060405236156101275760e060020a60003504630cd40fea811461012c578063173825d9146101395780631849cb5a146101c7578063285791371461030f5780632a58b3301461033f5780632cb0d48a146103565780632f54bf6e1461036a578063332b9f061461039d5780633ca8b002146103c55780633df4ddf4146103d557806341c0e1b5146103f457806347799da81461040557806362a51eee1461042457806366907d13146104575780637065cb48146104825780637a9e541014610496578063825db5f7146104a3578063949d225d146104b0578063a51687df146104c7578063b4da4e37146104e6578063b4e6850b146104ff578063bd7474ca14610541578063e75623d814610541578063e9938e1114610555578063f5d241d314610643575b610002565b3461000257610682600181565b34610002576106986004356106ff335b60006001600a9054906101000a9004600160a060020a0316600160a060020a0316635dbe47e8836000604051602001526040518260e060020a0281526004018082600160a060020a03168152602001915050602060405180830381600087803b156100025760325a03f1156100025750506040515191506103989050565b3461000257604080516101008082018352600080835260208084018290528385018290526060808501839052608080860184905260a080870185905260c080880186905260e09788018690526001605060020a0360043581168752600586529589902089519788018a528054808816808a52605060020a91829004600160a060020a0316978a01889052600183015463ffffffff8082169d8c018e905264010000000082048116988c01899052604060020a90910416958a018690526002830154948a01859052600390920154808916938a01849052049096169690970186905293969495949293604080516001605060020a03998a16815297891660208901529590971686860152600160a060020a03909316606086015263ffffffff9182166080860152811660a08501521660c083015260e08201929092529051908190036101000190f35b346100025761069a60043560018054600091829160ff60f060020a909104161515141561063d5761072833610376565b34610002576106ae6004546001605060020a031681565b34610002576106986004356108b333610149565b346100025761069a6004355b600160a060020a03811660009081526002602052604090205460ff1615156001145b919050565b34610002576106986001805460ff60f060020a9091041615151415610913576108ed33610376565b346100025761069a600435610149565b34610002576106ae6003546001605060020a03605060020a9091041681565b346100025761069861091533610149565b34610002576106ae6003546001605060020a0360a060020a9091041681565b346100025761069a60043560243560018054600091829160ff60f060020a909104161515141561095e5761092633610376565b34610002576106986004356001805460ff60f060020a909104161515141561072557610a8b33610376565b3461000257610698600435610aa533610149565b3461000257610682600c81565b3461000257610682600081565b34610002576106ae6003546001605060020a031681565b34610002576106ca600154600160a060020a03605060020a9091041681565b346100025761069a60015460ff60f060020a9091041681565b346100025761069a60043560243560443560643560843560a43560c43560018054600091829160ff60f060020a9091041615151415610b5857610ad233610376565b3461000257610698600435610bd633610149565b34610002576106e6600435604080516101008181018352600080835260208084018290528385018290526060808501839052608080860184905260a080870185905260c080880186905260e09788018690526001605060020a03808b168752600586529589902089519788018a5280548088168952600160a060020a03605060020a918290041696890196909652600181015463ffffffff8082169b8a019b909b5264010000000081048b1695890195909552604060020a90940490981691860182905260028301549086015260039091015480841696850196909652940416918101919091525b50919050565b346100025761069a60043560243560443560643560843560a43560018054600091829160ff60f060020a9091041615151415610c8e57610bfb33610376565b6040805160ff9092168252519081900360200190f35b005b604080519115158252519081900360200190f35b604080516001605060020a039092168252519081900360200190f35b60408051600160a060020a039092168252519081900360200190f35b6040805163ffffffff9092168252519081900360200190f35b1561012757600160a060020a0381166000908152600260205260409020805460ff191690555b50565b1561063d57506001605060020a0380831660009081526005602052604090208054909116151561075b576000915061063d565b604080516101008101825282546001605060020a038082168352600160a060020a03605060020a92839004166020840152600185015463ffffffff80821695850195909552640100000000810485166060850152604060020a90049093166080830152600284015460a0830152600384015480841660c08401520490911660e0820152610817905b8051600354600090819060016001605060020a0390911611610c995760038054605060020a60f060020a0319169055610ddf565b600380546001605060020a031981166000196001605060020a03928316011782558416600090815260056020526040812080547fffff000000000000000000000000000000000000000000000000000000000000168155600181810180546bffffffffffffffffffffffff191690556002820192909255909101805473ffffffffffffffffffffffffffffffffffffffff19169055915061063d565b1561012757600180547fff00ffffffffffffffffffffffffffffffffffffffffffffffffffffffffffff1660f060020a8302179055610725565b1561091357600480546001605060020a031981166001605060020a039091166001011790555b565b156101275733600160a060020a0316ff5b1561095e57506001605060020a03808416600090815260056020526040902080549091161515610965576000915061095e565b600191505b5092915050565b60038101546001605060020a0384811691161415610986576001915061095e565b604080516101008101825282546001605060020a038082168352600160a060020a03605060020a92839004166020840152600185015463ffffffff80821695850195909552640100000000810485166060850152604060020a90049093166080830152600284015460a0830152600384015480841660c08401520490911660e0820152610a12906107e3565b61095983825b80546003546001605060020a0391821691600091161515610de55760038054605060020a60a060020a031916605060020a84021760a060020a69ffffffffffffffffffff02191660a060020a84021781558301805473ffffffffffffffffffffffffffffffffffffffff19169055610ddf565b1561072557600480546001605060020a0319168217905550565b1561012757600160a060020a0381166000908152600260205260409020805460ff19166001179055610725565b15610b5857506001605060020a038088166000908152600560205260409020805490911615610b645760009150610b58565b6004546001605060020a0390811690891610610b3057600480546001605060020a03191660018a011790555b6003805460016001605060020a03821681016001605060020a03199092169190911790915591505b50979650505050505050565b80546001605060020a0319168817605060020a60f060020a031916605060020a880217815560018101805463ffffffff1916871767ffffffff0000000019166401000000008702176bffffffff00000000000000001916604060020a860217905560028101839055610b048982610a18565b156101275760018054605060020a60f060020a031916605060020a8302179055610725565b15610c8e57506001605060020a03808816600090815260056020526040902080549091161515610c2e5760009150610c8e565b8054605060020a60f060020a031916605060020a88021781556001808201805463ffffffff1916881767ffffffff0000000019166401000000008802176bffffffff00000000000000001916604060020a87021790556002820184905591505b509695505050505050565b6003546001605060020a03848116605060020a909204161415610d095760e084015160038054605060020a928302605060020a60a060020a031990911617808255919091046001605060020a031660009081526005602052604090200180546001605060020a0319169055610ddf565b6003546001605060020a0384811660a060020a909204161415610d825760c08401516003805460a060020a92830260a060020a69ffffffffffffffffffff021990911617808255919091046001605060020a03166000908152600560205260409020018054605060020a60a060020a0319169055610ddf565b505060c082015160e08301516001605060020a0380831660009081526005602052604080822060039081018054605060020a60a060020a031916605060020a8702179055928416825290200180546001605060020a031916831790555b50505050565b6001605060020a0384161515610e6457600380546001605060020a03605060020a9182900481166000908152600560205260409020830180546001605060020a0319908116871790915583548785018054918590049093168402605060020a60a060020a03199182161790911690915582549185029116179055610ddf565b506001605060020a038381166000908152600560205260409020600390810180549185018054605060020a60a060020a0319908116605060020a94859004909516808502959095176001605060020a0319168817909155815416918402919091179055801515610ef4576003805460a060020a69ffffffffffffffffffff02191660a060020a8402179055610ddf565b6003808401546001605060020a03605060020a9091041660009081526005602052604090200180546001605060020a031916831790555050505056", + "nonce": "1", + "storage": { + "0x0000000000000000000000000000000000000000000000000000000000000001": "0x000113204f5d64c28326fd7bd05fd4ea855302d7f2ff00000000000000000000" + } + }, + "0x42b02b5deeb78f34cd5ac896473b63e6c99a71a2": { + "balance": "0x0", + "code": "0x6504032353da7150606060405236156100695760e060020a60003504631bf7509d811461006e57806321ce24d41461008157806333556e84146100ec578063685a1f3c146101035780637d65837a1461011757806389489a8714610140578063f775b6b5146101fc575b610007565b61023460043560006100fd82600061010d565b610246600435602435600160a060020a03811660009081526020839052604081205415156102cb57826001016000508054806001018281815481835581811511610278576000838152602090206102789181019083015b808211156102d057600081556001016100d8565b610248600435602435600182015481105b92915050565b6102346004356024355b60018101906100fd565b610248600435602435600160a060020a03811660009081526020839052604090205415156100fd565b61024660043560243580600160a060020a031632600160a060020a03161415156101f857600160a060020a038116600090815260208390526040902054156101f857600160a060020a038116600090815260208390526040902054600183018054909160001901908110156100075760009182526020808320909101805473ffffffffffffffffffffffffffffffffffffffff19169055600160a060020a038316825283905260408120556002820180546000190190555b5050565b61025c60043560243560008260010160005082815481101561000757600091825260209091200154600160a060020a03169392505050565b60408051918252519081900360200190f35b005b604080519115158252519081900360200190f35b60408051600160a060020a039092168252519081900360200190f35b50505060009283526020808420909201805473ffffffffffffffffffffffffffffffffffffffff191686179055600160a060020a0385168352908590526040909120819055600284018054600101905590505b505050565b509056", + "nonce": "1", + "storage": {} + }, + "0xa529806c67cc6486d4d62024471772f47f6fd672": { + "balance": "0x67820e39ac8fe9800", + "code": "0x", + "nonce": "68", + "storage": {} + } + }, + "config": { + "byzantiumBlock": 1700000, + "chainId": 3, + "daoForkSupport": true, + "eip150Block": 0, + "eip150Hash": "0x41941023680923e0fe4d74a34bdac8141f2540e3ae90623718e47d66d1ca4a2d", + "eip155Block": 10, + "eip158Block": 10, + "ethash": {}, + "homesteadBlock": 0 + }, + "difficulty": "31912170", + "extraData": "0xd783010502846765746887676f312e372e33856c696e7578", + "gasLimit": "4712388", + "hash": "0x0855914bdc581bccdc62591fd438498386ffb59ea4d5361ed5c3702e26e2c72f", + "miner": "0x334391aa808257952a462d1475562ee2106a6c90", + "mixHash": "0x64bb70b8ca883cadb8fbbda2c70a861612407864089ed87b98e5de20acceada6", + "nonce": "0x684129f283aaef18", + "number": "11494", + "stateRoot": "0x7057f31fe3dab1d620771adad35224aae43eb70e94861208bc84c557ff5b9d10", + "timestamp": "1479735912", + "totalDifficulty": "90744064339" + }, + "input": "0xf889448504a817c800832dc6c094269296dddce321a6bcbaa2f0181127593d732cba80a47065cb480000000000000000000000001523e55a1ca4efbae03355775ae89f8d7699ad9e29a080ed81e4c5e9971a730efab4885566e2c868cd80bd4166d0ed8c287fdf181650a069d7c49215e3d4416ad239cd09dbb71b9f04c16b33b385d14f40b618a7a65115", + "result": { + "calls": [ + { + "calls": [ + { + "from": "0x13204f5d64c28326fd7bd05fd4ea855302d7f2ff", + "gas": "0x2bf459", + "gasUsed": "0x2aa", + "input": "0x7d65837a0000000000000000000000000000000000000000000000000000000000000000000000000000000000000000a529806c67cc6486d4d62024471772f47f6fd672", + "output": "0x0000000000000000000000000000000000000000000000000000000000000001", + "to": "0x42b02b5deeb78f34cd5ac896473b63e6c99a71a2", + "type": "DELEGATECALL" + } + ], + "from": "0x269296dddce321a6bcbaa2f0181127593d732cba", + "gas": "0x2cae73", + "gasUsed": "0xa9d", + "input": "0x5dbe47e8000000000000000000000000a529806c67cc6486d4d62024471772f47f6fd672", + "output": "0x0000000000000000000000000000000000000000000000000000000000000001", + "to": "0x13204f5d64c28326fd7bd05fd4ea855302d7f2ff", + "type": "CALL", + "value": "0x0" + } + ], + "from": "0xa529806c67cc6486d4d62024471772f47f6fd672", + "gas": "0x2d6e28", + "gasUsed": "0x64bd", + "input": "0x7065cb480000000000000000000000001523e55a1ca4efbae03355775ae89f8d7699ad9e", + "output": "0x", + "to": "0x269296dddce321a6bcbaa2f0181127593d732cba", + "type": "CALL", + "value": "0x0" + } +} diff --git a/eth/tracers/testdata/call_tracer_legacy/inner_create_oog_outer_throw.json b/eth/tracers/testdata/call_tracer_legacy/inner_create_oog_outer_throw.json new file mode 100644 index 000000000000..72152e27e7f7 --- /dev/null +++ b/eth/tracers/testdata/call_tracer_legacy/inner_create_oog_outer_throw.json @@ -0,0 +1,77 @@ +{ + "context": { + "difficulty": "3451177886", + "gasLimit": "4709286", + "miner": "0x1585936b53834b021f68cc13eeefdec2efc8e724", + "number": "2290744", + "timestamp": "1513616439" + }, + "genesis": { + "alloc": { + "0x1d3ddf7caf024f253487e18bc4a15b1a360c170a": { + "balance": "0x0", + "code": "0x606060405263ffffffff60e060020a6000350416633b91f50681146100505780635bb47808146100715780635f51fca01461008c578063bc7647a9146100ad578063f1bd0d7a146100c8575b610000565b346100005761006f600160a060020a03600435811690602435166100e9565b005b346100005761006f600160a060020a0360043516610152565b005b346100005761006f600160a060020a036004358116906024351661019c565b005b346100005761006f600160a060020a03600435166101fa565b005b346100005761006f600160a060020a0360043581169060243516610db8565b005b600160a060020a038083166000908152602081905260408120549091908116903316811461011657610000565b839150600160a060020a038316151561012d573392505b6101378284610e2e565b6101418284610db8565b61014a826101fa565b5b5b50505050565b600154600160a060020a03908116903316811461016e57610000565b6002805473ffffffffffffffffffffffffffffffffffffffff1916600160a060020a0384161790555b5b5050565b600254600160a060020a0390811690331681146101b857610000565b600160a060020a038381166000908152602081905260409020805473ffffffffffffffffffffffffffffffffffffffff19169184169190911790555b5b505050565b6040805160e260020a631a481fc102815260016024820181905260026044830152606482015262093a8060848201819052600060a4830181905260c06004840152601e60c48401527f736574456e7469747953746174757328616464726573732c75696e743829000060e484015292519091600160a060020a038516916369207f049161010480820192879290919082900301818387803b156100005760325a03f1156100005750506040805160e260020a63379938570281526000602482018190526001604483015260606004830152602360648301527f626567696e506f6c6c28616464726573732c75696e7436342c626f6f6c2c626f60848301527f6f6c29000000000000000000000000000000000000000000000000000000000060a48301529151600160a060020a038716935063de64e15c9260c48084019391929182900301818387803b156100005760325a03f1156100005750506040805160e260020a631a481fc102815260016024820181905260026044830152606482015267ffffffffffffffff8416608482015260ff851660a482015260c06004820152601960c48201527f61646453746f636b28616464726573732c75696e74323536290000000000000060e48201529051600160a060020a03861692506369207f04916101048082019260009290919082900301818387803b156100005760325a03f1156100005750506040805160e260020a631a481fc102815260016024820181905260026044830152606482015267ffffffffffffffff8416608482015260ff851660a482015260c06004820152601960c48201527f697373756553746f636b2875696e74382c75696e74323536290000000000000060e48201529051600160a060020a03861692506369207f04916101048082019260009290919082900301818387803b156100005760325a03f1156100005750506040805160e260020a63379938570281526002602482015260006044820181905260606004830152602160648301527f6772616e7453746f636b2875696e74382c75696e743235362c61646472657373608483015260f860020a60290260a48301529151600160a060020a038716935063de64e15c9260c48084019391929182900301818387803b156100005760325a03f115610000575050604080517f010555b8000000000000000000000000000000000000000000000000000000008152600160a060020a03338116602483015260006044830181905260606004840152603c60648401527f6772616e7456657374656453746f636b2875696e74382c75696e743235362c6160848401527f6464726573732c75696e7436342c75696e7436342c75696e743634290000000060a48401529251908716935063010555b89260c48084019391929182900301818387803b156100005760325a03f1156100005750506040805160e260020a631a481fc102815260016024820181905260026044830152606482015267ffffffffffffffff8416608482015260ff851660a482015260c06004820152601260c48201527f626567696e53616c65286164647265737329000000000000000000000000000060e48201529051600160a060020a03861692506369207f04916101048082019260009290919082900301818387803b156100005760325a03f1156100005750506040805160e260020a63379938570281526002602482015260006044820181905260606004830152601a60648301527f7472616e7366657253616c6546756e64732875696e743235362900000000000060848301529151600160a060020a038716935063de64e15c9260a48084019391929182900301818387803b156100005760325a03f1156100005750506040805160e260020a631a481fc102815260016024820181905260026044830152606482015267ffffffffffffffff8416608482015260ff851660a482015260c06004820152602d60c48201527f7365744163636f756e74696e6753657474696e67732875696e743235362c756960e48201527f6e7436342c75696e7432353629000000000000000000000000000000000000006101048201529051600160a060020a03861692506369207f04916101248082019260009290919082900301818387803b156100005760325a03f1156100005750506040805160e260020a63379938570281526002602482015260006044820181905260606004830152603460648301527f637265617465526563757272696e6752657761726428616464726573732c756960848301527f6e743235362c75696e7436342c737472696e672900000000000000000000000060a48301529151600160a060020a038716935063de64e15c9260c48084019391929182900301818387803b156100005760325a03f1156100005750506040805160e260020a63379938570281526002602482015260006044820181905260606004830152601b60648301527f72656d6f7665526563757272696e675265776172642875696e7429000000000060848301529151600160a060020a038716935063de64e15c9260a48084019391929182900301818387803b156100005760325a03f1156100005750506040805160e260020a63379938570281526002602482015260006044820181905260606004830152602360648301527f697373756552657761726428616464726573732c75696e743235362c7374726960848301527f6e6729000000000000000000000000000000000000000000000000000000000060a48301529151600160a060020a038716935063de64e15c9260c48084019391929182900301818387803b156100005760325a03f1156100005750506040805160e260020a6337993857028152600160248201819052604482015260606004820152602260648201527f61737369676e53746f636b2875696e74382c616464726573732c75696e743235608482015260f060020a6136290260a48201529051600160a060020a038616925063de64e15c9160c48082019260009290919082900301818387803b156100005760325a03f1156100005750506040805160e260020a6337993857028152600160248201819052604482015260606004820152602260648201527f72656d6f766553746f636b2875696e74382c616464726573732c75696e743235608482015260f060020a6136290260a48201529051600160a060020a038616925063de64e15c9160c48082019260009290919082900301818387803b156100005760325a03f1156100005750506040805160e260020a631a481fc102815260026024808301919091526003604483015260006064830181905267ffffffffffffffff8616608484015260ff871660a484015260c0600484015260c48301919091527f7365744164647265737342796c617728737472696e672c616464726573732c6260e48301527f6f6f6c29000000000000000000000000000000000000000000000000000000006101048301529151600160a060020a03871693506369207f04926101248084019391929182900301818387803b156100005760325a03f1156100005750506040805160e260020a631a481fc1028152600260248201526003604482015260006064820181905267ffffffffffffffff8516608483015260ff861660a483015260c06004830152602160c48301527f73657453746174757342796c617728737472696e672c75696e74382c626f6f6c60e483015260f860020a6029026101048301529151600160a060020a03871693506369207f04926101248084019391929182900301818387803b156100005760325a03f1156100005750506040805160e260020a631a481fc1028152600260248201526003604482015260006064820181905267ffffffffffffffff8516608483015260ff861660a483015260c06004830152603860c48301527f736574566f74696e6742796c617728737472696e672c75696e743235362c756960e48301527f6e743235362c626f6f6c2c75696e7436342c75696e74382900000000000000006101048301529151600160a060020a03871693506369207f04926101248084019391929182900301818387803b156100005760325a03f115610000575050505b505050565b604080517f225553a4000000000000000000000000000000000000000000000000000000008152600160a060020a0383811660048301526002602483015291519184169163225553a49160448082019260009290919082900301818387803b156100005760325a03f115610000575050505b5050565b600082604051611fd280610f488339600160a060020a03909216910190815260405190819003602001906000f0801561000057905082600160a060020a03166308b027418260016040518363ffffffff1660e060020a0281526004018083600160a060020a0316600160a060020a0316815260200182815260200192505050600060405180830381600087803b156100005760325a03f115610000575050604080517fa14e3ee300000000000000000000000000000000000000000000000000000000815260006004820181905260016024830152600160a060020a0386811660448401529251928716935063a14e3ee39260648084019382900301818387803b156100005760325a03f115610000575050505b5050505600606060405234620000005760405160208062001fd283398101604052515b805b600a8054600160a060020a031916600160a060020a0383161790555b506001600d819055600e81905560408051808201909152600c8082527f566f74696e672053746f636b00000000000000000000000000000000000000006020928301908152600b805460008290528251601860ff1990911617825590947f0175b7a638427703f0dbe7bb9bbf987a2551717b34e79f33b5b1008d1fa01db9600291831615610100026000190190921604601f0193909304830192906200010c565b828001600101855582156200010c579182015b828111156200010c578251825591602001919060010190620000ef565b5b50620001309291505b808211156200012c576000815560010162000116565b5090565b50506040805180820190915260038082527f43565300000000000000000000000000000000000000000000000000000000006020928301908152600c805460008290528251600660ff1990911617825590937fdf6966c971051c3d54ec59162606531493a51404a002842f56009d7e5cf4a8c760026001841615610100026000190190931692909204601f010481019291620001f7565b82800160010185558215620001f7579182015b82811115620001f7578251825591602001919060010190620001da565b5b506200021b9291505b808211156200012c576000815560010162000116565b5090565b50505b505b611da280620002306000396000f3006060604052361561019a5763ffffffff60e060020a600035041662e1986d811461019f57806302a72a4c146101d657806306eb4e421461020157806306fdde0314610220578063095ea7b3146102ad578063158ccb99146102dd57806318160ddd146102f85780631cf65a781461031757806323b872dd146103365780632c71e60a1461036c57806333148fd6146103ca578063435ebc2c146103f55780635eeb6e451461041e578063600e85b71461043c5780636103d70b146104a157806362c1e46a146104b05780636c182e99146104ba578063706dc87c146104f057806370a082311461052557806377174f851461055057806395d89b411461056f578063a7771ee3146105fc578063a9059cbb14610629578063ab377daa14610659578063b25dbb5e14610685578063b89a73cb14610699578063ca5eb5e1146106c6578063cbcf2e5a146106e1578063d21f05ba1461070e578063d347c2051461072d578063d96831e114610765578063dd62ed3e14610777578063df3c211b146107a8578063e2982c21146107d6578063eb944e4c14610801575b610000565b34610000576101d4600160a060020a036004351660243567ffffffffffffffff6044358116906064358116906084351661081f565b005b34610000576101ef600160a060020a0360043516610a30565b60408051918252519081900360200190f35b34610000576101ef610a4f565b60408051918252519081900360200190f35b346100005761022d610a55565b604080516020808252835181830152835191928392908301918501908083838215610273575b80518252602083111561027357601f199092019160209182019101610253565b505050905090810190601f16801561029f5780820380516001836020036101000a031916815260200191505b509250505060405180910390f35b34610000576102c9600160a060020a0360043516602435610ae3565b604080519115158252519081900360200190f35b34610000576101d4600160a060020a0360043516610b4e565b005b34610000576101ef610b89565b60408051918252519081900360200190f35b34610000576101ef610b8f565b60408051918252519081900360200190f35b34610000576102c9600160a060020a0360043581169060243516604435610b95565b604080519115158252519081900360200190f35b3461000057610388600160a060020a0360043516602435610bb7565b60408051600160a060020a039096168652602086019490945267ffffffffffffffff928316858501529082166060850152166080830152519081900360a00190f35b34610000576101ef600160a060020a0360043516610c21565b60408051918252519081900360200190f35b3461000057610402610c40565b60408051600160a060020a039092168252519081900360200190f35b34610000576101d4600160a060020a0360043516602435610c4f565b005b3461000057610458600160a060020a0360043516602435610cc9565b60408051600160a060020a03909716875260208701959095528585019390935267ffffffffffffffff9182166060860152811660808501521660a0830152519081900360c00190f35b34610000576101d4610d9e565b005b6101d4610e1e565b005b34610000576104d3600160a060020a0360043516610e21565b6040805167ffffffffffffffff9092168252519081900360200190f35b3461000057610402600160a060020a0360043516610ead565b60408051600160a060020a039092168252519081900360200190f35b34610000576101ef600160a060020a0360043516610ef9565b60408051918252519081900360200190f35b34610000576101ef610f18565b60408051918252519081900360200190f35b346100005761022d610f1e565b604080516020808252835181830152835191928392908301918501908083838215610273575b80518252602083111561027357601f199092019160209182019101610253565b505050905090810190601f16801561029f5780820380516001836020036101000a031916815260200191505b509250505060405180910390f35b34610000576102c9600160a060020a0360043516610fac565b604080519115158252519081900360200190f35b34610000576102c9600160a060020a0360043516602435610fc2565b604080519115158252519081900360200190f35b3461000057610402600435610fe2565b60408051600160a060020a039092168252519081900360200190f35b34610000576101d46004351515610ffd565b005b34610000576102c9600160a060020a036004351661104c565b604080519115158252519081900360200190f35b34610000576101d4600160a060020a0360043516611062565b005b34610000576102c9600160a060020a0360043516611070565b604080519115158252519081900360200190f35b34610000576101ef6110f4565b60408051918252519081900360200190f35b34610000576101ef600160a060020a036004351667ffffffffffffffff602435166110fa565b60408051918252519081900360200190f35b34610000576101d4600435611121565b005b34610000576101ef600160a060020a03600435811690602435166111c6565b60408051918252519081900360200190f35b34610000576101ef6004356024356044356064356084356111f3565b60408051918252519081900360200190f35b34610000576101ef600160a060020a036004351661128c565b60408051918252519081900360200190f35b34610000576101d4600160a060020a036004351660243561129e565b005b6040805160a08101825260008082526020820181905291810182905260608101829052608081019190915267ffffffffffffffff848116908416101561086457610000565b8367ffffffffffffffff168267ffffffffffffffff16101561088557610000565b8267ffffffffffffffff168267ffffffffffffffff1610156108a657610000565b506040805160a081018252600160a060020a033381168252602080830188905267ffffffffffffffff80871684860152858116606085015287166080840152908816600090815260039091529190912080546001810180835582818380158290116109615760030281600302836000526020600020918201910161096191905b8082111561095d578054600160a060020a031916815560006001820155600281018054600160c060020a0319169055600301610926565b5090565b5b505050916000526020600020906003020160005b5082518154600160a060020a031916600160a060020a03909116178155602083015160018201556040830151600290910180546060850151608086015167ffffffffffffffff1990921667ffffffffffffffff948516176fffffffffffffffff00000000000000001916604060020a918516919091021777ffffffffffffffff000000000000000000000000000000001916608060020a939091169290920291909117905550610a268686610fc2565b505b505050505050565b600160a060020a0381166000908152600360205260409020545b919050565b60055481565b600b805460408051602060026001851615610100026000190190941693909304601f81018490048402820184019092528181529291830182828015610adb5780601f10610ab057610100808354040283529160200191610adb565b820191906000526020600020905b815481529060010190602001808311610abe57829003601f168201915b505050505081565b600160a060020a03338116600081815260026020908152604080832094871680845294825280832086905580518681529051929493927f8c5be1e5ebec7d5bd14f71427d1e84f3dd0314c0f7b2291e5b200ac8c7c3b925929181900390910190a35060015b92915050565b600a5433600160a060020a03908116911614610b6957610000565b600a8054600160a060020a031916600160a060020a0383161790555b5b50565b60005481565b60005b90565b6000610ba2848484611600565b610bad8484846116e2565b90505b9392505050565b600360205281600052604060002081815481101561000057906000526020600020906003020160005b5080546001820154600290920154600160a060020a03909116935090915067ffffffffffffffff80821691604060020a8104821691608060020a9091041685565b600160a060020a0381166000908152600860205260409020545b919050565b600a54600160a060020a031681565b600a5433600160a060020a03908116911614610c6a57610000565b610c7660005482611714565b6000908155600160a060020a038316815260016020526040902054610c9b9082611714565b600160a060020a038316600090815260016020526040812091909155610cc390839083611600565b5b5b5050565b6000600060006000600060006000600360008a600160a060020a0316600160a060020a0316815260200190815260200160002088815481101561000057906000526020600020906003020160005b508054600182015460028301546040805160a081018252600160a060020a039094168085526020850184905267ffffffffffffffff808416928601839052604060020a8404811660608701819052608060020a9094041660808601819052909c50929a509197509095509350909150610d90904261172d565b94505b509295509295509295565b33600160a060020a038116600090815260066020526040902054801515610dc457610000565b8030600160a060020a0316311015610ddb57610000565b600160a060020a0382166000818152600660205260408082208290555183156108fc0291849190818181858888f193505050501515610cc357610000565b5b5050565b5b565b600160a060020a03811660009081526003602052604081205442915b81811015610ea557600160a060020a03841660009081526003602052604090208054610e9a9190839081101561000057906000526020600020906003020160005b5060020154604060020a900467ffffffffffffffff168461177d565b92505b600101610e3d565b5b5050919050565b600160a060020a0380821660009081526007602052604081205490911615610eef57600160a060020a0380831660009081526007602052604090205416610ef1565b815b90505b919050565b600160a060020a0381166000908152600160205260409020545b919050565b600d5481565b600c805460408051602060026001851615610100026000190190941693909304601f81018490048402820184019092528181529291830182828015610adb5780601f10610ab057610100808354040283529160200191610adb565b820191906000526020600020905b815481529060010190602001808311610abe57829003601f168201915b505050505081565b60006000610fb983610c21565b1190505b919050565b6000610fcf338484611600565b610fd983836117ac565b90505b92915050565b600460205260009081526040902054600160a060020a031681565b8015801561101a575061100f33610ef9565b61101833610c21565b115b1561102457610000565b33600160a060020a03166000908152600960205260409020805460ff19168215151790555b50565b60006000610fb983610ef9565b1190505b919050565b610b8533826117dc565b5b50565b600a54604080516000602091820181905282517fcbcf2e5a000000000000000000000000000000000000000000000000000000008152600160a060020a03868116600483015293519194939093169263cbcf2e5a92602480830193919282900301818787803b156100005760325a03f115610000575050604051519150505b919050565b600e5481565b6000610fd961110984846118b2565b61111385856119b6565b611a05565b90505b92915050565b600a5433600160a060020a0390811691161461113c57610000565b61114860005482611a1f565b600055600554600190101561116c57600a5461116c90600160a060020a0316611a47565b5b600a54600160a060020a03166000908152600160205260409020546111929082611a1f565b600a8054600160a060020a039081166000908152600160205260408120939093559054610b8592911683611600565b5b5b50565b600160a060020a038083166000908152600260209081526040808320938516835292905220545b92915050565b6000600060008487101561120a5760009250611281565b8387111561121a57879250611281565b61123f6112308961122b888a611714565b611a90565b61123a8689611714565b611abc565b915081925061124e8883611714565b905061127e8361127961126a8461122b8c8b611714565b611a90565b61123a888b611714565b611abc565b611a1f565b92505b505095945050505050565b60066020526000908152604090205481565b600160a060020a03821660009081526003602052604081208054829190849081101561000057906000526020600020906003020160005b50805490925033600160a060020a039081169116146112f357610000565b6040805160a0810182528354600160a060020a0316815260018401546020820152600284015467ffffffffffffffff80821693830193909352604060020a810483166060830152608060020a900490911660808201526113539042611af9565b600160a060020a0385166000908152600360205260409020805491925090849081101561000057906000526020600020906003020160005b508054600160a060020a031916815560006001820181905560029091018054600160c060020a0319169055600160a060020a0385168152600360205260409020805460001981019081101561000057906000526020600020906003020160005b50600160a060020a03851660009081526003602052604090208054859081101561000057906000526020600020906003020160005b5081548154600160a060020a031916600160a060020a03918216178255600180840154908301556002928301805493909201805467ffffffffffffffff191667ffffffffffffffff948516178082558354604060020a908190048616026fffffffffffffffff000000000000000019909116178082559254608060020a9081900490941690930277ffffffffffffffff00000000000000000000000000000000199092169190911790915584166000908152600360205260409020805460001981018083559190829080158290116115485760030281600302836000526020600020918201910161154891905b8082111561095d578054600160a060020a031916815560006001820155600281018054600160c060020a0319169055600301610926565b5090565b5b505050600160a060020a033316600090815260016020526040902054611570915082611a1f565b600160a060020a03338116600090815260016020526040808220939093559086168152205461159f9082611714565b600160a060020a038086166000818152600160209081526040918290209490945580518581529051339093169391927fddf252ad1be2c89b69c2b068fc378daa952ba7f163c4a11628f55a4df523b3ef929181900390910190a35b50505050565b600160a060020a0383161561166e576116466008600061161f86610ead565b600160a060020a0316600160a060020a031681526020019081526020016000205482611714565b6008600061165386610ead565b600160a060020a031681526020810191909152604001600020555b600160a060020a038216156116dc576116b46008600061168d85610ead565b600160a060020a0316600160a060020a031681526020019081526020016000205482611a1f565b600860006116c185610ead565b600160a060020a031681526020810191909152604001600020555b5b505050565b600083826116f082426110fa565b8111156116fc57610000565b611707868686611b1b565b92505b5b50509392505050565b600061172283831115611b4d565b508082035b92915050565b6000610fd983602001518367ffffffffffffffff16856080015167ffffffffffffffff16866040015167ffffffffffffffff16876060015167ffffffffffffffff166111f3565b90505b92915050565b60008167ffffffffffffffff168367ffffffffffffffff1610156117a15781610fd9565b825b90505b92915050565b600033826117ba82426110fa565b8111156117c657610000565b6117d08585611b5d565b92505b5b505092915050565b6117e582610ef9565b6117ee83610c21565b11156117f957610000565b600160a060020a03811660009081526009602052604090205460ff16158015611834575081600160a060020a031681600160a060020a031614155b1561183e57610000565b61184782611070565b1561185157610000565b611864828261185f85610ef9565b611600565b600160a060020a0382811660009081526007602052604090208054600160a060020a031916918316918217905561189a82610ead565b600160a060020a031614610cc357610000565b5b5050565b600160a060020a038216600090815260036020526040812054815b818110156119885761197d836112796003600089600160a060020a0316600160a060020a0316815260200190815260200160002084815481101561000057906000526020600020906003020160005b506040805160a0810182528254600160a060020a031681526001830154602082015260029092015467ffffffffffffffff80821692840192909252604060020a810482166060840152608060020a900416608082015287611af9565b611a1f565b92505b6001016118cd565b600160a060020a0385166000908152600160205260409020546117d09084611714565b92505b505092915050565b600060006119c384611070565b80156119d157506000600d54115b90506119fb816119e9576119e485610ef9565b6119ec565b60005b6111138686611b7b565b611a05565b91505b5092915050565b60008183106117a15781610fd9565b825b90505b92915050565b6000828201611a3c848210801590611a375750838210155b611b4d565b8091505b5092915050565b611a508161104c565b15611a5a57610b85565b6005805460009081526004602052604090208054600160a060020a031916600160a060020a038416179055805460010190555b50565b6000828202611a3c841580611a37575083858381156100005704145b611b4d565b8091505b5092915050565b60006000611acc60008411611b4d565b8284811561000057049050611a3c838581156100005706828502018514611b4d565b8091505b5092915050565b6000610fd98360200151611b0d858561172d565b611714565b90505b92915050565b60008382611b2982426110fa565b811115611b3557610000565b611707868686611b8f565b92505b5b50509392505050565b801515610b8557610000565b5b50565b6000611b6883611a47565b610fd98383611c92565b90505b92915050565b6000610fd983610ef9565b90505b92915050565b600160a060020a038084166000908152600260209081526040808320338516845282528083205493861683526001909152812054909190611bd09084611a1f565b600160a060020a038086166000908152600160205260408082209390935590871681522054611bff9084611714565b600160a060020a038616600090815260016020526040902055611c228184611714565b600160a060020a038087166000818152600260209081526040808320338616845282529182902094909455805187815290519288169391927fddf252ad1be2c89b69c2b068fc378daa952ba7f163c4a11628f55a4df523b3ef929181900390910190a3600191505b509392505050565b60003382611ca082426110fa565b811115611cac57610000565b6117d08585611cc2565b92505b5b505092915050565b600160a060020a033316600090815260016020526040812054611ce59083611714565b600160a060020a033381166000908152600160205260408082209390935590851681522054611d149083611a1f565b600160a060020a038085166000818152600160209081526040918290209490945580518681529051919333909316927fddf252ad1be2c89b69c2b068fc378daa952ba7f163c4a11628f55a4df523b3ef92918290030190a35060015b929150505600a165627a7a72305820bfa5ddd3fecf3f43aed25385ec7ec3ef79638c2e58d99f85d9a3cc494183bf160029a165627a7a723058200e78a5f7e0f91739035d0fbf5eca02f79377210b722f63431f29a22e2880b3bd0029", + "nonce": "789", + "storage": { + "0xfe9ec0542a1c009be8b1f3acf43af97100ffff42eb736850fb038fa1151ad4d9": "0x000000000000000000000000e4a13bc304682a903e9472f469c33801dd18d9e8" + } + }, + "0x5cb4a6b902fcb21588c86c3517e797b07cdaadb9": { + "balance": "0x0", + "code": "0x", + "nonce": "0", + "storage": {} + }, + "0xe4a13bc304682a903e9472f469c33801dd18d9e8": { + "balance": "0x33c763c929f62c4f", + "code": "0x", + "nonce": "14", + "storage": {} + } + }, + "config": { + "byzantiumBlock": 1700000, + "chainId": 3, + "daoForkSupport": true, + "eip150Block": 0, + "eip150Hash": "0x41941023680923e0fe4d74a34bdac8141f2540e3ae90623718e47d66d1ca4a2d", + "eip155Block": 10, + "eip158Block": 10, + "ethash": {}, + "homesteadBlock": 0 + }, + "difficulty": "3451177886", + "extraData": "0x4554482e45544846414e532e4f52472d4641313738394444", + "gasLimit": "4713874", + "hash": "0x5d52a672417cd1269bf4f7095e25dcbf837747bba908cd5ef809dc1bd06144b5", + "miner": "0xbbf5029fd710d227630c8b7d338051b8e76d50b3", + "mixHash": "0x01a12845ed546b94a038a7a03e8df8d7952024ed41ccb3db7a7ade4abc290ce1", + "nonce": "0x28c446f1cb9748c1", + "number": "2290743", + "stateRoot": "0x4898aceede76739daef76448a367d10015a2c022c9e7909b99a10fbf6fb16708", + "timestamp": "1513616414", + "totalDifficulty": "7146523769022564" + }, + "input": "0xf8aa0e8509502f9000830493e0941d3ddf7caf024f253487e18bc4a15b1a360c170a80b8443b91f506000000000000000000000000a14bdd7e5666d784dcce98ad24d383a6b1cd4182000000000000000000000000e4a13bc304682a903e9472f469c33801dd18d9e829a0524564944fa419f5c189b5074044f89210c6d6b2d77ee8f7f12a927d59b636dfa0015b28986807a424b18b186ee6642d76739df36cad802d20e8c00e79a61d7281", + "result": { + "calls": [ + { + "error": "internal failure", + "from": "0x1d3ddf7caf024f253487e18bc4a15b1a360c170a", + "gas": "0x39ff0", + "gasUsed": "0x39ff0", + "input": "0x606060405234620000005760405160208062001fd283398101604052515b805b600a8054600160a060020a031916600160a060020a0383161790555b506001600d819055600e81905560408051808201909152600c8082527f566f74696e672053746f636b00000000000000000000000000000000000000006020928301908152600b805460008290528251601860ff1990911617825590947f0175b7a638427703f0dbe7bb9bbf987a2551717b34e79f33b5b1008d1fa01db9600291831615610100026000190190921604601f0193909304830192906200010c565b828001600101855582156200010c579182015b828111156200010c578251825591602001919060010190620000ef565b5b50620001309291505b808211156200012c576000815560010162000116565b5090565b50506040805180820190915260038082527f43565300000000000000000000000000000000000000000000000000000000006020928301908152600c805460008290528251600660ff1990911617825590937fdf6966c971051c3d54ec59162606531493a51404a002842f56009d7e5cf4a8c760026001841615610100026000190190931692909204601f010481019291620001f7565b82800160010185558215620001f7579182015b82811115620001f7578251825591602001919060010190620001da565b5b506200021b9291505b808211156200012c576000815560010162000116565b5090565b50505b505b611da280620002306000396000f3006060604052361561019a5763ffffffff60e060020a600035041662e1986d811461019f57806302a72a4c146101d657806306eb4e421461020157806306fdde0314610220578063095ea7b3146102ad578063158ccb99146102dd57806318160ddd146102f85780631cf65a781461031757806323b872dd146103365780632c71e60a1461036c57806333148fd6146103ca578063435ebc2c146103f55780635eeb6e451461041e578063600e85b71461043c5780636103d70b146104a157806362c1e46a146104b05780636c182e99146104ba578063706dc87c146104f057806370a082311461052557806377174f851461055057806395d89b411461056f578063a7771ee3146105fc578063a9059cbb14610629578063ab377daa14610659578063b25dbb5e14610685578063b89a73cb14610699578063ca5eb5e1146106c6578063cbcf2e5a146106e1578063d21f05ba1461070e578063d347c2051461072d578063d96831e114610765578063dd62ed3e14610777578063df3c211b146107a8578063e2982c21146107d6578063eb944e4c14610801575b610000565b34610000576101d4600160a060020a036004351660243567ffffffffffffffff6044358116906064358116906084351661081f565b005b34610000576101ef600160a060020a0360043516610a30565b60408051918252519081900360200190f35b34610000576101ef610a4f565b60408051918252519081900360200190f35b346100005761022d610a55565b604080516020808252835181830152835191928392908301918501908083838215610273575b80518252602083111561027357601f199092019160209182019101610253565b505050905090810190601f16801561029f5780820380516001836020036101000a031916815260200191505b509250505060405180910390f35b34610000576102c9600160a060020a0360043516602435610ae3565b604080519115158252519081900360200190f35b34610000576101d4600160a060020a0360043516610b4e565b005b34610000576101ef610b89565b60408051918252519081900360200190f35b34610000576101ef610b8f565b60408051918252519081900360200190f35b34610000576102c9600160a060020a0360043581169060243516604435610b95565b604080519115158252519081900360200190f35b3461000057610388600160a060020a0360043516602435610bb7565b60408051600160a060020a039096168652602086019490945267ffffffffffffffff928316858501529082166060850152166080830152519081900360a00190f35b34610000576101ef600160a060020a0360043516610c21565b60408051918252519081900360200190f35b3461000057610402610c40565b60408051600160a060020a039092168252519081900360200190f35b34610000576101d4600160a060020a0360043516602435610c4f565b005b3461000057610458600160a060020a0360043516602435610cc9565b60408051600160a060020a03909716875260208701959095528585019390935267ffffffffffffffff9182166060860152811660808501521660a0830152519081900360c00190f35b34610000576101d4610d9e565b005b6101d4610e1e565b005b34610000576104d3600160a060020a0360043516610e21565b6040805167ffffffffffffffff9092168252519081900360200190f35b3461000057610402600160a060020a0360043516610ead565b60408051600160a060020a039092168252519081900360200190f35b34610000576101ef600160a060020a0360043516610ef9565b60408051918252519081900360200190f35b34610000576101ef610f18565b60408051918252519081900360200190f35b346100005761022d610f1e565b604080516020808252835181830152835191928392908301918501908083838215610273575b80518252602083111561027357601f199092019160209182019101610253565b505050905090810190601f16801561029f5780820380516001836020036101000a031916815260200191505b509250505060405180910390f35b34610000576102c9600160a060020a0360043516610fac565b604080519115158252519081900360200190f35b34610000576102c9600160a060020a0360043516602435610fc2565b604080519115158252519081900360200190f35b3461000057610402600435610fe2565b60408051600160a060020a039092168252519081900360200190f35b34610000576101d46004351515610ffd565b005b34610000576102c9600160a060020a036004351661104c565b604080519115158252519081900360200190f35b34610000576101d4600160a060020a0360043516611062565b005b34610000576102c9600160a060020a0360043516611070565b604080519115158252519081900360200190f35b34610000576101ef6110f4565b60408051918252519081900360200190f35b34610000576101ef600160a060020a036004351667ffffffffffffffff602435166110fa565b60408051918252519081900360200190f35b34610000576101d4600435611121565b005b34610000576101ef600160a060020a03600435811690602435166111c6565b60408051918252519081900360200190f35b34610000576101ef6004356024356044356064356084356111f3565b60408051918252519081900360200190f35b34610000576101ef600160a060020a036004351661128c565b60408051918252519081900360200190f35b34610000576101d4600160a060020a036004351660243561129e565b005b6040805160a08101825260008082526020820181905291810182905260608101829052608081019190915267ffffffffffffffff848116908416101561086457610000565b8367ffffffffffffffff168267ffffffffffffffff16101561088557610000565b8267ffffffffffffffff168267ffffffffffffffff1610156108a657610000565b506040805160a081018252600160a060020a033381168252602080830188905267ffffffffffffffff80871684860152858116606085015287166080840152908816600090815260039091529190912080546001810180835582818380158290116109615760030281600302836000526020600020918201910161096191905b8082111561095d578054600160a060020a031916815560006001820155600281018054600160c060020a0319169055600301610926565b5090565b5b505050916000526020600020906003020160005b5082518154600160a060020a031916600160a060020a03909116178155602083015160018201556040830151600290910180546060850151608086015167ffffffffffffffff1990921667ffffffffffffffff948516176fffffffffffffffff00000000000000001916604060020a918516919091021777ffffffffffffffff000000000000000000000000000000001916608060020a939091169290920291909117905550610a268686610fc2565b505b505050505050565b600160a060020a0381166000908152600360205260409020545b919050565b60055481565b600b805460408051602060026001851615610100026000190190941693909304601f81018490048402820184019092528181529291830182828015610adb5780601f10610ab057610100808354040283529160200191610adb565b820191906000526020600020905b815481529060010190602001808311610abe57829003601f168201915b505050505081565b600160a060020a03338116600081815260026020908152604080832094871680845294825280832086905580518681529051929493927f8c5be1e5ebec7d5bd14f71427d1e84f3dd0314c0f7b2291e5b200ac8c7c3b925929181900390910190a35060015b92915050565b600a5433600160a060020a03908116911614610b6957610000565b600a8054600160a060020a031916600160a060020a0383161790555b5b50565b60005481565b60005b90565b6000610ba2848484611600565b610bad8484846116e2565b90505b9392505050565b600360205281600052604060002081815481101561000057906000526020600020906003020160005b5080546001820154600290920154600160a060020a03909116935090915067ffffffffffffffff80821691604060020a8104821691608060020a9091041685565b600160a060020a0381166000908152600860205260409020545b919050565b600a54600160a060020a031681565b600a5433600160a060020a03908116911614610c6a57610000565b610c7660005482611714565b6000908155600160a060020a038316815260016020526040902054610c9b9082611714565b600160a060020a038316600090815260016020526040812091909155610cc390839083611600565b5b5b5050565b6000600060006000600060006000600360008a600160a060020a0316600160a060020a0316815260200190815260200160002088815481101561000057906000526020600020906003020160005b508054600182015460028301546040805160a081018252600160a060020a039094168085526020850184905267ffffffffffffffff808416928601839052604060020a8404811660608701819052608060020a9094041660808601819052909c50929a509197509095509350909150610d90904261172d565b94505b509295509295509295565b33600160a060020a038116600090815260066020526040902054801515610dc457610000565b8030600160a060020a0316311015610ddb57610000565b600160a060020a0382166000818152600660205260408082208290555183156108fc0291849190818181858888f193505050501515610cc357610000565b5b5050565b5b565b600160a060020a03811660009081526003602052604081205442915b81811015610ea557600160a060020a03841660009081526003602052604090208054610e9a9190839081101561000057906000526020600020906003020160005b5060020154604060020a900467ffffffffffffffff168461177d565b92505b600101610e3d565b5b5050919050565b600160a060020a0380821660009081526007602052604081205490911615610eef57600160a060020a0380831660009081526007602052604090205416610ef1565b815b90505b919050565b600160a060020a0381166000908152600160205260409020545b919050565b600d5481565b600c805460408051602060026001851615610100026000190190941693909304601f81018490048402820184019092528181529291830182828015610adb5780601f10610ab057610100808354040283529160200191610adb565b820191906000526020600020905b815481529060010190602001808311610abe57829003601f168201915b505050505081565b60006000610fb983610c21565b1190505b919050565b6000610fcf338484611600565b610fd983836117ac565b90505b92915050565b600460205260009081526040902054600160a060020a031681565b8015801561101a575061100f33610ef9565b61101833610c21565b115b1561102457610000565b33600160a060020a03166000908152600960205260409020805460ff19168215151790555b50565b60006000610fb983610ef9565b1190505b919050565b610b8533826117dc565b5b50565b600a54604080516000602091820181905282517fcbcf2e5a000000000000000000000000000000000000000000000000000000008152600160a060020a03868116600483015293519194939093169263cbcf2e5a92602480830193919282900301818787803b156100005760325a03f115610000575050604051519150505b919050565b600e5481565b6000610fd961110984846118b2565b61111385856119b6565b611a05565b90505b92915050565b600a5433600160a060020a0390811691161461113c57610000565b61114860005482611a1f565b600055600554600190101561116c57600a5461116c90600160a060020a0316611a47565b5b600a54600160a060020a03166000908152600160205260409020546111929082611a1f565b600a8054600160a060020a039081166000908152600160205260408120939093559054610b8592911683611600565b5b5b50565b600160a060020a038083166000908152600260209081526040808320938516835292905220545b92915050565b6000600060008487101561120a5760009250611281565b8387111561121a57879250611281565b61123f6112308961122b888a611714565b611a90565b61123a8689611714565b611abc565b915081925061124e8883611714565b905061127e8361127961126a8461122b8c8b611714565b611a90565b61123a888b611714565b611abc565b611a1f565b92505b505095945050505050565b60066020526000908152604090205481565b600160a060020a03821660009081526003602052604081208054829190849081101561000057906000526020600020906003020160005b50805490925033600160a060020a039081169116146112f357610000565b6040805160a0810182528354600160a060020a0316815260018401546020820152600284015467ffffffffffffffff80821693830193909352604060020a810483166060830152608060020a900490911660808201526113539042611af9565b600160a060020a0385166000908152600360205260409020805491925090849081101561000057906000526020600020906003020160005b508054600160a060020a031916815560006001820181905560029091018054600160c060020a0319169055600160a060020a0385168152600360205260409020805460001981019081101561000057906000526020600020906003020160005b50600160a060020a03851660009081526003602052604090208054859081101561000057906000526020600020906003020160005b5081548154600160a060020a031916600160a060020a03918216178255600180840154908301556002928301805493909201805467ffffffffffffffff191667ffffffffffffffff948516178082558354604060020a908190048616026fffffffffffffffff000000000000000019909116178082559254608060020a9081900490941690930277ffffffffffffffff00000000000000000000000000000000199092169190911790915584166000908152600360205260409020805460001981018083559190829080158290116115485760030281600302836000526020600020918201910161154891905b8082111561095d578054600160a060020a031916815560006001820155600281018054600160c060020a0319169055600301610926565b5090565b5b505050600160a060020a033316600090815260016020526040902054611570915082611a1f565b600160a060020a03338116600090815260016020526040808220939093559086168152205461159f9082611714565b600160a060020a038086166000818152600160209081526040918290209490945580518581529051339093169391927fddf252ad1be2c89b69c2b068fc378daa952ba7f163c4a11628f55a4df523b3ef929181900390910190a35b50505050565b600160a060020a0383161561166e576116466008600061161f86610ead565b600160a060020a0316600160a060020a031681526020019081526020016000205482611714565b6008600061165386610ead565b600160a060020a031681526020810191909152604001600020555b600160a060020a038216156116dc576116b46008600061168d85610ead565b600160a060020a0316600160a060020a031681526020019081526020016000205482611a1f565b600860006116c185610ead565b600160a060020a031681526020810191909152604001600020555b5b505050565b600083826116f082426110fa565b8111156116fc57610000565b611707868686611b1b565b92505b5b50509392505050565b600061172283831115611b4d565b508082035b92915050565b6000610fd983602001518367ffffffffffffffff16856080015167ffffffffffffffff16866040015167ffffffffffffffff16876060015167ffffffffffffffff166111f3565b90505b92915050565b60008167ffffffffffffffff168367ffffffffffffffff1610156117a15781610fd9565b825b90505b92915050565b600033826117ba82426110fa565b8111156117c657610000565b6117d08585611b5d565b92505b5b505092915050565b6117e582610ef9565b6117ee83610c21565b11156117f957610000565b600160a060020a03811660009081526009602052604090205460ff16158015611834575081600160a060020a031681600160a060020a031614155b1561183e57610000565b61184782611070565b1561185157610000565b611864828261185f85610ef9565b611600565b600160a060020a0382811660009081526007602052604090208054600160a060020a031916918316918217905561189a82610ead565b600160a060020a031614610cc357610000565b5b5050565b600160a060020a038216600090815260036020526040812054815b818110156119885761197d836112796003600089600160a060020a0316600160a060020a0316815260200190815260200160002084815481101561000057906000526020600020906003020160005b506040805160a0810182528254600160a060020a031681526001830154602082015260029092015467ffffffffffffffff80821692840192909252604060020a810482166060840152608060020a900416608082015287611af9565b611a1f565b92505b6001016118cd565b600160a060020a0385166000908152600160205260409020546117d09084611714565b92505b505092915050565b600060006119c384611070565b80156119d157506000600d54115b90506119fb816119e9576119e485610ef9565b6119ec565b60005b6111138686611b7b565b611a05565b91505b5092915050565b60008183106117a15781610fd9565b825b90505b92915050565b6000828201611a3c848210801590611a375750838210155b611b4d565b8091505b5092915050565b611a508161104c565b15611a5a57610b85565b6005805460009081526004602052604090208054600160a060020a031916600160a060020a038416179055805460010190555b50565b6000828202611a3c841580611a37575083858381156100005704145b611b4d565b8091505b5092915050565b60006000611acc60008411611b4d565b8284811561000057049050611a3c838581156100005706828502018514611b4d565b8091505b5092915050565b6000610fd98360200151611b0d858561172d565b611714565b90505b92915050565b60008382611b2982426110fa565b811115611b3557610000565b611707868686611b8f565b92505b5b50509392505050565b801515610b8557610000565b5b50565b6000611b6883611a47565b610fd98383611c92565b90505b92915050565b6000610fd983610ef9565b90505b92915050565b600160a060020a038084166000908152600260209081526040808320338516845282528083205493861683526001909152812054909190611bd09084611a1f565b600160a060020a038086166000908152600160205260408082209390935590871681522054611bff9084611714565b600160a060020a038616600090815260016020526040902055611c228184611714565b600160a060020a038087166000818152600260209081526040808320338616845282529182902094909455805187815290519288169391927fddf252ad1be2c89b69c2b068fc378daa952ba7f163c4a11628f55a4df523b3ef929181900390910190a3600191505b509392505050565b60003382611ca082426110fa565b811115611cac57610000565b6117d08585611cc2565b92505b5b505092915050565b600160a060020a033316600090815260016020526040812054611ce59083611714565b600160a060020a033381166000908152600160205260408082209390935590851681522054611d149083611a1f565b600160a060020a038085166000818152600160209081526040918290209490945580518681529051919333909316927fddf252ad1be2c89b69c2b068fc378daa952ba7f163c4a11628f55a4df523b3ef92918290030190a35060015b929150505600a165627a7a72305820bfa5ddd3fecf3f43aed25385ec7ec3ef79638c2e58d99f85d9a3cc494183bf160029000000000000000000000000a14bdd7e5666d784dcce98ad24d383a6b1cd4182", + "type": "CREATE", + "value": "0x0" + } + ], + "error": "invalid jump destination", + "from": "0xe4a13bc304682a903e9472f469c33801dd18d9e8", + "gas": "0x435c8", + "gasUsed": "0x435c8", + "input": "0x3b91f506000000000000000000000000a14bdd7e5666d784dcce98ad24d383a6b1cd4182000000000000000000000000e4a13bc304682a903e9472f469c33801dd18d9e8", + "to": "0x1d3ddf7caf024f253487e18bc4a15b1a360c170a", + "type": "CALL", + "value": "0x0" + } +} diff --git a/eth/tracers/testdata/call_tracer_legacy/inner_instafail.json b/eth/tracers/testdata/call_tracer_legacy/inner_instafail.json new file mode 100644 index 000000000000..86070d130857 --- /dev/null +++ b/eth/tracers/testdata/call_tracer_legacy/inner_instafail.json @@ -0,0 +1,72 @@ +{ + "genesis": { + "difficulty": "117067574", + "extraData": "0xd783010502846765746887676f312e372e33856c696e7578", + "gasLimit": "4712380", + "hash": "0xe05db05eeb3f288041ecb10a787df121c0ed69499355716e17c307de313a4486", + "miner": "0x0c062b329265c965deef1eede55183b3acb8f611", + "mixHash": "0xb669ae39118a53d2c65fd3b1e1d3850dd3f8c6842030698ed846a2762d68b61d", + "nonce": "0x2b469722b8e28c45", + "number": "24973", + "stateRoot": "0x532a5c3f75453a696428db078e32ae283c85cb97e4d8560dbdf022adac6df369", + "timestamp": "1479891145", + "totalDifficulty": "1892250259406", + "alloc": { + "0x6c06b16512b332e6cd8293a2974872674716ce18": { + "balance": "0x0", + "nonce": "1", + "code": "0x60606040526000357c0100000000000000000000000000000000000000000000000000000000900480632e1a7d4d146036575b6000565b34600057604e60048080359060200190919050506050565b005b3373ffffffffffffffffffffffffffffffffffffffff166108fc829081150290604051809050600060405180830381858888f19350505050505b5056", + "storage": {} + }, + "0x66fdfd05e46126a07465ad24e40cc0597bc1ef31": { + "balance": "0x229ebbb36c3e0f20", + "nonce": "3", + "code": "0x", + "storage": {} + } + }, + "config": { + "chainId": 3, + "homesteadBlock": 0, + "daoForkSupport": true, + "eip150Block": 0, + "eip150Hash": "0x41941023680923e0fe4d74a34bdac8141f2540e3ae90623718e47d66d1ca4a2d", + "eip155Block": 10, + "eip158Block": 10, + "byzantiumBlock": 1700000, + "constantinopleBlock": 4230000, + "petersburgBlock": 4939394, + "istanbulBlock": 6485846, + "muirGlacierBlock": 7117117, + "ethash": {} + } + }, + "context": { + "number": "24974", + "difficulty": "117067574", + "timestamp": "1479891162", + "gasLimit": "4712388", + "miner": "0xc822ef32e6d26e170b70cf761e204c1806265914" + }, + "input": "0xf889038504a81557008301f97e946c06b16512b332e6cd8293a2974872674716ce1880a42e1a7d4d00000000000000000000000000000000000000000000000014d1120d7b1600002aa0e2a6558040c5d72bc59f2fb62a38993a314c849cd22fb393018d2c5af3112095a01bdb6d7ba32263ccc2ecc880d38c49d9f0c5a72d8b7908e3122b31356d349745", + "result": { + "type": "CALL", + "from": "0x66fdfd05e46126a07465ad24e40cc0597bc1ef31", + "to": "0x6c06b16512b332e6cd8293a2974872674716ce18", + "value": "0x0", + "gas": "0x1a466", + "gasUsed": "0x1dc6", + "input": "0x2e1a7d4d00000000000000000000000000000000000000000000000014d1120d7b160000", + "output": "0x", + "calls": [ + { + "type": "CALL", + "from": "0x6c06b16512b332e6cd8293a2974872674716ce18", + "to": "0x66fdfd05e46126a07465ad24e40cc0597bc1ef31", + "value": "0x14d1120d7b160000", + "error":"internal failure", + "input": "0x" + } + ] + } +} diff --git a/eth/tracers/testdata/call_tracer_legacy/inner_throw_outer_revert.json b/eth/tracers/testdata/call_tracer_legacy/inner_throw_outer_revert.json new file mode 100644 index 000000000000..7627c8c23d68 --- /dev/null +++ b/eth/tracers/testdata/call_tracer_legacy/inner_throw_outer_revert.json @@ -0,0 +1,81 @@ +{ + "context": { + "difficulty": "3956606365", + "gasLimit": "5413248", + "miner": "0x00d8ae40d9a06d0e7a2877b62e32eb959afbe16d", + "number": "2295104", + "timestamp": "1513681256" + }, + "genesis": { + "alloc": { + "0x33056b5dcac09a9b4becad0e1dcf92c19bd0af76": { + "balance": "0x0", + "code": "0x60606040526004361061015e576000357c0100000000000000000000000000000000000000000000000000000000900463ffffffff1680625b4487146101a257806311df9995146101cb578063278ecde11461022057806330adce0e146102435780633197cbb61461026c5780634bb278f3146102955780636103d70b146102aa57806363a599a4146102bf5780636a2d1cb8146102d457806375f12b21146102fd57806378e979251461032a578063801db9cc1461035357806386d1a69f1461037c5780638da5cb5b146103915780638ef26a71146103e65780639890220b1461040f5780639b39caef14610424578063b85dfb801461044d578063be9a6555146104a1578063ccb07cef146104b6578063d06c91e4146104e3578063d669e1d414610538578063df40503c14610561578063e2982c2114610576578063f02e030d146105c3578063f2fde38b146105d8578063f3283fba14610611575b600060149054906101000a900460ff1615151561017a57600080fd5b60075442108061018b575060085442115b15151561019757600080fd5b6101a03361064a565b005b34156101ad57600080fd5b6101b5610925565b6040518082815260200191505060405180910390f35b34156101d657600080fd5b6101de61092b565b604051808273ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff16815260200191505060405180910390f35b341561022b57600080fd5b6102416004808035906020019091905050610951565b005b341561024e57600080fd5b610256610c48565b6040518082815260200191505060405180910390f35b341561027757600080fd5b61027f610c4e565b6040518082815260200191505060405180910390f35b34156102a057600080fd5b6102a8610c54565b005b34156102b557600080fd5b6102bd610f3e565b005b34156102ca57600080fd5b6102d261105d565b005b34156102df57600080fd5b6102e76110d5565b6040518082815260200191505060405180910390f35b341561030857600080fd5b6103106110e1565b604051808215151515815260200191505060405180910390f35b341561033557600080fd5b61033d6110f4565b6040518082815260200191505060405180910390f35b341561035e57600080fd5b6103666110fa565b6040518082815260200191505060405180910390f35b341561038757600080fd5b61038f611104565b005b341561039c57600080fd5b6103a4611196565b604051808273ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff16815260200191505060405180910390f35b34156103f157600080fd5b6103f96111bb565b6040518082815260200191505060405180910390f35b341561041a57600080fd5b6104226111c1565b005b341561042f57600080fd5b610437611296565b6040518082815260200191505060405180910390f35b341561045857600080fd5b610484600480803573ffffffffffffffffffffffffffffffffffffffff1690602001909190505061129c565b604051808381526020018281526020019250505060405180910390f35b34156104ac57600080fd5b6104b46112c0565b005b34156104c157600080fd5b6104c9611341565b604051808215151515815260200191505060405180910390f35b34156104ee57600080fd5b6104f6611354565b604051808273ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff16815260200191505060405180910390f35b341561054357600080fd5b61054b61137a565b6040518082815260200191505060405180910390f35b341561056c57600080fd5b610574611385565b005b341561058157600080fd5b6105ad600480803573ffffffffffffffffffffffffffffffffffffffff169060200190919050506116c3565b6040518082815260200191505060405180910390f35b34156105ce57600080fd5b6105d66116db565b005b34156105e357600080fd5b61060f600480803573ffffffffffffffffffffffffffffffffffffffff16906020019091905050611829565b005b341561061c57600080fd5b610648600480803573ffffffffffffffffffffffffffffffffffffffff169060200190919050506118fe565b005b600080670de0b6b3a7640000341015151561066457600080fd5b61069b610696670de0b6b3a7640000610688610258346119d990919063ffffffff16565b611a0c90919063ffffffff16565b611a27565b9150660221b262dd80006106ba60065484611a7e90919063ffffffff16565b111515156106c757600080fd5b600a60008473ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff1681526020019081526020016000209050600360009054906101000a900473ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff1663a9059cbb84846000604051602001526040518363ffffffff167c0100000000000000000000000000000000000000000000000000000000028152600401808373ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff16815260200182815260200192505050602060405180830381600087803b15156107d557600080fd5b6102c65a03f115156107e657600080fd5b5050506040518051905050610808828260010154611a7e90919063ffffffff16565b8160010181905550610827348260000154611a7e90919063ffffffff16565b816000018190555061084434600554611a7e90919063ffffffff16565b60058190555061085f82600654611a7e90919063ffffffff16565b6006819055503373ffffffffffffffffffffffffffffffffffffffff167ff3c1c7c0eb1328ddc834c4c9e579c06d35f443bf1102b034653624a239c7a40c836040518082815260200191505060405180910390a27fd1dc370699ae69fb860ed754789a4327413ec1cd379b93f2cbedf449a26b0e8583600554604051808373ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff1681526020018281526020019250505060405180910390a1505050565b60025481565b600360009054906101000a900473ffffffffffffffffffffffffffffffffffffffff1681565b600060085442108061096b5750651b48eb57e00060065410155b15151561097757600080fd5b600a60003373ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff16815260200190815260200160002060010154821415156109c757600080fd5b600360009054906101000a900473ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff166323b872dd3330856000604051602001526040518463ffffffff167c0100000000000000000000000000000000000000000000000000000000028152600401808473ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff1681526020018373ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff1681526020018281526020019350505050602060405180830381600087803b1515610ac857600080fd5b6102c65a03f11515610ad957600080fd5b5050506040518051905050600360009054906101000a900473ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff166342966c68836000604051602001526040518263ffffffff167c010000000000000000000000000000000000000000000000000000000002815260040180828152602001915050602060405180830381600087803b1515610b7d57600080fd5b6102c65a03f11515610b8e57600080fd5b505050604051805190501515610ba357600080fd5b600a60003373ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff1681526020019081526020016000206000015490506000600a60003373ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff168152602001908152602001600020600001819055506000811115610c4457610c433382611a9c565b5b5050565b60055481565b60085481565b60008060009054906101000a900473ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff163373ffffffffffffffffffffffffffffffffffffffff16141515610cb157600080fd5b600854421015610cd357660221b262dd8000600654141515610cd257600080fd5b5b651b48eb57e000600654108015610cf057506213c6806008540142105b151515610cfc57600080fd5b600460009054906101000a900473ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff166108fc3073ffffffffffffffffffffffffffffffffffffffff16319081150290604051600060405180830381858888f193505050501515610d7557600080fd5b600360009054906101000a900473ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff166370a08231306000604051602001526040518263ffffffff167c0100000000000000000000000000000000000000000000000000000000028152600401808273ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff168152602001915050602060405180830381600087803b1515610e3a57600080fd5b6102c65a03f11515610e4b57600080fd5b5050506040518051905090506000811115610f2057600360009054906101000a900473ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff166342966c68826000604051602001526040518263ffffffff167c010000000000000000000000000000000000000000000000000000000002815260040180828152602001915050602060405180830381600087803b1515610ef957600080fd5b6102c65a03f11515610f0a57600080fd5b505050604051805190501515610f1f57600080fd5b5b6001600960006101000a81548160ff02191690831515021790555050565b600080339150600160008373ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff16815260200190815260200160002054905060008114151515610f9657600080fd5b803073ffffffffffffffffffffffffffffffffffffffff163110151515610fbc57600080fd5b610fd181600254611b5090919063ffffffff16565b6002819055506000600160008473ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff168152602001908152602001600020819055508173ffffffffffffffffffffffffffffffffffffffff166108fc829081150290604051600060405180830381858888f19350505050151561105957fe5b5050565b6000809054906101000a900473ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff163373ffffffffffffffffffffffffffffffffffffffff161415156110b857600080fd5b6001600060146101000a81548160ff021916908315150217905550565b670de0b6b3a764000081565b600060149054906101000a900460ff1681565b60075481565b651b48eb57e00081565b6000809054906101000a900473ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff163373ffffffffffffffffffffffffffffffffffffffff1614151561115f57600080fd5b600060149054906101000a900460ff16151561117a57600080fd5b60008060146101000a81548160ff021916908315150217905550565b6000809054906101000a900473ffffffffffffffffffffffffffffffffffffffff1681565b60065481565b6000809054906101000a900473ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff163373ffffffffffffffffffffffffffffffffffffffff1614151561121c57600080fd5b6000809054906101000a900473ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff166108fc3073ffffffffffffffffffffffffffffffffffffffff16319081150290604051600060405180830381858888f19350505050151561129457600080fd5b565b61025881565b600a6020528060005260406000206000915090508060000154908060010154905082565b6000809054906101000a900473ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff163373ffffffffffffffffffffffffffffffffffffffff1614151561131b57600080fd5b600060075414151561132c57600080fd5b4260078190555062278d004201600881905550565b600960009054906101000a900460ff1681565b600460009054906101000a900473ffffffffffffffffffffffffffffffffffffffff1681565b660221b262dd800081565b60008060008060009054906101000a900473ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff163373ffffffffffffffffffffffffffffffffffffffff161415156113e557600080fd5b600654660221b262dd800003925061142b670de0b6b3a764000061141c610258670de0b6b3a76400006119d990919063ffffffff16565b81151561142557fe5b04611a27565b915081831115151561143c57600080fd5b600a60008060009054906101000a900473ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff1681526020019081526020016000209050600360009054906101000a900473ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff1663a9059cbb6000809054906101000a900473ffffffffffffffffffffffffffffffffffffffff16856000604051602001526040518363ffffffff167c0100000000000000000000000000000000000000000000000000000000028152600401808373ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff16815260200182815260200192505050602060405180830381600087803b151561158c57600080fd5b6102c65a03f1151561159d57600080fd5b50505060405180519050506115bf838260010154611a7e90919063ffffffff16565b81600101819055506115dc83600654611a7e90919063ffffffff16565b6006819055503073ffffffffffffffffffffffffffffffffffffffff167ff3c1c7c0eb1328ddc834c4c9e579c06d35f443bf1102b034653624a239c7a40c846040518082815260200191505060405180910390a27fd1dc370699ae69fb860ed754789a4327413ec1cd379b93f2cbedf449a26b0e856000809054906101000a900473ffffffffffffffffffffffffffffffffffffffff16600554604051808373ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff1681526020018281526020019250505060405180910390a1505050565b60016020528060005260406000206000915090505481565b6000809054906101000a900473ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff163373ffffffffffffffffffffffffffffffffffffffff1614151561173657600080fd5b600360009054906101000a900473ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff1663f2fde38b6000809054906101000a900473ffffffffffffffffffffffffffffffffffffffff166040518263ffffffff167c0100000000000000000000000000000000000000000000000000000000028152600401808273ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff168152602001915050600060405180830381600087803b151561181357600080fd5b6102c65a03f1151561182457600080fd5b505050565b6000809054906101000a900473ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff163373ffffffffffffffffffffffffffffffffffffffff1614151561188457600080fd5b600073ffffffffffffffffffffffffffffffffffffffff168173ffffffffffffffffffffffffffffffffffffffff161415156118fb57806000806101000a81548173ffffffffffffffffffffffffffffffffffffffff021916908373ffffffffffffffffffffffffffffffffffffffff1602179055505b50565b6000809054906101000a900473ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff163373ffffffffffffffffffffffffffffffffffffffff1614151561195957600080fd5b600073ffffffffffffffffffffffffffffffffffffffff168173ffffffffffffffffffffffffffffffffffffffff161415151561199557600080fd5b80600460006101000a81548173ffffffffffffffffffffffffffffffffffffffff021916908373ffffffffffffffffffffffffffffffffffffffff16021790555050565b600080828402905060008414806119fa57508284828115156119f757fe5b04145b1515611a0257fe5b8091505092915050565b6000808284811515611a1a57fe5b0490508091505092915050565b6000611a416202a300600754611a7e90919063ffffffff16565b421015611a7557611a6e611a5f600584611a0c90919063ffffffff16565b83611a7e90919063ffffffff16565b9050611a79565b8190505b919050565b6000808284019050838110151515611a9257fe5b8091505092915050565b611aee81600160008573ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff16815260200190815260200160002054611a7e90919063ffffffff16565b600160008473ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff16815260200190815260200160002081905550611b4681600254611a7e90919063ffffffff16565b6002819055505050565b6000828211151515611b5e57fe5b8183039050929150505600a165627a7a72305820ec0d82a406896ccf20989b3d6e650abe4dc104e400837f1f58e67ef499493ae90029", + "nonce": "1", + "storage": { + "0x0000000000000000000000000000000000000000000000000000000000000000": "0x0000000000000000000000008d69d00910d0b2afb2a99ed6c16c8129fa8e1751", + "0x0000000000000000000000000000000000000000000000000000000000000003": "0x000000000000000000000000e819f024b41358d2c08e3a868a5c5dd0566078d4", + "0x0000000000000000000000000000000000000000000000000000000000000007": "0x000000000000000000000000000000000000000000000000000000005a388981", + "0x0000000000000000000000000000000000000000000000000000000000000008": "0x000000000000000000000000000000000000000000000000000000005a3b38e6" + } + }, + "0xd4fcab9f0a6dc0493af47c864f6f17a8a5e2e826": { + "balance": "0x2a2dd979a35cf000", + "code": "0x", + "nonce": "0", + "storage": {} + }, + "0xe819f024b41358d2c08e3a868a5c5dd0566078d4": { + "balance": "0x0", + "code": "0x6060604052600436106100ba576000357c0100000000000000000000000000000000000000000000000000000000900463ffffffff16806306fdde03146100bf578063095ea7b31461014d57806318160ddd146101a757806323b872dd146101d0578063313ce5671461024957806342966c681461027257806370a08231146102ad5780638da5cb5b146102fa57806395d89b411461034f578063a9059cbb146103dd578063dd62ed3e14610437578063f2fde38b146104a3575b600080fd5b34156100ca57600080fd5b6100d26104dc565b6040518080602001828103825283818151815260200191508051906020019080838360005b838110156101125780820151818401526020810190506100f7565b50505050905090810190601f16801561013f5780820380516001836020036101000a031916815260200191505b509250505060405180910390f35b341561015857600080fd5b61018d600480803573ffffffffffffffffffffffffffffffffffffffff16906020019091908035906020019091905050610515565b604051808215151515815260200191505060405180910390f35b34156101b257600080fd5b6101ba61069c565b6040518082815260200191505060405180910390f35b34156101db57600080fd5b61022f600480803573ffffffffffffffffffffffffffffffffffffffff1690602001909190803573ffffffffffffffffffffffffffffffffffffffff169060200190919080359060200190919050506106a2565b604051808215151515815260200191505060405180910390f35b341561025457600080fd5b61025c610952565b6040518082815260200191505060405180910390f35b341561027d57600080fd5b6102936004808035906020019091905050610957565b604051808215151515815260200191505060405180910390f35b34156102b857600080fd5b6102e4600480803573ffffffffffffffffffffffffffffffffffffffff16906020019091905050610abe565b6040518082815260200191505060405180910390f35b341561030557600080fd5b61030d610b07565b604051808273ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff16815260200191505060405180910390f35b341561035a57600080fd5b610362610b2d565b6040518080602001828103825283818151815260200191508051906020019080838360005b838110156103a2578082015181840152602081019050610387565b50505050905090810190601f1680156103cf5780820380516001836020036101000a031916815260200191505b509250505060405180910390f35b34156103e857600080fd5b61041d600480803573ffffffffffffffffffffffffffffffffffffffff16906020019091908035906020019091905050610b66565b604051808215151515815260200191505060405180910390f35b341561044257600080fd5b61048d600480803573ffffffffffffffffffffffffffffffffffffffff1690602001909190803573ffffffffffffffffffffffffffffffffffffffff16906020019091905050610d01565b6040518082815260200191505060405180910390f35b34156104ae57600080fd5b6104da600480803573ffffffffffffffffffffffffffffffffffffffff16906020019091905050610d88565b005b6040805190810160405280600b81526020017f416c6c436f6465436f696e00000000000000000000000000000000000000000081525081565b6000808214806105a157506000600260003373ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff16815260200190815260200160002060008573ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff16815260200190815260200160002054145b15156105ac57600080fd5b81600260003373ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff16815260200190815260200160002060008573ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff168152602001908152602001600020819055508273ffffffffffffffffffffffffffffffffffffffff163373ffffffffffffffffffffffffffffffffffffffff167f8c5be1e5ebec7d5bd14f71427d1e84f3dd0314c0f7b2291e5b200ac8c7c3b925846040518082815260200191505060405180910390a36001905092915050565b60005481565b600080600260008673ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff16815260200190815260200160002060003373ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff16815260200190815260200160002054905061077683600160008773ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff16815260200190815260200160002054610e5f90919063ffffffff16565b600160008673ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff1681526020019081526020016000208190555061080b83600160008873ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff16815260200190815260200160002054610e7d90919063ffffffff16565b600160008773ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff168152602001908152602001600020819055506108618382610e7d90919063ffffffff16565b600260008773ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff16815260200190815260200160002060003373ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff168152602001908152602001600020819055508373ffffffffffffffffffffffffffffffffffffffff168573ffffffffffffffffffffffffffffffffffffffff167fddf252ad1be2c89b69c2b068fc378daa952ba7f163c4a11628f55a4df523b3ef856040518082815260200191505060405180910390a360019150509392505050565b600681565b6000600360009054906101000a900473ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff163373ffffffffffffffffffffffffffffffffffffffff161415156109b557600080fd5b610a0782600160003373ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff16815260200190815260200160002054610e7d90919063ffffffff16565b600160003373ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff16815260200190815260200160002081905550610a5f82600054610e7d90919063ffffffff16565b60008190555060003373ffffffffffffffffffffffffffffffffffffffff167fddf252ad1be2c89b69c2b068fc378daa952ba7f163c4a11628f55a4df523b3ef846040518082815260200191505060405180910390a360019050919050565b6000600160008373ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff168152602001908152602001600020549050919050565b600360009054906101000a900473ffffffffffffffffffffffffffffffffffffffff1681565b6040805190810160405280600481526020017f414c4c430000000000000000000000000000000000000000000000000000000081525081565b6000610bba82600160003373ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff16815260200190815260200160002054610e7d90919063ffffffff16565b600160003373ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff16815260200190815260200160002081905550610c4f82600160008673ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff16815260200190815260200160002054610e5f90919063ffffffff16565b600160008573ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff168152602001908152602001600020819055508273ffffffffffffffffffffffffffffffffffffffff163373ffffffffffffffffffffffffffffffffffffffff167fddf252ad1be2c89b69c2b068fc378daa952ba7f163c4a11628f55a4df523b3ef846040518082815260200191505060405180910390a36001905092915050565b6000600260008473ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff16815260200190815260200160002060008373ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff16815260200190815260200160002054905092915050565b600360009054906101000a900473ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff163373ffffffffffffffffffffffffffffffffffffffff16141515610de457600080fd5b600073ffffffffffffffffffffffffffffffffffffffff168173ffffffffffffffffffffffffffffffffffffffff16141515610e5c5780600360006101000a81548173ffffffffffffffffffffffffffffffffffffffff021916908373ffffffffffffffffffffffffffffffffffffffff1602179055505b50565b6000808284019050838110151515610e7357fe5b8091505092915050565b6000828211151515610e8b57fe5b8183039050929150505600a165627a7a7230582059f3ea3df0b054e9ab711f37969684ba83fe38f255ffe2c8d850d951121c51100029", + "nonce": "1", + "storage": {} + } + }, + "config": { + "byzantiumBlock": 1700000, + "chainId": 3, + "daoForkSupport": true, + "eip150Block": 0, + "eip150Hash": "0x41941023680923e0fe4d74a34bdac8141f2540e3ae90623718e47d66d1ca4a2d", + "eip155Block": 10, + "eip158Block": 10, + "ethash": {}, + "homesteadBlock": 0 + }, + "difficulty": "3956606365", + "extraData": "0x566961425443", + "gasLimit": "5418523", + "hash": "0x6f37eb930a25da673ea1bb80fd9e32ddac19cdf7cd4bb2eac62cc13598624077", + "miner": "0xd049bfd667cb46aa3ef5df0da3e57db3be39e511", + "mixHash": "0x10971cde68c587c750c23b8589ae868ce82c2c646636b97e7d9856470c5297c7", + "nonce": "0x810f923ff4b450a1", + "number": "2295103", + "stateRoot": "0xff403612573d76dfdaf4fea2429b77dbe9764021ae0e38dc8ac79a3cf551179e", + "timestamp": "1513681246", + "totalDifficulty": "7162347056825919" + }, + "input": "0xf86d808504e3b292008307dfa69433056b5dcac09a9b4becad0e1dcf92c19bd0af76880e92596fd62900008029a0e5f27bb66431f7081bb7f1f242003056d7f3f35414c352cd3d1848b52716dac2a07d0be78980edb0bd2a0678fc53aa90ea9558ce346b0d947967216918ac74ccea", + "result": { + "calls": [ + { + "error": "invalid opcode: opcode 0xfe not defined", + "from": "0x33056b5dcac09a9b4becad0e1dcf92c19bd0af76", + "gas": "0x75fe3", + "gasUsed": "0x75fe3", + "input": "0xa9059cbb000000000000000000000000d4fcab9f0a6dc0493af47c864f6f17a8a5e2e82600000000000000000000000000000000000000000000000000000000000002f4", + "to": "0xe819f024b41358d2c08e3a868a5c5dd0566078d4", + "type": "CALL", + "value": "0x0" + } + ], + "error": "execution reverted", + "from": "0xd4fcab9f0a6dc0493af47c864f6f17a8a5e2e826", + "gas": "0x78d9e", + "gasUsed": "0x76fc0", + "input": "0x", + "to": "0x33056b5dcac09a9b4becad0e1dcf92c19bd0af76", + "type": "CALL", + "value": "0xe92596fd6290000" + } +} diff --git a/eth/tracers/testdata/call_tracer_legacy/oog.json b/eth/tracers/testdata/call_tracer_legacy/oog.json new file mode 100644 index 000000000000..de4fed6ab1fb --- /dev/null +++ b/eth/tracers/testdata/call_tracer_legacy/oog.json @@ -0,0 +1,60 @@ +{ + "context": { + "difficulty": "3699098917", + "gasLimit": "5258985", + "miner": "0xd049bfd667cb46aa3ef5df0da3e57db3be39e511", + "number": "2294631", + "timestamp": "1513675366" + }, + "genesis": { + "alloc": { + "0x43064693d3d38ad6a7cb579e0d6d9718c8aa6b62": { + "balance": "0x0", + "code": "0x6060604052600436106100ba576000357c0100000000000000000000000000000000000000000000000000000000900463ffffffff16806306fdde03146100bf578063095ea7b31461014d57806318160ddd146101a757806323b872dd146101d0578063313ce5671461024957806342966c68146102785780635a3b7e42146102b357806370a082311461034157806379cc67901461038e57806395d89b41146103e8578063a9059cbb14610476578063dd62ed3e146104b8575b600080fd5b34156100ca57600080fd5b6100d2610524565b6040518080602001828103825283818151815260200191508051906020019080838360005b838110156101125780820151818401526020810190506100f7565b50505050905090810190601f16801561013f5780820380516001836020036101000a031916815260200191505b509250505060405180910390f35b341561015857600080fd5b61018d600480803573ffffffffffffffffffffffffffffffffffffffff1690602001909190803590602001909190505061055d565b604051808215151515815260200191505060405180910390f35b34156101b257600080fd5b6101ba6105ea565b6040518082815260200191505060405180910390f35b34156101db57600080fd5b61022f600480803573ffffffffffffffffffffffffffffffffffffffff1690602001909190803573ffffffffffffffffffffffffffffffffffffffff169060200190919080359060200190919050506105f0565b604051808215151515815260200191505060405180910390f35b341561025457600080fd5b61025c610910565b604051808260ff1660ff16815260200191505060405180910390f35b341561028357600080fd5b6102996004808035906020019091905050610915565b604051808215151515815260200191505060405180910390f35b34156102be57600080fd5b6102c6610a18565b6040518080602001828103825283818151815260200191508051906020019080838360005b838110156103065780820151818401526020810190506102eb565b50505050905090810190601f1680156103335780820380516001836020036101000a031916815260200191505b509250505060405180910390f35b341561034c57600080fd5b610378600480803573ffffffffffffffffffffffffffffffffffffffff16906020019091905050610a51565b6040518082815260200191505060405180910390f35b341561039957600080fd5b6103ce600480803573ffffffffffffffffffffffffffffffffffffffff16906020019091908035906020019091905050610a69565b604051808215151515815260200191505060405180910390f35b34156103f357600080fd5b6103fb610bf8565b6040518080602001828103825283818151815260200191508051906020019080838360005b8381101561043b578082015181840152602081019050610420565b50505050905090810190601f1680156104685780820380516001836020036101000a031916815260200191505b509250505060405180910390f35b341561048157600080fd5b6104b6600480803573ffffffffffffffffffffffffffffffffffffffff16906020019091908035906020019091905050610c31565b005b34156104c357600080fd5b61050e600480803573ffffffffffffffffffffffffffffffffffffffff1690602001909190803573ffffffffffffffffffffffffffffffffffffffff16906020019091905050610e34565b6040518082815260200191505060405180910390f35b6040805190810160405280600881526020017f446f70616d696e6500000000000000000000000000000000000000000000000081525081565b600081600260003373ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff16815260200190815260200160002060008573ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff168152602001908152602001600020819055506001905092915050565b60005481565b6000808373ffffffffffffffffffffffffffffffffffffffff161415151561061757600080fd5b81600160008673ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff168152602001908152602001600020541015151561066557600080fd5b600160008473ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff1681526020019081526020016000205482600160008673ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff1681526020019081526020016000205401101515156106f157fe5b600260008573ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff16815260200190815260200160002060003373ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff16815260200190815260200160002054821115151561077c57600080fd5b81600160008673ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff1681526020019081526020016000206000828254039250508190555081600160008573ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff1681526020019081526020016000206000828254019250508190555081600260008673ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff16815260200190815260200160002060003373ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff168152602001908152602001600020600082825403925050819055508273ffffffffffffffffffffffffffffffffffffffff168473ffffffffffffffffffffffffffffffffffffffff167fddf252ad1be2c89b69c2b068fc378daa952ba7f163c4a11628f55a4df523b3ef846040518082815260200191505060405180910390a3600190509392505050565b601281565b600081600160003373ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff168152602001908152602001600020541015151561096557600080fd5b81600160003373ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff168152602001908152602001600020600082825403925050819055508160008082825403925050819055503373ffffffffffffffffffffffffffffffffffffffff167fcc16f5dbb4873280815c1ee09dbd06736cffcc184412cf7a71a0fdb75d397ca5836040518082815260200191505060405180910390a260019050919050565b6040805190810160405280600981526020017f446f706d6e20302e32000000000000000000000000000000000000000000000081525081565b60016020528060005260406000206000915090505481565b600081600160008573ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff1681526020019081526020016000205410151515610ab957600080fd5b600260008473ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff16815260200190815260200160002060003373ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff168152602001908152602001600020548211151515610b4457600080fd5b81600160008573ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff168152602001908152602001600020600082825403925050819055508160008082825403925050819055508273ffffffffffffffffffffffffffffffffffffffff167fcc16f5dbb4873280815c1ee09dbd06736cffcc184412cf7a71a0fdb75d397ca5836040518082815260200191505060405180910390a26001905092915050565b6040805190810160405280600581526020017f444f504d4e00000000000000000000000000000000000000000000000000000081525081565b60008273ffffffffffffffffffffffffffffffffffffffff1614151515610c5757600080fd5b80600160003373ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff1681526020019081526020016000205410151515610ca557600080fd5b600160008373ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff1681526020019081526020016000205481600160008573ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff168152602001908152602001600020540110151515610d3157fe5b80600160003373ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff1681526020019081526020016000206000828254039250508190555080600160008473ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff168152602001908152602001600020600082825401925050819055508173ffffffffffffffffffffffffffffffffffffffff163373ffffffffffffffffffffffffffffffffffffffff167fddf252ad1be2c89b69c2b068fc378daa952ba7f163c4a11628f55a4df523b3ef836040518082815260200191505060405180910390a35050565b60026020528160005260406000206020528060005260406000206000915091505054815600a165627a7a723058206d93424f4e7b11929b8276a269038402c10c0ddf21800e999916ddd9dff4a7630029", + "nonce": "1", + "storage": { + "0x296b66049cc4f9c8bf3d4f14752add261d1a980b39bdd194a7897baf39ac7579": "0x0000000000000000000000000000000000000000033b2e3c9fc9653f9e72b1e0" + } + }, + "0x94194bc2aaf494501d7880b61274a169f6502a54": { + "balance": "0xea8c39a876d19888d", + "code": "0x", + "nonce": "265", + "storage": {} + } + }, + "config": { + "byzantiumBlock": 1700000, + "chainId": 3, + "daoForkSupport": true, + "eip150Block": 0, + "eip150Hash": "0x41941023680923e0fe4d74a34bdac8141f2540e3ae90623718e47d66d1ca4a2d", + "eip155Block": 10, + "eip158Block": 10, + "ethash": {}, + "homesteadBlock": 0 + }, + "difficulty": "3699098917", + "extraData": "0x4554482e45544846414e532e4f52472d4641313738394444", + "gasLimit": "5263953", + "hash": "0x03a0f62a8106793dafcfae7b75fd2654322062d585a19cea568314d7205790dc", + "miner": "0xbbf5029fd710d227630c8b7d338051b8e76d50b3", + "mixHash": "0x15482cc64b7c00a947f5bf015dfc010db1a6a668c74df61974d6a7848c174408", + "nonce": "0xd1bdb150f6fd170e", + "number": "2294630", + "stateRoot": "0x1ab1a534e84cc787cda1db21e0d5920ab06017948075b759166cfea7274657a1", + "timestamp": "1513675347", + "totalDifficulty": "7160543502214733" + }, + "input": "0xf8ab820109855d21dba00082ca1d9443064693d3d38ad6a7cb579e0d6d9718c8aa6b6280b844a9059cbb000000000000000000000000e77b1ac803616503510bed0086e3a7be2627a69900000000000000000000000000000000000000000000000000000009502f90001ba0ce3ad83f5530136467b7c2bb225f406bd170f4ad59c254e5103c34eeabb5bd69a0455154527224a42ab405cacf0fe92918a75641ce4152f8db292019a5527aa956", + "result": { + "error": "out of gas", + "from": "0x94194bc2aaf494501d7880b61274a169f6502a54", + "gas": "0x7045", + "gasUsed": "0x7045", + "input": "0xa9059cbb000000000000000000000000e77b1ac803616503510bed0086e3a7be2627a69900000000000000000000000000000000000000000000000000000009502f9000", + "to": "0x43064693d3d38ad6a7cb579e0d6d9718c8aa6b62", + "type": "CALL", + "value": "0x0" + } +} diff --git a/eth/tracers/testdata/call_tracer_legacy/revert.json b/eth/tracers/testdata/call_tracer_legacy/revert.json new file mode 100644 index 000000000000..059040a1c811 --- /dev/null +++ b/eth/tracers/testdata/call_tracer_legacy/revert.json @@ -0,0 +1,58 @@ +{ + "context": { + "difficulty": "3665057456", + "gasLimit": "5232723", + "miner": "0xf4d8e706cfb25c0decbbdd4d2e2cc10c66376a3f", + "number": "2294501", + "timestamp": "1513673601" + }, + "genesis": { + "alloc": { + "0x0f6cef2b7fbb504782e35aa82a2207e816a2b7a9": { + "balance": "0x2a3fc32bcc019283", + "code": "0x", + "nonce": "10", + "storage": {} + }, + "0xabbcd5b340c80b5f1c0545c04c987b87310296ae": { + "balance": "0x0", + "code": "0x606060405236156100755763ffffffff7c01000000000000000000000000000000000000000000000000000000006000350416632d0335ab811461007a578063548db174146100ab5780637f649783146100fc578063b092145e1461014d578063c3f44c0a14610186578063c47cf5de14610203575b600080fd5b341561008557600080fd5b610099600160a060020a0360043516610270565b60405190815260200160405180910390f35b34156100b657600080fd5b6100fa600460248135818101908301358060208181020160405190810160405280939291908181526020018383602002808284375094965061028f95505050505050565b005b341561010757600080fd5b6100fa600460248135818101908301358060208181020160405190810160405280939291908181526020018383602002808284375094965061029e95505050505050565b005b341561015857600080fd5b610172600160a060020a03600435811690602435166102ad565b604051901515815260200160405180910390f35b341561019157600080fd5b6100fa6004803560ff1690602480359160443591606435600160a060020a0316919060a49060843590810190830135806020601f8201819004810201604051908101604052818152929190602084018383808284375094965050509235600160a060020a031692506102cd915050565b005b341561020e57600080fd5b61025460046024813581810190830135806020601f8201819004810201604051908101604052818152929190602084018383808284375094965061056a95505050505050565b604051600160a060020a03909116815260200160405180910390f35b600160a060020a0381166000908152602081905260409020545b919050565b61029a816000610594565b5b50565b61029a816001610594565b5b50565b600160209081526000928352604080842090915290825290205460ff1681565b60008080600160a060020a038416158061030d5750600160a060020a038085166000908152600160209081526040808320339094168352929052205460ff165b151561031857600080fd5b6103218561056a565b600160a060020a038116600090815260208190526040808220549295507f19000000000000000000000000000000000000000000000000000000000000009230918891908b908b90517fff000000000000000000000000000000000000000000000000000000000000008089168252871660018201526c01000000000000000000000000600160a060020a038088168202600284015286811682026016840152602a8301869052841602604a820152605e810182805190602001908083835b6020831061040057805182525b601f1990920191602091820191016103e0565b6001836020036101000a0380198251168184511617909252505050919091019850604097505050505050505051809103902091506001828a8a8a6040516000815260200160405260006040516020015260405193845260ff90921660208085019190915260408085019290925260608401929092526080909201915160208103908084039060008661646e5a03f1151561049957600080fd5b5050602060405103519050600160a060020a03838116908216146104bc57600080fd5b600160a060020a0380841660009081526020819052604090819020805460010190559087169086905180828051906020019080838360005b8381101561050d5780820151818401525b6020016104f4565b50505050905090810190601f16801561053a5780820380516001836020036101000a031916815260200191505b5091505060006040518083038160008661646e5a03f1915050151561055e57600080fd5b5b505050505050505050565b600060248251101561057e5750600061028a565b600160a060020a0360248301511690505b919050565b60005b825181101561060157600160a060020a033316600090815260016020526040812083918584815181106105c657fe5b90602001906020020151600160a060020a031681526020810191909152604001600020805460ff19169115159190911790555b600101610597565b5b5050505600a165627a7a723058200027e8b695e9d2dea9f3629519022a69f3a1d23055ce86406e686ea54f31ee9c0029", + "nonce": "1", + "storage": {} + } + }, + "config": { + "byzantiumBlock": 1700000, + "chainId": 3, + "daoForkSupport": true, + "eip150Block": 0, + "eip150Hash": "0x41941023680923e0fe4d74a34bdac8141f2540e3ae90623718e47d66d1ca4a2d", + "eip155Block": 10, + "eip158Block": 10, + "ethash": {}, + "homesteadBlock": 0 + }, + "difficulty": "3672229776", + "extraData": "0x4554482e45544846414e532e4f52472d4641313738394444", + "gasLimit": "5227619", + "hash": "0xa07b3d6c6bf63f5f981016db9f2d1d93033833f2c17e8bf7209e85f1faf08076", + "miner": "0xbbf5029fd710d227630c8b7d338051b8e76d50b3", + "mixHash": "0x806e151ce2817be922e93e8d5921fa0f0d0fd213d6b2b9a3fa17458e74a163d0", + "nonce": "0xbc5d43adc2c30c7d", + "number": "2294500", + "stateRoot": "0xca645b335888352ef9d8b1ef083e9019648180b259026572e3139717270de97d", + "timestamp": "1513673552", + "totalDifficulty": "7160066586979149" + }, + "input": "0xf9018b0a8505d21dba00832dc6c094abbcd5b340c80b5f1c0545c04c987b87310296ae80b9012473b40a5c000000000000000000000000400de2e016bda6577407dfc379faba9899bc73ef0000000000000000000000002cc31912b2b0f3075a87b3640923d45a26cef3ee000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000800000000000000000000000000000000000000000000000000000000000000064d79d8e6c7265636f76657279416464726573730000000000000000000000000000000000000000000000000000000000383e3ec32dc0f66d8fe60dbdc2f6815bdf73a988383e3ec32dc0f66d8fe60dbdc2f6815bdf73a988000000000000000000000000000000000000000000000000000000000000000000000000000000001ba0fd659d76a4edbd2a823e324c93f78ad6803b30ff4a9c8bce71ba82798975c70ca06571eecc0b765688ec6c78942c5ee8b585e00988c0141b518287e9be919bc48a", + "result": { + "error": "execution reverted", + "from": "0x0f6cef2b7fbb504782e35aa82a2207e816a2b7a9", + "gas": "0x2d55e8", + "gasUsed": "0xc3", + "input": "0x73b40a5c000000000000000000000000400de2e016bda6577407dfc379faba9899bc73ef0000000000000000000000002cc31912b2b0f3075a87b3640923d45a26cef3ee000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000800000000000000000000000000000000000000000000000000000000000000064d79d8e6c7265636f76657279416464726573730000000000000000000000000000000000000000000000000000000000383e3ec32dc0f66d8fe60dbdc2f6815bdf73a988383e3ec32dc0f66d8fe60dbdc2f6815bdf73a98800000000000000000000000000000000000000000000000000000000000000000000000000000000", + "to": "0xabbcd5b340c80b5f1c0545c04c987b87310296ae", + "type": "CALL", + "value": "0x0" + } +} diff --git a/eth/tracers/testdata/call_tracer_legacy/revert_reason.json b/eth/tracers/testdata/call_tracer_legacy/revert_reason.json new file mode 100644 index 000000000000..094b0446779f --- /dev/null +++ b/eth/tracers/testdata/call_tracer_legacy/revert_reason.json @@ -0,0 +1,64 @@ +{ + "context": { + "difficulty": "2", + "gasLimit": "8000000", + "miner": "0x0000000000000000000000000000000000000000", + "number": "3212651", + "timestamp": "1597246515" + }, + "genesis": { + "alloc": { + "0xf58833cf0c791881b494eb79d461e08a1f043f52": { + "balance": "0x0", + "code": "0x608060405234801561001057600080fd5b50600436106100a5576000357c010000000000000000000000000000000000000000000000000000000090048063609ff1bd11610078578063609ff1bd146101af5780639e7b8d61146101cd578063a3ec138d14610211578063e2ba53f0146102ae576100a5565b80630121b93f146100aa578063013cf08b146100d85780632e4176cf146101215780635c19a95c1461016b575b600080fd5b6100d6600480360360208110156100c057600080fd5b81019080803590602001909291905050506102cc565b005b610104600480360360208110156100ee57600080fd5b8101908080359060200190929190505050610469565b604051808381526020018281526020019250505060405180910390f35b61012961049a565b604051808273ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff16815260200191505060405180910390f35b6101ad6004803603602081101561018157600080fd5b81019080803573ffffffffffffffffffffffffffffffffffffffff1690602001909291905050506104bf565b005b6101b76108db565b6040518082815260200191505060405180910390f35b61020f600480360360208110156101e357600080fd5b81019080803573ffffffffffffffffffffffffffffffffffffffff169060200190929190505050610952565b005b6102536004803603602081101561022757600080fd5b81019080803573ffffffffffffffffffffffffffffffffffffffff169060200190929190505050610b53565b60405180858152602001841515151581526020018373ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff16815260200182815260200194505050505060405180910390f35b6102b6610bb0565b6040518082815260200191505060405180910390f35b6000600160003373ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff168152602001908152602001600020905060008160000154141561038a576040517f08c379a00000000000000000000000000000000000000000000000000000000081526004018080602001828103825260148152602001807f486173206e6f20726967687420746f20766f746500000000000000000000000081525060200191505060405180910390fd5b8060010160009054906101000a900460ff161561040f576040517f08c379a000000000000000000000000000000000000000000000000000000000815260040180806020018281038252600e8152602001807f416c726561647920766f7465642e00000000000000000000000000000000000081525060200191505060405180910390fd5b60018160010160006101000a81548160ff02191690831515021790555081816002018190555080600001546002838154811061044757fe5b9060005260206000209060020201600101600082825401925050819055505050565b6002818154811061047657fe5b90600052602060002090600202016000915090508060000154908060010154905082565b6000809054906101000a900473ffffffffffffffffffffffffffffffffffffffff1681565b6000600160003373ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff16815260200190815260200160002090508060010160009054906101000a900460ff1615610587576040517f08c379a00000000000000000000000000000000000000000000000000000000081526004018080602001828103825260128152602001807f596f7520616c726561647920766f7465642e000000000000000000000000000081525060200191505060405180910390fd5b3373ffffffffffffffffffffffffffffffffffffffff168273ffffffffffffffffffffffffffffffffffffffff161415610629576040517f08c379a000000000000000000000000000000000000000000000000000000000815260040180806020018281038252601e8152602001807f53656c662d64656c65676174696f6e20697320646973616c6c6f7765642e000081525060200191505060405180910390fd5b5b600073ffffffffffffffffffffffffffffffffffffffff16600160008473ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff16815260200190815260200160002060010160019054906101000a900473ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff16146107cc57600160008373ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff16815260200190815260200160002060010160019054906101000a900473ffffffffffffffffffffffffffffffffffffffff1691503373ffffffffffffffffffffffffffffffffffffffff168273ffffffffffffffffffffffffffffffffffffffff1614156107c7576040517f08c379a00000000000000000000000000000000000000000000000000000000081526004018080602001828103825260198152602001807f466f756e64206c6f6f7020696e2064656c65676174696f6e2e0000000000000081525060200191505060405180910390fd5b61062a565b60018160010160006101000a81548160ff021916908315150217905550818160010160016101000a81548173ffffffffffffffffffffffffffffffffffffffff021916908373ffffffffffffffffffffffffffffffffffffffff1602179055506000600160008473ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff16815260200190815260200160002090508060010160009054906101000a900460ff16156108bf578160000154600282600201548154811061089c57fe5b9060005260206000209060020201600101600082825401925050819055506108d6565b816000015481600001600082825401925050819055505b505050565b6000806000905060008090505b60028054905081101561094d57816002828154811061090357fe5b9060005260206000209060020201600101541115610940576002818154811061092857fe5b90600052602060002090600202016001015491508092505b80806001019150506108e8565b505090565b6000809054906101000a900473ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff163373ffffffffffffffffffffffffffffffffffffffff16146109f7576040517f08c379a0000000000000000000000000000000000000000000000000000000008152600401808060200182810382526028815260200180610bde6028913960400191505060405180910390fd5b600160008273ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff16815260200190815260200160002060010160009054906101000a900460ff1615610aba576040517f08c379a00000000000000000000000000000000000000000000000000000000081526004018080602001828103825260188152602001807f54686520766f74657220616c726561647920766f7465642e000000000000000081525060200191505060405180910390fd5b6000600160008373ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff1681526020019081526020016000206000015414610b0957600080fd5b60018060008373ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff1681526020019081526020016000206000018190555050565b60016020528060005260406000206000915090508060000154908060010160009054906101000a900460ff16908060010160019054906101000a900473ffffffffffffffffffffffffffffffffffffffff16908060020154905084565b60006002610bbc6108db565b81548110610bc657fe5b90600052602060002090600202016000015490509056fe4f6e6c79206368616972706572736f6e2063616e206769766520726967687420746f20766f74652ea26469706673582212201d282819f8f06fed792100d60a8b08809b081a34a1ecd225e83a4b41122165ed64736f6c63430006060033", + "nonce": "1", + "storage": { + "0x6200beec95762de01ce05f2a0e58ce3299dbb53c68c9f3254a242121223cdf58": "0x0000000000000000000000000000000000000000000000000000000000000000" + } + }, + "0xf7579c3d8a669c89d5ed246a22eb6db8f6fedbf1": { + "balance": "0x57af9d6b3df812900", + "code": "0x", + "nonce": "6", + "storage": {} + } + }, + "config": { + "byzantiumBlock": 0, + "constantinopleBlock": 0, + "petersburgBlock": 0, + "IstanbulBlock":1561651, + "chainId": 5, + "daoForkSupport": true, + "eip150Block": 0, + "eip150Hash": "0x0000000000000000000000000000000000000000000000000000000000000000", + "eip155Block": 10, + "eip158Block": 10, + "ethash": {}, + "homesteadBlock": 0 + }, + "difficulty": "3509749784", + "extraData": "0x4554482e45544846414e532e4f52472d4641313738394444", + "gasLimit": "4727564", + "hash": "0x609948ac3bd3c00b7736b933248891d6c901ee28f066241bddb28f4e00a9f440", + "miner": "0xbbf5029fd710d227630c8b7d338051b8e76d50b3", + "mixHash": "0xb131e4507c93c7377de00e7c271bf409ec7492767142ff0f45c882f8068c2ada", + "nonce": "0x4eb12e19c16d43da", + "number": "2289805", + "stateRoot": "0xc7f10f352bff82fac3c2999d3085093d12652e19c7fd32591de49dc5d91b4f1f", + "timestamp": "1513601261", + "totalDifficulty": "7143276353481064" + }, + "input": "0xf888068449504f80832dc6c094f58833cf0c791881b494eb79d461e08a1f043f5280a45c19a95c000000000000000000000000f7579c3d8a669c89d5ed246a22eb6db8f6fedbf12da0264664db3e71fae1dbdaf2f53954be149ad3b7ba8a5054b4d89c70febfacc8b1a0212e8398757963f419681839ae8c5a54b411e252473c82d93dda68405ca63294", + "result": { + "error": "execution reverted", + "from": "0xf7579c3d8a669c89d5ed246a22eb6db8f6fedbf1", + "gas": "0x2d7308", + "gasUsed": "0x588", + "input": "0x5c19a95c000000000000000000000000f7579c3d8a669c89d5ed246a22eb6db8f6fedbf1", + "to": "0xf58833cf0c791881b494eb79d461e08a1f043f52", + "type": "CALL", + "value": "0x0", + "output": "0x08c379a00000000000000000000000000000000000000000000000000000000000000020000000000000000000000000000000000000000000000000000000000000001e53656c662d64656c65676174696f6e20697320646973616c6c6f7765642e0000" + } +} diff --git a/eth/tracers/testdata/call_tracer_legacy/selfdestruct.json b/eth/tracers/testdata/call_tracer_legacy/selfdestruct.json new file mode 100644 index 000000000000..132cefa1681a --- /dev/null +++ b/eth/tracers/testdata/call_tracer_legacy/selfdestruct.json @@ -0,0 +1,73 @@ +{ + "context": { + "difficulty": "3502894804", + "gasLimit": "4722976", + "miner": "0x1585936b53834b021f68cc13eeefdec2efc8e724", + "number": "2289806", + "timestamp": "1513601314" + }, + "genesis": { + "alloc": { + "0x0024f658a46fbb89d8ac105e98d7ac7cbbaf27c5": { + "balance": "0x0", + "code": "0x", + "nonce": "22", + "storage": {} + }, + "0x3b873a919aa0512d5a0f09e6dcceaa4a6727fafe": { + "balance": "0x4d87094125a369d9bd5", + "code": "0x61deadff", + "nonce": "1", + "storage": {} + }, + "0xb436ba50d378d4bbc8660d312a13df6af6e89dfb": { + "balance": "0x1780d77678137ac1b775", + "code": "0x", + "nonce": "29072", + "storage": {} + } + }, + "config": { + "byzantiumBlock": 1700000, + "chainId": 3, + "daoForkSupport": true, + "eip150Block": 0, + "eip150Hash": "0x41941023680923e0fe4d74a34bdac8141f2540e3ae90623718e47d66d1ca4a2d", + "eip155Block": 10, + "eip158Block": 10, + "ethash": {}, + "homesteadBlock": 0 + }, + "difficulty": "3509749784", + "extraData": "0x4554482e45544846414e532e4f52472d4641313738394444", + "gasLimit": "4727564", + "hash": "0x609948ac3bd3c00b7736b933248891d6c901ee28f066241bddb28f4e00a9f440", + "miner": "0xbbf5029fd710d227630c8b7d338051b8e76d50b3", + "mixHash": "0xb131e4507c93c7377de00e7c271bf409ec7492767142ff0f45c882f8068c2ada", + "nonce": "0x4eb12e19c16d43da", + "number": "2289805", + "stateRoot": "0xc7f10f352bff82fac3c2999d3085093d12652e19c7fd32591de49dc5d91b4f1f", + "timestamp": "1513601261", + "totalDifficulty": "7143276353481064" + }, + "input": "0xf88b8271908506fc23ac0083015f90943b873a919aa0512d5a0f09e6dcceaa4a6727fafe80a463e4bff40000000000000000000000000024f658a46fbb89d8ac105e98d7ac7cbbaf27c52aa0bdce0b59e8761854e857fe64015f06dd08a4fbb7624f6094893a79a72e6ad6bea01d9dde033cff7bb235a3163f348a6d7ab8d6b52bc0963a95b91612e40ca766a4", + "result": { + "calls": [ + { + "from": "0x3b873a919aa0512d5a0f09e6dcceaa4a6727fafe", + "input": "0x", + "to": "0x000000000000000000000000000000000000dEaD", + "type": "SELFDESTRUCT", + "value": "0x4d87094125a369d9bd5" + } + ], + "from": "0xb436ba50d378d4bbc8660d312a13df6af6e89dfb", + "gas": "0x10738", + "gasUsed": "0x7533", + "input": "0x63e4bff40000000000000000000000000024f658a46fbb89d8ac105e98d7ac7cbbaf27c5", + "output": "0x", + "to": "0x3b873a919aa0512d5a0f09e6dcceaa4a6727fafe", + "type": "CALL", + "value": "0x0" + } +} diff --git a/eth/tracers/testdata/call_tracer_legacy/simple.json b/eth/tracers/testdata/call_tracer_legacy/simple.json new file mode 100644 index 000000000000..b46432122dd0 --- /dev/null +++ b/eth/tracers/testdata/call_tracer_legacy/simple.json @@ -0,0 +1,78 @@ +{ + "context": { + "difficulty": "3502894804", + "gasLimit": "4722976", + "miner": "0x1585936b53834b021f68cc13eeefdec2efc8e724", + "number": "2289806", + "timestamp": "1513601314" + }, + "genesis": { + "alloc": { + "0x0024f658a46fbb89d8ac105e98d7ac7cbbaf27c5": { + "balance": "0x0", + "code": "0x", + "nonce": "22", + "storage": {} + }, + "0x3b873a919aa0512d5a0f09e6dcceaa4a6727fafe": { + "balance": "0x4d87094125a369d9bd5", + "code": "0x606060405236156100935763ffffffff60e060020a60003504166311ee8382811461009c57806313af4035146100be5780631f5e8f4c146100ee57806324daddc5146101125780634921a91a1461013b57806363e4bff414610157578063764978f91461017f578063893d20e8146101a1578063ba40aaa1146101cd578063cebc9a82146101f4578063e177246e14610216575b61009a5b5b565b005b34156100a457fe5b6100ac61023d565b60408051918252519081900360200190f35b34156100c657fe5b6100da600160a060020a0360043516610244565b604080519115158252519081900360200190f35b34156100f657fe5b6100da610307565b604080519115158252519081900360200190f35b341561011a57fe5b6100da6004351515610318565b604080519115158252519081900360200190f35b6100da6103d6565b604080519115158252519081900360200190f35b6100da600160a060020a0360043516610420565b604080519115158252519081900360200190f35b341561018757fe5b6100ac61046c565b60408051918252519081900360200190f35b34156101a957fe5b6101b1610473565b60408051600160a060020a039092168252519081900360200190f35b34156101d557fe5b6100da600435610483565b604080519115158252519081900360200190f35b34156101fc57fe5b6100ac61050d565b60408051918252519081900360200190f35b341561021e57fe5b6100da600435610514565b604080519115158252519081900360200190f35b6003545b90565b60006000610250610473565b600160a060020a031633600160a060020a03161415156102705760006000fd5b600160a060020a03831615156102865760006000fd5b50600054600160a060020a0390811690831681146102fb57604051600160a060020a0380851691908316907ffcf23a92150d56e85e3a3d33b357493246e55783095eb6a733eb8439ffc752c890600090a360008054600160a060020a031916600160a060020a03851617905560019150610300565b600091505b5b50919050565b60005460a060020a900460ff165b90565b60006000610324610473565b600160a060020a031633600160a060020a03161415156103445760006000fd5b5060005460a060020a900460ff16801515831515146102fb576000546040805160a060020a90920460ff1615158252841515602083015280517fe6cd46a119083b86efc6884b970bfa30c1708f53ba57b86716f15b2f4551a9539281900390910190a16000805460a060020a60ff02191660a060020a8515150217905560019150610300565b600091505b5b50919050565b60006103e0610307565b801561040557506103ef610473565b600160a060020a031633600160a060020a031614155b156104105760006000fd5b610419336105a0565b90505b5b90565b600061042a610307565b801561044f5750610439610473565b600160a060020a031633600160a060020a031614155b1561045a5760006000fd5b610463826105a0565b90505b5b919050565b6001545b90565b600054600160a060020a03165b90565b6000600061048f610473565b600160a060020a031633600160a060020a03161415156104af5760006000fd5b506001548281146102fb57604080518281526020810185905281517f79a3746dde45672c9e8ab3644b8bb9c399a103da2dc94b56ba09777330a83509929181900390910190a160018381559150610300565b600091505b5b50919050565b6002545b90565b60006000610520610473565b600160a060020a031633600160a060020a03161415156105405760006000fd5b506002548281146102fb57604080518281526020810185905281517ff6991a728965fedd6e927fdf16bdad42d8995970b4b31b8a2bf88767516e2494929181900390910190a1600283905560019150610300565b600091505b5b50919050565b60006000426105ad61023d565b116102fb576105c46105bd61050d565b4201610652565b6105cc61046c565b604051909150600160a060020a038416908290600081818185876187965a03f1925050501561063d57604080518281529051600160a060020a038516917f9bca65ce52fdef8a470977b51f247a2295123a4807dfa9e502edf0d30722da3b919081900360200190a260019150610300565b6102fb42610652565b5b600091505b50919050565b60038190555b505600a165627a7a72305820f3c973c8b7ed1f62000b6701bd5b708469e19d0f1d73fde378a56c07fd0b19090029", + "nonce": "1", + "storage": { + "0x0000000000000000000000000000000000000000000000000000000000000000": "0x000000000000000000000001b436ba50d378d4bbc8660d312a13df6af6e89dfb", + "0x0000000000000000000000000000000000000000000000000000000000000001": "0x00000000000000000000000000000000000000000000000006f05b59d3b20000", + "0x0000000000000000000000000000000000000000000000000000000000000002": "0x000000000000000000000000000000000000000000000000000000000000003c", + "0x0000000000000000000000000000000000000000000000000000000000000003": "0x000000000000000000000000000000000000000000000000000000005a37b834" + } + }, + "0xb436ba50d378d4bbc8660d312a13df6af6e89dfb": { + "balance": "0x1780d77678137ac1b775", + "code": "0x", + "nonce": "29072", + "storage": {} + } + }, + "config": { + "byzantiumBlock": 1700000, + "chainId": 3, + "daoForkSupport": true, + "eip150Block": 0, + "eip150Hash": "0x41941023680923e0fe4d74a34bdac8141f2540e3ae90623718e47d66d1ca4a2d", + "eip155Block": 10, + "eip158Block": 10, + "ethash": {}, + "homesteadBlock": 0 + }, + "difficulty": "3509749784", + "extraData": "0x4554482e45544846414e532e4f52472d4641313738394444", + "gasLimit": "4727564", + "hash": "0x609948ac3bd3c00b7736b933248891d6c901ee28f066241bddb28f4e00a9f440", + "miner": "0xbbf5029fd710d227630c8b7d338051b8e76d50b3", + "mixHash": "0xb131e4507c93c7377de00e7c271bf409ec7492767142ff0f45c882f8068c2ada", + "nonce": "0x4eb12e19c16d43da", + "number": "2289805", + "stateRoot": "0xc7f10f352bff82fac3c2999d3085093d12652e19c7fd32591de49dc5d91b4f1f", + "timestamp": "1513601261", + "totalDifficulty": "7143276353481064" + }, + "input": "0xf88b8271908506fc23ac0083015f90943b873a919aa0512d5a0f09e6dcceaa4a6727fafe80a463e4bff40000000000000000000000000024f658a46fbb89d8ac105e98d7ac7cbbaf27c52aa0bdce0b59e8761854e857fe64015f06dd08a4fbb7624f6094893a79a72e6ad6bea01d9dde033cff7bb235a3163f348a6d7ab8d6b52bc0963a95b91612e40ca766a4", + "result": { + "calls": [ + { + "from": "0x3b873a919aa0512d5a0f09e6dcceaa4a6727fafe", + "input": "0x", + "to": "0x0024f658a46fbb89d8ac105e98d7ac7cbbaf27c5", + "type": "CALL", + "value": "0x6f05b59d3b20000" + } + ], + "from": "0xb436ba50d378d4bbc8660d312a13df6af6e89dfb", + "gas": "0x10738", + "gasUsed": "0x3ef9", + "input": "0x63e4bff40000000000000000000000000024f658a46fbb89d8ac105e98d7ac7cbbaf27c5", + "output": "0x0000000000000000000000000000000000000000000000000000000000000001", + "to": "0x3b873a919aa0512d5a0f09e6dcceaa4a6727fafe", + "type": "CALL", + "value": "0x0" + } +} diff --git a/eth/tracers/testdata/call_tracer_legacy/throw.json b/eth/tracers/testdata/call_tracer_legacy/throw.json new file mode 100644 index 000000000000..09cf449776fb --- /dev/null +++ b/eth/tracers/testdata/call_tracer_legacy/throw.json @@ -0,0 +1,62 @@ +{ + "context": { + "difficulty": "117009631", + "gasLimit": "4712388", + "miner": "0x294e5d6c39a36ce38af1dca70c1060f78dee8070", + "number": "25009", + "timestamp": "1479891666" + }, + "genesis": { + "alloc": { + "0x70c9217d814985faef62b124420f8dfbddd96433": { + "balance": "0x4ecd70668f5d854a", + "code": "0x", + "nonce": "1638", + "storage": {} + }, + "0xc212e03b9e060e36facad5fd8f4435412ca22e6b": { + "balance": "0x0", + "code": "0x606060405236156101745760e060020a600035046302d05d3f811461017c57806304a7fdbc1461018e5780630e90f957146101fb5780630fb5a6b41461021257806314baa1b61461021b57806317fc45e21461023a5780632b096926146102435780632e94420f1461025b578063325a19f11461026457806336da44681461026d5780633f81a2c01461027f5780633fc306821461029757806345ecd3d7146102d45780634665096d146102dd5780634e71d92d146102e657806351a34eb8146103085780636111bb951461032d5780636f265b93146103445780637e9014e11461034d57806390ba009114610360578063927df5e014610393578063a7f437791461046c578063ad8f50081461046e578063bc6d909414610477578063bdec3ad114610557578063c19d93fb1461059a578063c9503fe2146105ad578063e0a73a93146105b6578063ea71b02d146105bf578063ea8a1af0146105d1578063ee4a96f9146105f3578063f1ff78a01461065c575b61046c610002565b610665600054600160a060020a031681565b6040805160c081810190925261046c9160049160c4918390600690839083908082843760408051808301909152929750909561018495509193509091908390839080828437509095505050505050600554600090600160a060020a0390811633909116146106a857610002565b61068260015460a060020a900460ff166000145b90565b61069660085481565b61046c600435600154600160a060020a03166000141561072157610002565b610696600d5481565b610696600435600f8160068110156100025750015481565b61069660045481565b61069660035481565b610665600554600160a060020a031681565b61069660043560158160068110156100025750015481565b6106966004355b600b54600f5460009160028202808203928083039290810191018386101561078357601054840186900394505b50505050919050565b61069660025481565b61069660095481565b61046c600554600090600160a060020a03908116339091161461085857610002565b61046c600435600554600090600160a060020a03908116339091161461092e57610002565b6106826001805460a060020a900460ff161461020f565b610696600b5481565b61068260075460a060020a900460ff1681565b6106966004355b600b54601554600091600282028082039280830392908101910183861015610a6c5760165494506102cb565b61046c6004356024356044356040805160015460e360020a631c2d8fb302825260b260020a691858d8dbdd5b9d18dd1b02600483015291516000928392600160a060020a03919091169163e16c7d9891602481810192602092909190829003018187876161da5a03f1156100025750505060405180519060200150905080600160a060020a031663c4b0c96a336040518260e060020a0281526004018082600160a060020a031681526020019150506020604051808303816000876161da5a03f1156100025750506040515115159050610b4657610002565b005b610696600a5481565b61046c60006000600060006000600160009054906101000a9004600160a060020a0316600160a060020a031663e16c7d986040518160e060020a028152600401808060b260020a691858d8dbdd5b9d18dd1b0281526020015060200190506020604051808303816000876161da5a03f1156100025750505060405180519060200150905080600160a060020a031663c4b0c96a336040518260e060020a0281526004018082600160a060020a031681526020019150506020604051808303816000876161da5a03f1156100025750506040515115159050610f1757610002565b61046c5b60015b60058160ff16101561071e57600f6001820160ff166006811015610002578101549060ff83166006811015610002570154101561129057610002565b61069660015460a060020a900460ff1681565b61069660065481565b610696600c5481565b610665600754600160a060020a031681565b61046c600554600090600160a060020a0390811633909116146112c857610002565b6040805160c081810190925261046c9160049160c4918390600690839083908082843760408051808301909152929750909561018495509193509091908390839080828437509095505050505050600154600090600160a060020a03168114156113fb57610002565b610696600e5481565b60408051600160a060020a03929092168252519081900360200190f35b604080519115158252519081900360200190f35b60408051918252519081900360200190f35b5060005b60068160ff16101561070857828160ff166006811015610002576020020151600f60ff831660068110156100025701558160ff82166006811015610002576020020151601560ff831660068110156100025701556001016106ac565b61071061055b565b505050565b600e8054820190555b50565b6040805160015460e060020a6313bc6d4b02825233600160a060020a03908116600484015292519216916313bc6d4b9160248181019260209290919082900301816000876161da5a03f115610002575050604051511515905061071557610002565b83861015801561079257508286105b156107b457600f546010546011548689039082030291909104900394506102cb565b8286101580156107c55750600b5486105b156107e757600f546011546012548589039082030291909104900394506102cb565b600b5486108015906107f857508186105b1561081d57600b54600f546012546013549289039281039290920204900394506102cb565b81861015801561082c57508086105b1561084e57600f546013546014548489039082030291909104900394506102cb565b60145494506102cb565b60015460a060020a900460ff1660001461087157610002565b600254600a01431161088257610002565b6040805160015460e360020a631c2d8fb302825260a860020a6a636f6e74726163746170690260048301529151600160a060020a03929092169163e16c7d989160248181019260209290919082900301816000876161da5a03f1156100025750505060405180519060200150905080600160a060020a031663771d50e16040518160e060020a0281526004018090506000604051808303816000876161da5a03f1156100025750505050565b60015460a060020a900460ff1660001461094757610002565b600254600a01431161095857610002565b6040805160015460e360020a631c2d8fb302825260a860020a6a636f6e74726163746170690260048301529151600160a060020a03929092169163e16c7d989160248181019260209290919082900301816000876161da5a03f1156100025750506040805180517f51a34eb8000000000000000000000000000000000000000000000000000000008252600482018690529151919350600160a060020a03841692506351a34eb8916024808301926000929190829003018183876161da5a03f11561000257505050600b8290554360025560408051838152905130600160a060020a0316917fa609f6bd4ad0b4f419ddad4ac9f0d02c2b9295c5e6891469055cf73c2b568fff919081900360200190a25050565b838610158015610a7b57508286105b15610a9d576015546016546017548689039082900302919091040194506102cb565b828610158015610aae5750600b5486105b15610ad0576015546017546018548589039082900302919091040194506102cb565b600b548610801590610ae157508186105b15610b0657600b546015546018546019549289039281900392909202040194506102cb565b818610158015610b1557508086105b15610b3757601554601954601a548489039082900302919091040194506102cb565b601a54860181900394506102cb565b60015460a060020a900460ff16600014610b5f57610002565b6001805460a060020a60ff02191660a060020a17908190556040805160e360020a631c2d8fb302815260a860020a6a636f6e74726163746170690260048201529051600160a060020a03929092169163e16c7d989160248181019260209290919082900301816000876161da5a03f1156100025750506040805180516004805460e260020a633e4baddd028452908301529151919450600160a060020a038516925063f92eb77491602482810192602092919082900301816000876161da5a03f115610002575050604080518051600a556005547ffebf661200000000000000000000000000000000000000000000000000000000825233600160a060020a03908116600484015216602482015260448101879052905163febf661291606480820192600092909190829003018183876161da5a03f115610002575050508215610cc7576007805473ffffffffffffffffffffffffffffffffffffffff191633179055610dbb565b6040805160055460065460e060020a63599efa6b028352600160a060020a039182166004840152602483015291519184169163599efa6b91604481810192600092909190829003018183876161da5a03f115610002575050604080516006547f56ccb6f000000000000000000000000000000000000000000000000000000000825233600160a060020a03166004830152602482015290516356ccb6f091604480820192600092909190829003018183876161da5a03f115610002575050600580546007805473ffffffffffffffffffffffffffffffffffffffff19908116600160a060020a038416179091551633179055505b6007805460a060020a60ff02191660a060020a87810291909117918290556008544301600955900460ff1615610df757600a54610e039061029e565b600a54610e0b90610367565b600c55610e0f565b600c555b600c54670de0b6b3a7640000850204600d55600754600554604080517f759297bb000000000000000000000000000000000000000000000000000000008152600160a060020a039384166004820152918316602483015260448201879052519184169163759297bb91606481810192600092909190829003018183876161da5a03f11561000257505060408051600754600a54600d54600554600c5460a060020a850460ff161515865260208601929092528486019290925260608401529251600160a060020a0391821694509281169230909116917f3b3d1986083d191be01d28623dc19604728e29ae28bdb9ba52757fdee1a18de2919081900360800190a45050505050565b600954431015610f2657610002565b6001805460a060020a900460ff1614610f3e57610002565b6001805460a060020a60ff0219167402000000000000000000000000000000000000000017908190556040805160e360020a631c2d8fb302815260a860020a6a636f6e74726163746170690260048201529051600160a060020a03929092169163e16c7d989160248181019260209290919082900301816000876161da5a03f1156100025750506040805180516004805460e260020a633e4baddd028452908301529151919750600160a060020a038816925063f92eb77491602482810192602092919082900301816000876161da5a03f115610002575050604051516007549095506000945060a060020a900460ff1615905061105c57600a5484111561105757600a54600d54670de0b6b3a7640000918603020492505b61107e565b600a5484101561107e57600a54600d54670de0b6b3a764000091869003020492505b60065483111561108e5760065492505b6006548390039150600083111561111857604080516005546007547f5928d37f000000000000000000000000000000000000000000000000000000008352600160a060020a0391821660048401528116602483015260448201869052915191871691635928d37f91606481810192600092909190829003018183876161da5a03f115610002575050505b600082111561117a576040805160055460e060020a63599efa6b028252600160a060020a0390811660048301526024820185905291519187169163599efa6b91604481810192600092909190829003018183876161da5a03f115610002575050505b6040805185815260208101849052808201859052905130600160a060020a0316917f89e690b1d5aaae14f3e85f108dc92d9ab3763a58d45aed8b59daedbbae8fe794919081900360600190a260008311156112285784600160a060020a0316634cc927d785336040518360e060020a0281526004018083815260200182600160a060020a03168152602001925050506000604051808303816000876161da5a03f11561000257505050611282565b84600160a060020a0316634cc927d7600a60005054336040518360e060020a0281526004018083815260200182600160a060020a03168152602001925050506000604051808303816000876161da5a03f115610002575050505b600054600160a060020a0316ff5b60156001820160ff166006811015610002578101549060ff8316600681101561000257015411156112c057610002565b60010161055e565b60015460a060020a900460ff166000146112e157610002565b600254600a0143116112f257610002565b6001546040805160e360020a631c2d8fb302815260a860020a6a636f6e74726163746170690260048201529051600160a060020a03929092169163e16c7d989160248181019260209290919082900301816000876161da5a03f11561000257505060408051805160055460065460e060020a63599efa6b028452600160a060020a03918216600485015260248401529251909450918416925063599efa6b916044808301926000929190829003018183876161da5a03f1156100025750505080600160a060020a0316632b68bb2d6040518160e060020a0281526004018090506000604051808303816000876161da5a03f115610002575050600054600160a060020a03169050ff5b6001546040805160e060020a6313bc6d4b02815233600160a060020a039081166004830152915191909216916313bc6d4b91602480830192602092919082900301816000876161da5a03f11561000257505060405151151590506106a85761000256", + "nonce": "1", + "storage": { + "0x0000000000000000000000000000000000000000000000000000000000000001": "0x0000000000000000000000002cccf5e0538493c235d1c5ef6580f77d99e91396", + "0x0000000000000000000000000000000000000000000000000000000000000002": "0x00000000000000000000000000000000000000000000000000000000000061a9", + "0x0000000000000000000000000000000000000000000000000000000000000005": "0x00000000000000000000000070c9217d814985faef62b124420f8dfbddd96433" + } + } + }, + "config": { + "byzantiumBlock": 1700000, + "chainId": 3, + "daoForkSupport": true, + "eip150Block": 0, + "eip150Hash": "0x41941023680923e0fe4d74a34bdac8141f2540e3ae90623718e47d66d1ca4a2d", + "eip155Block": 10, + "eip158Block": 10, + "ethash": {}, + "homesteadBlock": 0 + }, + "difficulty": "117066792", + "extraData": "0xd783010502846765746887676f312e372e33856c696e7578", + "gasLimit": "4712388", + "hash": "0xe23e8d4562a1045b70cbc99fefb20c101a8f0fc8559a80d65fea8896e2f1d46e", + "miner": "0x71842f946b98800fe6feb49f0ae4e253259031c9", + "mixHash": "0x0aada9d6e93dd4db0d09c0488dc0a048fca2ccdc1f3fc7b83ba2a8d393a3a4ff", + "nonce": "0x70849d5838dee2e9", + "number": "25008", + "stateRoot": "0x1e01d2161794768c5b917069e73d86e8dca80cd7f3168c0597de420ab93a3b7b", + "timestamp": "1479891641", + "totalDifficulty": "1896347038589" + }, + "input": "0xf88b8206668504a817c8008303d09094c212e03b9e060e36facad5fd8f4435412ca22e6b80a451a34eb8000000000000000000000000000000000000000000000027fad02094277c000029a0692a3b4e7b2842f8dd7832e712c21e09f451f416c8976d5b8d02e8c0c2b4bea9a07645e90fc421b63dd755767fd93d3c03b4ec0c4d8fafa059558d08cf11d59750", + "result": { + "error": "invalid jump destination", + "from": "0x70c9217d814985faef62b124420f8dfbddd96433", + "gas": "0x37b38", + "gasUsed": "0x37b38", + "input": "0x51a34eb8000000000000000000000000000000000000000000000027fad02094277c0000", + "to": "0xc212e03b9e060e36facad5fd8f4435412ca22e6b", + "type": "CALL", + "value": "0x0" + } +} diff --git a/eth/tracers/tracers_test.go b/eth/tracers/tracers_test.go index fc5f7875afd6..43356292ba5a 100644 --- a/eth/tracers/tracers_test.go +++ b/eth/tracers/tracers_test.go @@ -204,24 +204,21 @@ func TestPrestateTracerCreate2(t *testing.T) { // Iterates over all the input-output datasets in the tracer test harness and // runs the JavaScript tracers against them. func TestCallTracer(t *testing.T) { - testCallTracer("callTracer", t) + testCallTracer("callTracer", "call_tracer_legacy", t) } -func testCallTracer(tracer string, t *testing.T) { - files, err := ioutil.ReadDir("testdata") +func testCallTracer(tracer string, dirPath string, t *testing.T) { + files, err := ioutil.ReadDir(filepath.Join("testdata", dirPath)) if err != nil { t.Fatalf("failed to retrieve tracer test suite: %v", err) } for _, file := range files { - if !strings.HasPrefix(file.Name(), "call_tracer_") { - continue - } file := file // capture range variable - t.Run(camel(strings.TrimSuffix(strings.TrimPrefix(file.Name(), "call_tracer_"), ".json")), func(t *testing.T) { + t.Run(camel(strings.TrimSuffix(file.Name(), ".json")), func(t *testing.T) { t.Parallel() // Call tracer test found, read if from disk - blob, err := ioutil.ReadFile(filepath.Join("testdata", file.Name())) + blob, err := ioutil.ReadFile(filepath.Join("testdata", dirPath, file.Name())) if err != nil { t.Fatalf("failed to read testcase: %v", err) } @@ -289,7 +286,7 @@ func testCallTracer(tracer string, t *testing.T) { func TestCallFrameTracer(t *testing.T) { t.Skip("not yet passing all tests") - testCallTracer("callframeTracer", t) + testCallTracer("callframeTracer", "call_tracer", t) } // jsonEqual is similar to reflect.DeepEqual, but does a 'bounce' via json prior to @@ -389,29 +386,35 @@ func BenchmarkTransactionTrace(b *testing.B) { } func BenchmarkTracers(b *testing.B) { - files, err := ioutil.ReadDir("testdata") + files, err := ioutil.ReadDir(filepath.Join("testdata", "call_tracer_legacy")) if err != nil { b.Fatalf("failed to retrieve tracer test suite: %v", err) } for _, file := range files { - if !strings.HasPrefix(file.Name(), "call_tracer_") { - continue - } file := file // capture range variable - b.Run(camel(strings.TrimSuffix(strings.TrimPrefix(file.Name(), "call_tracer_"), ".json")), func(b *testing.B) { + b.Run(camel(strings.TrimSuffix(file.Name(), ".json")), func(b *testing.B) { // Call tracer test found, read if from disk - blob, err := ioutil.ReadFile(filepath.Join("testdata", file.Name())) + legacyBlob, err := ioutil.ReadFile(filepath.Join("testdata", "call_tracer_legacy", file.Name())) if err != nil { b.Fatalf("failed to read testcase: %v", err) } + // Read out test for call frame tracer + blob, err := ioutil.ReadFile(filepath.Join("testdata", "call_tracer", file.Name())) + if err != nil { + b.Fatalf("failed to read testcase: %v", err) + } + legacyTest := new(callTracerTest) + if err := json.Unmarshal(legacyBlob, legacyTest); err != nil { + b.Fatalf("failed to parse testcase: %v", err) + } test := new(callTracerTest) if err := json.Unmarshal(blob, test); err != nil { b.Fatalf("failed to parse testcase: %v", err) } b.Run("legacy", func(b *testing.B) { - benchTracer("callTracer", test, b) + benchTracer("callTracer", legacyTest, b) }) b.Run("scoped", func(b *testing.B) { benchTracer("callframeTracer", test, b) From a6911918c1085c97e9999855ff35fbc4478230e0 Mon Sep 17 00:00:00 2001 From: Sina Mahmoodi Date: Wed, 15 Sep 2021 13:25:12 +0200 Subject: [PATCH 41/47] eth/tracers: minor test fix --- eth/tracers/tracers_test.go | 6 ++++++ 1 file changed, 6 insertions(+) diff --git a/eth/tracers/tracers_test.go b/eth/tracers/tracers_test.go index 43356292ba5a..b5a3e991d48b 100644 --- a/eth/tracers/tracers_test.go +++ b/eth/tracers/tracers_test.go @@ -213,6 +213,9 @@ func testCallTracer(tracer string, dirPath string, t *testing.T) { t.Fatalf("failed to retrieve tracer test suite: %v", err) } for _, file := range files { + if !strings.HasSuffix(file.Name(), ".json") { + continue + } file := file // capture range variable t.Run(camel(strings.TrimSuffix(file.Name(), ".json")), func(t *testing.T) { t.Parallel() @@ -392,6 +395,9 @@ func BenchmarkTracers(b *testing.B) { } for _, file := range files { + if !strings.HasSuffix(file.Name(), ".json") { + continue + } file := file // capture range variable b.Run(camel(strings.TrimSuffix(file.Name(), ".json")), func(b *testing.B) { // Call tracer test found, read if from disk From 6361ce845469162d182b75778a35144751c16b86 Mon Sep 17 00:00:00 2001 From: Sina Mahmoodi Date: Wed, 15 Sep 2021 13:52:45 +0200 Subject: [PATCH 42/47] eth/tracers: fix innerCreateOogOuterThrow test for callFrameTracer --- eth/tracers/internal/tracers/assets.go | 6 +++--- eth/tracers/internal/tracers/callframe_tracer.js | 3 +++ .../testdata/call_tracer/inner_create_oog_outer_throw.json | 2 +- 3 files changed, 7 insertions(+), 4 deletions(-) diff --git a/eth/tracers/internal/tracers/assets.go b/eth/tracers/internal/tracers/assets.go index 5b69319c24e3..3306bf076048 100644 --- a/eth/tracers/internal/tracers/assets.go +++ b/eth/tracers/internal/tracers/assets.go @@ -3,7 +3,7 @@ // 4byte_tracer.js (2.933kB) // bigram_tracer.js (1.712kB) // call_tracer.js (8.956kB) -// callframe_tracer.js (4.157kB) +// callframe_tracer.js (4.283kB) // evmdis_tracer.js (4.195kB) // noop_tracer.js (1.271kB) // opcount_tracer.js (1.372kB) @@ -138,7 +138,7 @@ func call_tracerJs() (*asset, error) { return a, nil } -var _callframe_tracerJs = []byte("\x1f\x8b\x08\x00\x00\x00\x00\x00\x00\xff\xd4\x57\xcd\x6e\xdb\x38\x10\x3e\xcb\x4f\x31\x9b\x43\x63\xa3\xae\x95\x74\x81\x1e\xdc\xba\x80\xb7\x48\x5a\x03\xd9\x24\x70\x9c\x2d\x82\x20\x07\xda\x1a\x49\x6c\x69\x52\x20\xa9\x38\xde\xd4\xef\xbe\x18\x52\x92\x25\xd9\x6e\xb3\xa7\xc5\xe6\x14\x0f\xbf\xf9\x66\x38\x7f\x1c\x85\x21\x7c\x52\xd9\x5a\xf3\x24\xb5\xf0\xf6\xe4\xed\x29\xcc\x52\x84\x44\xbd\x41\x9b\xa2\xc6\x7c\x09\xe3\xdc\xa6\x4a\x9b\x4e\x18\xc2\x2c\xe5\x06\x62\x2e\x10\xb8\x81\x8c\x69\x0b\x2a\x06\xdb\xc2\x0b\x3e\xd7\x4c\xaf\x07\x9d\x30\xf4\x3a\x7b\x8f\x89\x21\xd6\x88\x60\x54\x6c\x57\x4c\xe3\x10\xd6\x2a\x87\x05\x93\xa0\x31\xe2\xc6\x6a\x3e\xcf\x2d\x02\xb7\xc0\x64\x14\x2a\x0d\x4b\x15\xf1\x78\x4d\x94\xdc\x42\x2e\x23\xd4\xce\xb4\x45\xbd\x34\xa5\x1f\x9f\x2f\x6f\xe1\x02\x8d\x41\x0d\x9f\x51\xa2\x66\x02\xae\xf3\xb9\xe0\x0b\xb8\xe0\x0b\x94\x06\x81\x19\xc8\x48\x62\x52\x8c\x60\xee\xe8\x48\xf1\x9c\x5c\xb9\x29\x5c\x81\x73\x95\xcb\x88\x59\xae\x64\x1f\x90\x93\xe7\xf0\x88\xda\x70\x25\xe1\xf7\xd2\x54\x41\xd8\x07\xa5\x89\xa4\xcb\x2c\x5d\x40\x83\xca\x48\xaf\x07\x4c\xae\x41\x30\xbb\x55\x7d\x41\x40\xb6\xf7\x8e\x80\x4b\x67\x26\x55\x19\x82\x4d\x99\xa5\x5b\xaf\xb8\x10\x30\x47\xc8\x0d\xc6\xb9\xe8\x13\xdb\x3c\xb7\xf0\x75\x32\xfb\x72\x75\x3b\x83\xf1\xe5\x1d\x7c\x1d\x4f\xa7\xe3\xcb\xd9\xdd\x7b\x58\x71\x9b\xaa\xdc\x02\x3e\xa2\xa7\xe2\xcb\x4c\x70\x8c\x60\xc5\xb4\x66\xd2\xae\x41\xc5\xc4\xf0\xe7\xd9\xf4\xd3\x97\xf1\xe5\x6c\xfc\xc7\xe4\x62\x32\xbb\x03\xa5\xe1\x7c\x32\xbb\x3c\xbb\xb9\x81\xf3\xab\x29\x8c\xe1\x7a\x3c\x9d\x4d\x3e\xdd\x5e\x8c\xa7\x70\x7d\x3b\xbd\xbe\xba\x39\x1b\xc0\x0d\x92\x57\x48\xfa\xbf\x8e\x79\xec\xb2\xa7\x11\x22\xb4\x8c\x0b\x53\x46\xe2\x4e\xe5\x60\x52\x95\x8b\x08\x52\xf6\x88\xa0\x71\x81\xfc\x11\x23\x60\xb0\x50\xd9\xfa\xc5\x49\x25\x2e\x26\x94\x4c\xdc\x9d\x0f\x16\x24\x4c\x62\x90\xca\xf6\xc1\x20\xc2\x87\xd4\xda\x6c\x18\x86\xab\xd5\x6a\x90\xc8\x7c\xa0\x74\x12\x0a\x4f\x67\xc2\x8f\x83\x4e\x87\x48\x17\x4c\x88\x73\xcd\x96\x38\xd3\x6c\x81\x9a\xe2\x6e\x1c\xbd\xc4\x95\x3b\x84\x98\x4e\xc1\x6a\xb6\xe0\x32\x81\x25\xda\x54\x45\x06\xac\x02\x8d\x99\xd2\xb6\xc8\x14\x70\x19\x2b\xbd\x74\x15\xe5\x9c\x9d\x53\x62\xb8\xb4\xa8\x25\x13\xb0\x44\x63\x58\x82\xae\x8a\x19\x91\x49\xc3\x16\xd6\x95\xcc\x73\x07\x00\x9c\x29\x63\xd9\xe2\xfb\x10\xee\x9f\x37\x0f\x7d\x27\x34\x16\xb3\x21\xc4\xb9\x74\xd0\xae\x50\x49\x1f\xa2\x79\x0f\x9e\x37\xfe\x3c\x66\xb9\xb0\x7b\x01\xee\x98\xfe\x1e\x99\x06\x81\x12\x46\x60\x53\x6e\x06\x95\x99\x81\x40\x99\xd8\xb4\xc2\xf1\x18\xba\x84\xfb\x08\xa7\x75\xf5\x92\xc2\x45\x62\x87\x23\x53\x59\xb7\xd7\xc0\x12\x4d\x13\x74\x2f\x50\xbe\x39\x7d\xf0\x02\x18\x8d\x46\xae\xb1\x63\x2e\x31\x6a\x1b\xa2\xbf\x9f\x2a\xc3\xfd\x43\x43\x61\xd3\x79\xa1\xea\x20\xcb\x4d\xda\xa5\x7f\xb7\xee\x7a\xe5\x22\x92\x1a\x4d\x33\x94\x0b\xfb\xd4\x0e\x65\x18\xc2\xb5\xc6\x8c\xa6\x87\xca\xa9\xeb\x8b\xa4\xba\xd4\x37\x02\xee\xd9\x60\xd4\xba\x9f\x5d\x67\x38\x74\xc9\xb6\x4f\x03\xfa\xd1\x6f\x1c\xc7\x5a\x2d\xdd\xb1\x55\x5f\xf0\x89\x3c\x18\x90\xa8\xd7\x44\x59\x35\x2c\xff\x29\x51\x56\xb5\x30\x8f\x4c\xe4\xce\xd2\xf1\xc9\xd3\x31\xbc\x76\xf6\x9c\x6c\x60\xd5\x8d\xd5\x5c\x26\xdd\xd3\x77\x2d\x9d\x84\x19\x4f\x5c\xe8\xcc\x79\x32\x91\xd6\xf1\x27\xcc\xf4\x7e\xae\x79\x6b\x30\x1a\xee\xd7\xa4\xa3\x9f\x69\x73\x99\xe5\x76\xd8\xb8\x8f\x13\xb5\x60\x2a\xb7\x1e\xb7\x85\x79\x51\x0d\xb7\x69\x54\x73\xab\x1c\x4e\xca\x2a\xfa\xed\x70\x09\xfa\xbc\x55\xd5\x76\x80\xe1\xc5\xf6\x50\x6b\xa5\x5f\x60\xcf\xe3\xf6\xd9\x73\x27\x5b\x7b\x80\xc2\xa0\x33\x46\xf7\xff\xb7\xf4\x95\xce\x81\x0b\x34\xe0\x0d\x5a\x78\xf5\x6a\xcf\xf1\x11\x3e\xe1\x22\xa7\x6e\x01\x8d\x8f\xa8\x2d\x46\x47\xf0\xe3\x47\x69\xd6\xa7\x87\x3a\xfe\xe8\xe4\xe9\xa8\xd7\x74\x2d\x42\x81\x16\x9b\xd0\x9a\x5b\x9d\xed\x15\x6c\xae\xa5\x8f\x4c\xcc\x25\x13\xfc\x6f\x2c\x3c\xe9\xd5\xfb\x17\x69\xd0\xd6\xda\xd7\x0d\xed\xf6\x1c\x2c\x86\xd8\xbe\xa6\x74\xf8\x41\x82\x76\xb6\xce\xb0\xdb\xdb\xd7\x98\xbe\xf0\x2a\xe0\xb9\x56\xcb\x6e\x6f\x4f\x73\xb6\x70\x33\xb5\x83\x2a\x4a\xbe\x05\x9c\x90\x74\x07\xeb\xda\xb2\xd9\x58\x95\xc6\x67\x66\xba\xbd\x5a\x6f\x1d\x9f\xbe\x3b\x3e\xd8\x0e\x95\xd6\x5f\x34\x08\xba\xbd\x56\xe1\x34\x83\x42\x91\xf2\x13\x63\x74\xc0\x76\xc1\xd2\xec\xec\x3d\xa6\xdb\x2f\x46\x73\x0e\x97\xd9\x7b\xe2\xb6\x9d\xbc\xa9\x4f\xf2\x7f\xf7\x94\xb9\x18\x14\x03\x0c\x46\xfb\x72\xe0\x5d\x2c\x32\x41\xb0\xdd\x6c\xec\x58\x2f\x9b\xb1\x45\x70\x46\xe2\x3d\x6f\x69\x01\xff\xd5\xab\xe9\x7c\x2d\x1b\xae\x5e\x58\x5b\x0b\x57\xee\xb4\xdb\x6b\xda\x28\x46\xca\x01\xc6\xd2\xd9\xe6\xd4\x80\x9d\x97\x97\xa2\xfd\x66\x04\xa7\xff\xfb\x55\x20\x08\x43\x28\xc7\x0c\xed\xaa\x1a\x99\x45\x43\xcb\x2a\x15\x8d\x9a\x7f\xc3\x05\x2d\x7c\xb4\x08\xd2\x8e\xe8\xa0\x10\xa1\xe1\x1a\x23\x88\x39\x8a\x08\x14\x7d\xb5\xd0\x3a\xfc\xcd\x28\xe9\x08\x0d\x6a\x4e\x8c\x6e\x37\x1c\xf8\x2f\x2c\x4e\xa4\x92\x2f\xd0\xae\x21\x46\x66\x73\x8d\xb4\x52\x66\xcc\x18\x58\x22\x93\x5c\x26\x71\x2e\xc4\x1a\x94\x8e\x90\xc8\xfd\xcc\x33\x8e\xd0\x2a\x5a\x3a\xb5\x81\x55\xaa\x20\x52\xf2\xb8\x58\x34\x33\x8d\xf4\x0d\xd1\x87\x6f\xb9\xb1\xf4\xa5\x91\x09\xb6\x06\x6e\x07\x9d\xa0\xbc\x54\x7d\xc3\xa1\x10\xc0\x73\x27\x08\xa8\x2e\x8d\xa2\xf9\xed\xa6\x63\x10\x04\xdb\x4d\x85\xca\xc0\xaf\x2a\x41\x10\x54\x1b\x8a\x13\xd3\x2f\x27\xae\x56\x12\x8f\x56\x4e\x58\xed\x20\xdb\x59\xe2\xe4\xd5\x9e\x51\xf6\x57\x29\xf5\x3b\x44\xbd\xeb\xdc\x49\xb5\x1f\xb8\x13\xf7\xcb\xc9\xab\x85\xa0\x56\xfb\xee\xc0\x15\xeb\xb0\x51\xc2\xde\x4b\xbe\xac\xdf\x89\x2f\xbd\x3f\xae\x28\x2a\xb8\xfb\x45\xf2\x4d\x27\x08\x28\x8b\x5d\x0a\xce\x77\x5c\xd3\xc7\x9a\x8f\x91\x8f\x59\x40\xe5\xed\x05\xf7\xdf\x71\xfd\xb0\x5b\xce\x41\x10\x04\xc5\x33\x57\xc3\x91\x78\x53\xf0\x6f\x29\x0e\xad\x26\x41\xcd\x09\x3e\x3a\x79\x0f\xfc\x43\x5d\xa1\x98\x7c\xef\x81\xbf\x7e\x5d\x9a\xac\x9f\xdf\xf3\x87\x72\xd2\x55\x8f\x67\xeb\xbc\x57\x77\xa8\x78\x6d\x3d\xa4\x13\x6c\x3a\x9b\xce\x3f\x01\x00\x00\xff\xff\x98\xee\xed\xbe\x3d\x10\x00\x00") +var _callframe_tracerJs = []byte("\x1f\x8b\x08\x00\x00\x00\x00\x00\x00\xff\xd4\x57\xcd\x6e\xdb\x38\x10\x3e\xcb\x4f\x31\x9b\x43\x6d\xa3\xae\x95\x74\x81\x1e\xdc\xba\x80\x37\x48\x5a\x03\xd9\x24\x70\x9c\x2d\x82\x20\x07\xda\x1a\x49\x6c\x69\x52\x20\xa9\x38\xda\xd4\xef\xbe\x18\xea\xc7\x92\x6c\xa7\xd9\xd3\x62\x73\x8a\x87\xdf\x7c\x33\x9c\x3f\x8e\x7c\x1f\x4e\x55\x92\x69\x1e\xc5\x16\xde\x1f\xbf\x3f\x81\x79\x8c\x10\xa9\x77\x68\x63\xd4\x98\xae\x60\x92\xda\x58\x69\xd3\xf1\x7d\x98\xc7\xdc\x40\xc8\x05\x02\x37\x90\x30\x6d\x41\x85\x60\x5b\x78\xc1\x17\x9a\xe9\x6c\xd8\xf1\xfd\x5c\x67\xef\x31\x31\x84\x1a\x11\x8c\x0a\xed\x9a\x69\x1c\x41\xa6\x52\x58\x32\x09\x1a\x03\x6e\xac\xe6\x8b\xd4\x22\x70\x0b\x4c\x06\xbe\xd2\xb0\x52\x01\x0f\x33\xa2\xe4\x16\x52\x19\xa0\x76\xa6\x2d\xea\x95\x29\xfd\xf8\x72\x79\x0b\x17\x68\x0c\x6a\xf8\x82\x12\x35\x13\x70\x9d\x2e\x04\x5f\xc2\x05\x5f\xa2\x34\x08\xcc\x40\x42\x12\x13\x63\x00\x0b\x47\x47\x8a\xe7\xe4\xca\x4d\xe1\x0a\x9c\xab\x54\x06\xcc\x72\x25\x07\x80\x9c\x3c\x87\x47\xd4\x86\x2b\x09\xbf\x97\xa6\x0a\xc2\x01\x28\x4d\x24\x3d\x66\xe9\x02\x1a\x54\x42\x7a\x7d\x60\x32\x03\xc1\xec\x56\xf5\x15\x01\xd9\xde\x3b\x00\x2e\x9d\x99\x58\x25\x08\x36\x66\x96\x6e\xbd\xe6\x42\xc0\x02\x21\x35\x18\xa6\x62\x40\x6c\x8b\xd4\xc2\xb7\xe9\xfc\xeb\xd5\xed\x1c\x26\x97\x77\xf0\x6d\x32\x9b\x4d\x2e\xe7\x77\x1f\x61\xcd\x6d\xac\x52\x0b\xf8\x88\x39\x15\x5f\x25\x82\x63\x00\x6b\xa6\x35\x93\x36\x03\x15\x12\xc3\x9f\x67\xb3\xd3\xaf\x93\xcb\xf9\xe4\x8f\xe9\xc5\x74\x7e\x07\x4a\xc3\xf9\x74\x7e\x79\x76\x73\x03\xe7\x57\x33\x98\xc0\xf5\x64\x36\x9f\x9e\xde\x5e\x4c\x66\x70\x7d\x3b\xbb\xbe\xba\x39\x1b\xc2\x0d\x92\x57\x48\xfa\xbf\x8e\x79\xe8\xb2\xa7\x11\x02\xb4\x8c\x0b\x53\x46\xe2\x4e\xa5\x60\x62\x95\x8a\x00\x62\xf6\x88\xa0\x71\x89\xfc\x11\x03\x60\xb0\x54\x49\xf6\xea\xa4\x12\x17\x13\x4a\x46\xee\xce\x07\x0b\x12\xa6\x21\x48\x65\x07\x60\x10\xe1\x53\x6c\x6d\x32\xf2\xfd\xf5\x7a\x3d\x8c\x64\x3a\x54\x3a\xf2\x45\x4e\x67\xfc\xcf\xc3\x4e\x87\x48\x97\x4c\x88\x73\xcd\x56\x38\xd7\x6c\x89\x9a\xe2\x6e\x1c\xbd\xc4\xb5\x3b\x84\x90\x4e\xc1\x6a\xb6\xe4\x32\x82\x15\xda\x58\x05\x06\xac\x02\x8d\x89\xd2\xb6\xc8\x14\x70\x19\x2a\xbd\x72\x15\xe5\x9c\x5d\x50\x62\xb8\xb4\xa8\x25\x13\xb0\x42\x63\x58\x84\xae\x8a\x19\x91\x49\xc3\x96\xd6\x95\xcc\x73\x07\x00\x9c\x29\x63\xd9\xf2\xc7\x08\xee\x9f\x37\x0f\x03\x27\x34\x16\x93\x11\x84\xa9\x74\xd0\x9e\x50\xd1\x00\x82\x45\x1f\x9e\x37\xf9\x79\xc8\x52\x61\xf7\x02\xdc\x31\xfd\x3d\x32\x0d\x02\x25\x8c\xc1\xc6\xdc\x0c\x2b\x33\x43\x81\x32\xb2\x71\x85\xe3\x21\xf4\x08\xf7\x19\x4e\xea\xea\x25\x85\x8b\xc4\x0e\x47\xa2\x92\x5e\xbf\x81\x25\x9a\x26\xe8\x5e\xa0\x7c\x77\xf2\x90\x0b\x60\x3c\x1e\xbb\xc6\x0e\xb9\xc4\xa0\x6d\x88\xfe\x5e\x54\x86\xfb\x87\x86\xc2\xa6\xf3\x4a\xd5\x61\x92\x9a\xb8\x47\xff\x6e\xdd\xcd\x95\x8b\x48\x6a\x34\xcd\x50\x2e\xed\x53\x3b\x94\xbe\x0f\xd7\x1a\x13\x9a\x1e\x2a\xa5\xae\x2f\x92\xea\x52\xdf\x08\x78\xce\x06\xe3\xd6\xfd\x6c\x96\xe0\xc8\x25\xdb\x3e\x0d\xe9\xc7\xa0\x71\x1c\x6a\xb5\x72\xc7\x56\x7d\xc5\x27\xf2\x60\x48\xa2\x7e\x13\x65\xd5\xa8\xfc\xa7\x44\x59\xd5\xc2\x3c\x32\x91\x3a\x4b\xdd\xe3\xa7\x2e\xbc\x75\xf6\x9c\x6c\x68\xd5\x8d\xd5\x5c\x46\xbd\x93\x0f\x2d\x9d\x88\x99\x9c\xb8\xd0\x59\xf0\x68\x2a\xad\xe3\x8f\x98\xe9\xbf\xac\x79\x6b\x30\x18\xed\xd7\xa4\xa3\x97\xb4\xb9\x4c\x52\x3b\x6a\xdc\xc7\x89\x5a\x30\x95\xda\x1c\xb7\x85\xe5\xa2\x1a\x6e\xd3\xa8\xe6\x56\x39\x1c\x97\x55\xf4\xdb\xe1\x12\xcc\xf3\x56\x55\xdb\x01\x86\x57\xdb\x43\xad\x95\x7e\x85\xbd\x1c\xb7\xcf\x9e\x3b\xd9\xda\x03\x14\x06\x9d\x31\xba\xff\xbf\xa5\xaf\x74\x0e\x5c\xa0\x01\x6f\xd0\xc2\x9b\x37\x7b\x8e\x8f\xf0\x09\x97\x29\x75\x0b\x68\x7c\x44\x6d\x31\x38\x82\x9f\x3f\x4b\xb3\x79\x7a\xa8\xe3\x8f\x8e\x9f\x8e\xfa\x4d\xd7\x02\x14\x68\xb1\x09\xad\xb9\xd5\xd9\x5e\xc1\xa6\x5a\xe6\x91\x09\xb9\x64\x82\xff\x8d\x85\x27\xfd\x7a\xff\x22\x0d\xda\x5a\xfb\xba\xa1\xdd\x9e\x83\xc5\x10\xdb\xd7\x94\x0e\x3f\x8c\xd0\xce\xb3\x04\x7b\xfd\x7d\x8d\x99\x17\x5e\x05\x3c\xd7\x6a\xd5\xeb\xef\x69\xce\x16\x6e\xae\x76\x50\x45\xc9\xb7\x80\x53\x92\xee\x60\x5d\x5b\x36\x1b\xab\xd2\xf8\xc2\x4c\xaf\x5f\xeb\xad\xee\xc9\x87\xee\xc1\x76\xa8\xb4\xfe\xa2\x41\xd0\xeb\xb7\x0a\xa7\x19\x14\x8a\x54\x3e\x31\xc6\x07\x6c\x17\x2c\xcd\xce\xde\x63\xba\xfd\x62\x34\xe7\x70\x99\xbd\x27\x6e\xdb\xc9\x9b\xe5\x49\xfe\xef\x9e\x32\x17\x83\x62\x80\xc1\x78\x5f\x0e\x72\x17\x8b\x4c\x10\x6c\x37\x1b\x3b\xd6\xcb\x66\x6c\x11\x9c\x91\x78\xcf\x5b\x5a\xc0\x7f\xf5\x6a\x3a\x5f\xcb\x86\xab\x17\xd6\xd6\xc2\x95\x3b\xed\xf5\x9b\x36\x8a\x91\x72\x80\xb1\x74\xb6\x39\x35\xea\xfe\x39\x18\xb5\x90\xf3\xb1\x7b\x3a\x3b\x9b\xcc\xcf\xba\x34\x05\xf6\x9e\xbc\xef\xee\xf3\x1e\xb6\x03\x21\xd7\x52\x3b\x90\xcd\x0b\xef\x3e\xe5\xfa\xdd\x18\x4e\xfe\xf7\x8b\x88\xe7\xfb\x50\x0e\x39\xda\x94\x35\x32\x8b\x86\x56\x65\x2a\x59\xb5\xf8\x8e\x4b\x5a\x37\x69\x0d\xa5\x0d\xd5\x41\x21\x40\xc3\x35\x06\x10\x72\x14\x01\x28\xfa\x66\xa2\x65\xfc\xbb\x51\xd2\x11\x1a\xd4\x9c\x18\xdd\x66\x3a\xcc\xbf\xef\x38\x91\x4a\xbe\x44\x9b\x41\x88\xcc\xa6\x1a\x69\xa1\x4d\x98\x31\xb0\x42\x26\xb9\x8c\xc2\x54\x88\x0c\x94\x0e\x90\xc8\xf3\x89\x6b\x1c\xa1\x55\xb4\xf2\x6a\x03\xeb\x58\x41\xa0\x64\xb7\x58\x73\x13\x8d\xf4\x05\x33\x80\xef\xa9\xb1\xf4\x9d\x93\x08\x96\x01\xb7\xc3\x8e\x57\x5e\xaa\xbe\x5f\x51\x08\xe0\xb9\xe3\x79\xd4\x15\x46\xd1\xeb\xe1\x66\xb3\xe7\x79\xdb\x3d\xa9\xac\xa1\x01\x89\xab\xfd\xc8\x89\xe9\x97\x13\x57\x0b\x51\x51\x3b\x4e\x58\x6d\x40\xdb\x49\xe6\xe4\xd5\x96\x53\x76\x77\x29\xcd\x37\x98\x7a\xcf\xbb\x93\x6a\x3b\x71\x27\xee\x97\x93\x57\xeb\x48\xad\xf3\xdc\x81\x6b\x95\x51\xa3\x81\x72\x2f\xf9\xaa\x7e\x27\xbe\xca\xfd\x71\x45\x51\xc1\xdd\x2f\x92\x6f\x3a\x9e\x47\x59\xec\x51\x70\x7e\x60\x46\x9f\x8a\x79\x8c\xf2\x98\x79\x54\xde\xb9\xe0\xfe\x07\x66\x0f\xbb\xe5\xec\x79\x9e\x57\xf4\x54\x0d\x47\xe2\x4d\xc1\xbf\xa5\x38\xb4\x18\x79\x35\x27\xf8\xf8\xf8\x23\xf0\x4f\x75\x85\x62\xee\x7e\x04\xfe\xf6\x6d\x69\xb2\x7e\x7e\xcf\x1f\xca\x39\x5b\x3d\xdd\xad\xf3\x7e\xdd\xa1\xe2\xad\xcf\x21\x1d\x6f\xd3\xd9\x74\xfe\x09\x00\x00\xff\xff\x62\xa9\x69\x9e\xbb\x10\x00\x00") func callframe_tracerJsBytes() ([]byte, error) { return bindataRead( @@ -154,7 +154,7 @@ func callframe_tracerJs() (*asset, error) { } info := bindataFileInfo{name: "callframe_tracer.js", size: 0, mode: os.FileMode(0), modTime: time.Unix(0, 0)} - a := &asset{bytes: bytes, info: info, digest: [32]uint8{0xf3, 0x8a, 0xda, 0xfc, 0x95, 0xb, 0x3b, 0x17, 0xaf, 0x2e, 0x1c, 0x76, 0xc2, 0x95, 0xf9, 0xf8, 0x4b, 0xa8, 0x22, 0x5a, 0x62, 0xf, 0xd6, 0xfc, 0xb4, 0x4b, 0x5f, 0xc6, 0x84, 0x28, 0x56, 0x10}} + a := &asset{bytes: bytes, info: info, digest: [32]uint8{0xae, 0xac, 0xeb, 0x36, 0x91, 0xf2, 0x8b, 0x29, 0xaa, 0xa, 0x55, 0x2e, 0xc4, 0xd7, 0x3b, 0xab, 0x2f, 0xac, 0xf6, 0x18, 0xe0, 0x18, 0x64, 0x36, 0xc4, 0xdf, 0xd9, 0xdc, 0xe9, 0xb1, 0x94, 0x78}} return a, nil } diff --git a/eth/tracers/internal/tracers/callframe_tracer.js b/eth/tracers/internal/tracers/callframe_tracer.js index 0034b4c45079..8360cd7c9deb 100644 --- a/eth/tracers/internal/tracers/callframe_tracer.js +++ b/eth/tracers/internal/tracers/callframe_tracer.js @@ -79,6 +79,9 @@ call.output = toHex(frameResult.getOutput()) } else { call.error = error + if (call.type === 'CREATE' || call.type === 'CREATE2') { + delete call.to + } } len -= 1 if (this.callstack[len-1].calls === undefined) { diff --git a/eth/tracers/testdata/call_tracer/inner_create_oog_outer_throw.json b/eth/tracers/testdata/call_tracer/inner_create_oog_outer_throw.json index 72152e27e7f7..9395eb401c2a 100644 --- a/eth/tracers/testdata/call_tracer/inner_create_oog_outer_throw.json +++ b/eth/tracers/testdata/call_tracer/inner_create_oog_outer_throw.json @@ -56,7 +56,7 @@ "result": { "calls": [ { - "error": "internal failure", + "error": "contract creation code storage out of gas", "from": "0x1d3ddf7caf024f253487e18bc4a15b1a360c170a", "gas": "0x39ff0", "gasUsed": "0x39ff0", From 7e6f83b25ff3c4ec2d5c550bc4528ae1450dd743 Mon Sep 17 00:00:00 2001 From: Sina Mahmoodi Date: Wed, 15 Sep 2021 14:06:33 +0200 Subject: [PATCH 43/47] eth/tracers: fix callFrameTracer json test cases --- eth/tracers/testdata/call_tracer/inner_instafail.json | 11 +---------- eth/tracers/testdata/call_tracer/selfdestruct.json | 2 ++ eth/tracers/testdata/call_tracer/simple.json | 2 ++ 3 files changed, 5 insertions(+), 10 deletions(-) diff --git a/eth/tracers/testdata/call_tracer/inner_instafail.json b/eth/tracers/testdata/call_tracer/inner_instafail.json index 86070d130857..6e221b3c079b 100644 --- a/eth/tracers/testdata/call_tracer/inner_instafail.json +++ b/eth/tracers/testdata/call_tracer/inner_instafail.json @@ -58,15 +58,6 @@ "gasUsed": "0x1dc6", "input": "0x2e1a7d4d00000000000000000000000000000000000000000000000014d1120d7b160000", "output": "0x", - "calls": [ - { - "type": "CALL", - "from": "0x6c06b16512b332e6cd8293a2974872674716ce18", - "to": "0x66fdfd05e46126a07465ad24e40cc0597bc1ef31", - "value": "0x14d1120d7b160000", - "error":"internal failure", - "input": "0x" - } - ] + "calls": [] } } diff --git a/eth/tracers/testdata/call_tracer/selfdestruct.json b/eth/tracers/testdata/call_tracer/selfdestruct.json index 132cefa1681a..dd717906bc03 100644 --- a/eth/tracers/testdata/call_tracer/selfdestruct.json +++ b/eth/tracers/testdata/call_tracer/selfdestruct.json @@ -55,6 +55,8 @@ "calls": [ { "from": "0x3b873a919aa0512d5a0f09e6dcceaa4a6727fafe", + "gas": "0x0", + "gasUsed": "0x0", "input": "0x", "to": "0x000000000000000000000000000000000000dEaD", "type": "SELFDESTRUCT", diff --git a/eth/tracers/testdata/call_tracer/simple.json b/eth/tracers/testdata/call_tracer/simple.json index b46432122dd0..08cb7b2d00c0 100644 --- a/eth/tracers/testdata/call_tracer/simple.json +++ b/eth/tracers/testdata/call_tracer/simple.json @@ -60,6 +60,8 @@ "calls": [ { "from": "0x3b873a919aa0512d5a0f09e6dcceaa4a6727fafe", + "gas": "0x6d05", + "gasUsed": "0x0", "input": "0x", "to": "0x0024f658a46fbb89d8ac105e98d7ac7cbbaf27c5", "type": "CALL", From f156b3c5725140506db3839b945108cde1b2bb89 Mon Sep 17 00:00:00 2001 From: Sina Mahmoodi Date: Wed, 15 Sep 2021 18:11:53 +0200 Subject: [PATCH 44/47] eth/tracers: enable callframeTracer tests --- eth/tracers/tracers_test.go | 1 - 1 file changed, 1 deletion(-) diff --git a/eth/tracers/tracers_test.go b/eth/tracers/tracers_test.go index b5a3e991d48b..6dacdd20e2bf 100644 --- a/eth/tracers/tracers_test.go +++ b/eth/tracers/tracers_test.go @@ -288,7 +288,6 @@ func testCallTracer(tracer string, dirPath string, t *testing.T) { } func TestCallFrameTracer(t *testing.T) { - t.Skip("not yet passing all tests") testCallTracer("callframeTracer", "call_tracer", t) } From 8627eb51ec225e0b1cc298f9e60522619dcd5e14 Mon Sep 17 00:00:00 2001 From: Sina Mahmoodi Date: Thu, 16 Sep 2021 11:58:55 +0200 Subject: [PATCH 45/47] eth/tracers: callTracer->callTracerLegacy, callframeTracer->callTracer --- eth/tracers/internal/tracers/assets.go | 64 ++-- eth/tracers/internal/tracers/call_tracer.js | 286 +++++------------- .../internal/tracers/call_tracer_legacy.js | 252 +++++++++++++++ .../internal/tracers/callframe_tracer.js | 122 -------- eth/tracers/tracers_test.go | 13 +- 5 files changed, 368 insertions(+), 369 deletions(-) create mode 100644 eth/tracers/internal/tracers/call_tracer_legacy.js delete mode 100644 eth/tracers/internal/tracers/callframe_tracer.js diff --git a/eth/tracers/internal/tracers/assets.go b/eth/tracers/internal/tracers/assets.go index 3306bf076048..f38cf6be8688 100644 --- a/eth/tracers/internal/tracers/assets.go +++ b/eth/tracers/internal/tracers/assets.go @@ -2,8 +2,8 @@ // sources: // 4byte_tracer.js (2.933kB) // bigram_tracer.js (1.712kB) -// call_tracer.js (8.956kB) -// callframe_tracer.js (4.283kB) +// call_tracer.js (4.283kB) +// call_tracer_legacy.js (8.956kB) // evmdis_tracer.js (4.195kB) // noop_tracer.js (1.271kB) // opcount_tracer.js (1.372kB) @@ -118,7 +118,7 @@ func bigram_tracerJs() (*asset, error) { return a, nil } -var _call_tracerJs = []byte("\x1f\x8b\x08\x00\x00\x00\x00\x00\x00\xff\xd4\x5a\xdf\x6f\x1b\x37\xf2\x7f\x96\xfe\x8a\x89\x1f\x6a\x09\x51\x24\x39\xe9\xb7\x5f\xc0\xae\x7a\x50\x1d\x25\x35\xe0\xc6\x81\xad\x34\x08\x82\x3c\x50\xbb\xb3\x12\x6b\x8a\xdc\x92\x5c\xc9\xba\xd6\xff\xfb\x61\x86\xdc\xd5\xae\x24\x3b\xbe\x5e\x71\xe8\xbd\x69\x97\x33\xc3\xe1\xcc\x67\x7e\x71\x35\x18\xc0\xb9\xc9\x37\x56\xce\x17\x1e\x5e\x0e\x4f\xfe\x1f\xa6\x0b\x84\xb9\x79\x81\x7e\x81\x16\x8b\x25\x8c\x0b\xbf\x30\xd6\xb5\x07\x03\x98\x2e\xa4\x83\x4c\x2a\x04\xe9\x20\x17\xd6\x83\xc9\xc0\xef\xd0\x2b\x39\xb3\xc2\x6e\xfa\xed\xc1\x20\xf0\x1c\x5c\x26\x09\x99\x45\x04\x67\x32\xbf\x16\x16\x4f\x61\x63\x0a\x48\x84\x06\x8b\xa9\x74\xde\xca\x59\xe1\x11\xa4\x07\xa1\xd3\x81\xb1\xb0\x34\xa9\xcc\x36\x24\x52\x7a\x28\x74\x8a\x96\xb7\xf6\x68\x97\xae\xd4\xe3\xed\xbb\x0f\x70\x89\xce\xa1\x85\xb7\xa8\xd1\x0a\x05\xef\x8b\x99\x92\x09\x5c\xca\x04\xb5\x43\x10\x0e\x72\x7a\xe3\x16\x98\xc2\x8c\xc5\x11\xe3\x1b\x52\xe5\x26\xaa\x02\x6f\x4c\xa1\x53\xe1\xa5\xd1\x3d\x40\x49\x9a\xc3\x0a\xad\x93\x46\xc3\xab\x72\xab\x28\xb0\x07\xc6\x92\x90\x8e\xf0\x74\x00\x0b\x26\x27\xbe\x2e\x08\xbd\x01\x25\xfc\x96\xf5\x09\x06\xd9\x9e\x3b\x05\xa9\x79\x9b\x85\xc9\x11\xfc\x42\x78\x3a\xf5\x5a\x2a\x05\x33\x84\xc2\x61\x56\xa8\x1e\x49\x9b\x15\x1e\x3e\x5e\x4c\x7f\xba\xfa\x30\x85\xf1\xbb\x4f\xf0\x71\x7c\x7d\x3d\x7e\x37\xfd\x74\x06\x6b\xe9\x17\xa6\xf0\x80\x2b\x0c\xa2\xe4\x32\x57\x12\x53\x58\x0b\x6b\x85\xf6\x1b\x30\x19\x49\xf8\x79\x72\x7d\xfe\xd3\xf8\xdd\x74\xfc\xe3\xc5\xe5\xc5\xf4\x13\x18\x0b\x6f\x2e\xa6\xef\x26\x37\x37\xf0\xe6\xea\x1a\xc6\xf0\x7e\x7c\x3d\xbd\x38\xff\x70\x39\xbe\x86\xf7\x1f\xae\xdf\x5f\xdd\x4c\xfa\x70\x83\xa4\x15\x12\xff\xd7\x6d\x9e\xb1\xf7\x2c\x42\x8a\x5e\x48\xe5\x4a\x4b\x7c\x32\x05\xb8\x85\x29\x54\x0a\x0b\xb1\x42\xb0\x98\xa0\x5c\x61\x0a\x02\x12\x93\x6f\x9e\xec\x54\x92\x25\x94\xd1\x73\x3e\xf3\x83\x80\x84\x8b\x0c\xb4\xf1\x3d\x70\x88\xf0\xfd\xc2\xfb\xfc\x74\x30\x58\xaf\xd7\xfd\xb9\x2e\xfa\xc6\xce\x07\x2a\x88\x73\x83\x1f\xfa\x6d\x92\x99\x08\xa5\xa6\x56\x24\x68\xc9\x39\x02\xb2\x82\xcc\xaf\xcc\x5a\x83\xb7\x42\x3b\x91\x90\xab\xe9\x77\xc2\x60\x14\x1e\xf0\x8e\x9e\xbc\x23\xd0\x82\xc5\xdc\x58\xfa\xad\x54\x89\x33\xa9\x3d\x5a\x2d\x14\xcb\x76\xb0\x14\x29\xc2\x6c\x03\xa2\x2e\xb0\x57\x3f\x0c\xc1\x28\xb8\x1b\xa4\xce\x8c\x5d\x32\x2c\xfb\xed\xdf\xdb\xad\xa8\xa1\xf3\x22\xb9\x25\x05\x49\x7e\x52\x58\x8b\xda\x93\x29\x0b\xeb\xe4\x0a\x99\x04\x02\x4d\xb4\xe7\xe4\x97\x9f\x01\xef\x30\x29\x82\xa4\x56\x25\xe4\x14\x3e\xff\x7e\xff\xa5\xd7\x66\xd1\x29\xba\x04\x75\x8a\x29\x9f\xef\xd6\xc1\x7a\xc1\x16\x85\x35\x1e\xaf\x10\x7e\x2d\x9c\xaf\xd1\x64\xd6\x2c\x41\x68\x30\x05\x21\xbe\x6e\x1d\xa9\xbd\x61\x81\x82\x7e\x6b\xb4\xac\x51\xbf\xdd\xaa\x98\x4f\x21\x13\xca\x61\xdc\xd7\x79\xcc\xe9\x34\x52\xaf\xcc\x2d\x49\x36\x96\x20\x6c\x37\x60\xf2\xc4\xa4\x31\x18\xe8\x1c\xd5\x31\xd0\xf5\xdb\x2d\xe2\x3b\x85\xac\xd0\xbc\x6d\x47\x99\x79\x0f\xd2\x59\x17\x7e\x6f\xb7\x48\xec\xb9\xc8\x7d\x61\x91\xed\x89\xd6\x1a\xeb\x40\x2e\x97\x98\x4a\xe1\x51\x6d\xda\xad\xd6\x4a\xd8\xb0\x00\x23\x50\x66\xde\x9f\xa3\x9f\xd0\x63\xa7\x7b\xd6\x6e\xb5\x64\x06\x9d\xb0\xfa\x6c\x34\xe2\xec\x93\x49\x8d\x69\x10\xdf\xf2\x0b\xe9\xfa\x99\x28\x94\xaf\xf6\x25\xa6\x96\x45\x5f\x58\x4d\x3f\xef\x83\x16\x1f\x11\x8c\x56\x1b\x48\x28\xcb\x88\x19\x85\xa7\xdb\x38\x8f\xcb\x78\x38\xd7\x83\x4c\x38\x32\xa1\xcc\x60\x8d\x90\x5b\x7c\x91\x2c\x90\x7c\xa7\x13\x8c\x5a\xba\x8d\x63\xa7\x8e\x80\x76\xeb\x9b\xbc\xef\xcd\xbb\x62\x39\x43\xdb\xe9\xc2\x37\x30\xbc\xcb\x86\x5d\x18\x8d\xf8\x47\xa9\x7b\xe4\x89\xfa\x92\x14\x93\xc7\x83\x32\xff\x8d\xb7\x52\xcf\xc3\x59\xa3\xae\x17\x19\x08\xd0\xb8\x86\xc4\x68\x06\x35\x79\x65\x86\x52\xcf\x21\xb1\x28\x3c\xa6\x3d\x10\x69\x0a\xde\x04\xe4\x55\x38\x6b\x6e\x09\xdf\x7c\x03\x1d\xda\x6c\x04\xc7\xe7\xd7\x93\xf1\x74\x72\x0c\x7f\xfc\x01\xe1\xcd\x51\x78\xf3\xf2\xa8\x5b\xd3\x4c\xea\xab\x2c\x8b\xca\xb1\xc0\x7e\x8e\x78\xdb\x39\xe9\xf6\x57\x42\x15\x78\x95\x05\x35\x23\xed\x44\xa7\x30\x8a\x3c\xcf\x77\x79\x5e\x36\x78\x88\x69\x30\x80\xb1\x73\xb8\x9c\x29\xdc\x0f\xc8\x18\xb1\x1c\xbc\xce\x53\xc6\x22\xf4\x25\x66\x99\x2b\x24\x54\x95\xbb\x46\xf3\xb3\xc6\x2d\xbf\xc9\xf1\x14\x00\xc0\xe4\x3d\x7e\x41\xb1\xc0\x2f\xbc\xf9\x09\xef\xd8\x47\xa5\x09\x09\x55\xe3\x34\xb5\xe8\x5c\xa7\xdb\x0d\xe4\x52\xe7\x85\x3f\x6d\x90\x2f\x71\x69\xec\xa6\xef\x28\x21\x75\xf8\x68\xbd\x70\xd2\x92\x67\x2e\xdc\x85\x26\x9e\x88\xd4\xb7\xc2\x75\xb6\x4b\xe7\xc6\xf9\xd3\x72\x89\x1e\xca\x35\xb6\x05\xb1\x1d\x0f\xef\x8e\xf7\xad\x35\xec\x6e\x91\x70\xf2\x5d\x97\x58\xee\xcf\x2a\x7c\x57\x69\xa2\x9f\x17\x6e\xd1\x61\x38\x6d\x57\xb7\xa9\x60\x04\xde\x16\x78\x10\xfe\x0c\xa9\x7d\x38\x39\x54\x19\xe5\x12\x6f\x8b\x84\x61\x35\x17\x9c\x69\x38\xd2\x05\x65\x5e\x57\xcc\xd8\xe6\xde\x98\x7d\x74\x45\x70\xdd\x4c\x2e\xdf\xbc\x9e\xdc\x4c\xaf\x3f\x9c\x4f\x8f\x6b\x70\x52\x98\x79\x52\xaa\x79\x06\x85\x7a\xee\x17\xac\x3f\x89\x6b\xae\x7e\x26\x9e\x17\x27\x5f\xc2\x1b\x18\x1d\x08\xf9\xd6\xe3\x1c\xf0\xf9\x0b\xcb\xbe\xdf\x37\x5f\x93\x34\x18\xf3\xaf\x41\x92\x37\x4c\x5c\x92\x7b\x53\x12\x3c\xee\xe7\xbf\x18\x54\xe9\x8c\x28\x7e\x14\x4a\xe8\x04\x1f\xd1\x79\x1f\x6b\xf5\xa4\x79\x20\x0f\x2d\xd1\x2f\x4c\xca\x85\x21\x11\xa1\xb6\x94\x08\x4a\x8d\xc6\x7f\x3f\x1b\x8d\x2f\x2f\x6b\xb9\x88\x9f\xcf\xaf\x5e\xd7\xf3\xd3\xf1\xeb\xc9\xe5\xe4\xed\x78\x3a\xd9\xa5\xbd\x99\x8e\xa7\x17\xe7\xfc\xb6\x4c\x5d\x83\x01\xdc\xdc\xca\x9c\x2b\x0c\xe7\x6d\xb3\xcc\xb9\x55\xae\xf4\x75\x3d\xf0\x0b\x43\x4d\xa8\x8d\x05\x34\x13\x3a\x29\x0b\x9b\x2b\x01\xeb\x0d\xc1\xf5\x21\xe7\x9d\xec\x38\xaf\x82\xb0\x74\xef\x2d\xc6\x4d\xd3\x8e\x37\xa5\x5e\x5b\x83\x06\x34\x72\xf2\xe7\x04\xdb\x79\xfa\x21\xe1\x1f\x30\x84\x53\x38\x89\x59\xf4\x91\x34\xfd\x12\x9e\x93\xf8\x3f\x91\xac\x5f\x1d\xe0\xfc\x7b\xa6\xec\xbd\x40\xfb\xef\xa7\x72\x53\xf8\xab\x2c\x3b\x85\x5d\x23\x7e\xbb\x67\xc4\x8a\xfe\x12\xf5\x3e\xfd\xff\xed\xd1\x6f\xd3\x3e\xa1\xca\xe4\xf0\x6c\x0f\x22\x21\xe9\x3e\xdb\x89\x83\x68\x5c\x6e\xef\x58\x1a\x8c\x1e\x28\x34\x2f\x9b\x18\x7e\x28\x53\xfe\x47\x85\xe6\x60\x9b\x4a\xcd\x68\xb3\x11\xed\x81\x45\x6f\x25\xae\x68\xd4\x3c\x76\x2c\x92\x1a\x76\xb3\xa6\xf4\xd5\x87\x8f\x18\x24\x6a\x44\x4e\x2e\xb1\xc1\xa7\xfe\x8c\x7b\x5e\x6a\xd2\xe3\xa8\xc6\x10\x13\xdc\x87\x5b\x84\xa5\xd8\xd0\xa8\x96\x15\xfa\x76\x03\x73\xe1\x20\xdd\x68\xb1\x94\x89\x0b\xf2\xb8\xb9\xb7\x38\x17\x96\xc5\x5a\xfc\xad\x40\x47\x73\x1f\x01\x59\x24\xbe\x10\x4a\x6d\x60\x2e\x69\x78\x23\xee\xce\xcb\x57\xc3\x21\x38\x2f\x73\xd4\x69\x0f\xbe\x7b\x35\xf8\xee\x5b\xb0\x85\xc2\x6e\xbf\x5d\x2b\x61\xd5\x51\xa3\x37\x68\x21\xa2\xe7\x35\xe6\x7e\xd1\xe9\xc2\x0f\x0f\xd4\xc2\x07\x0a\xdb\x41\x5a\x78\x01\x27\x5f\xfa\xa4\xd7\xa8\x81\xdb\xe0\x49\x40\xe5\x30\x4a\xa3\x81\xf7\xea\xf5\x55\xe7\x56\x58\xa1\xc4\x0c\xbb\xa7\x3c\x00\xb3\xad\xd6\x22\x4e\x40\xe4\x14\xc8\x95\x90\x1a\x44\x92\x98\x42\x7b\x32\x7c\x39\xcc\xa8\x0d\xe5\xf7\x63\x5f\xca\xe3\x59\x51\x24\x09\x3a\x57\xa6\x7b\xf6\x1a\xa9\x23\x96\xc4\x0d\x52\x3b\x99\x62\xcd\x2b\x94\x1d\x0c\xa7\xe6\x48\x41\xa3\x74\x29\x70\x69\x1c\x6d\x32\x43\x58\x5b\x1a\xbc\x9c\xd4\x09\xdf\x3c\xa4\x48\xd6\x76\x60\x34\x08\x50\x86\xaf\x3b\x38\xc6\x41\xd8\xb9\xeb\x87\x7c\x4f\xdb\x52\xce\xd1\x66\xdd\x6f\x02\xb9\x0e\x55\x1e\x71\x76\x5a\x21\x0d\x78\x27\x9d\xe7\x8e\x9a\xb4\x94\x0e\x02\x92\xa5\x9e\xf7\x20\x37\x39\xe7\xe9\xaf\x95\xb3\x98\xac\xaf\x27\xbf\x4c\xae\xab\xc6\xe7\xe9\x4e\x2c\x67\x9e\xa3\x6a\x24\x04\x4b\xf3\x96\xc7\xf4\xe8\xc0\x10\x73\x00\x50\xa3\x07\x00\x45\xf2\xb7\xb5\xf1\x7d\xed\x38\x4a\x38\xbf\x75\xcc\x1c\xc3\x3c\x57\x57\xc0\x15\xca\xbb\x9d\xdc\xbd\x9b\x1c\x4c\x5e\x56\x08\x52\x8a\xd3\x0e\x25\xf6\xdd\x49\xa3\xb1\xb0\x1d\x38\xb6\xf8\xbc\xa8\xd9\x78\xcd\xed\x66\x20\xaa\xa5\x06\x5e\x2f\xfb\x56\x11\xaa\x01\xeb\x6e\x0a\x4f\x70\xa0\xfa\xbd\x4d\x7e\x73\xe1\x3e\x38\xf6\x7a\x4c\x7f\x33\x39\xbf\xd0\xbe\x53\x2e\x5e\x68\x78\x01\xe5\x03\x25\x75\x78\xd1\x88\xa2\x03\xd9\xb1\x95\xa2\x42\x8f\xb0\x15\x71\x06\x3b\xaf\x48\x50\x30\x07\x1b\xcd\xa2\xdf\x2f\xce\xc3\x28\x8d\x0c\xf6\xcc\xa2\xef\xe3\x6f\x85\x50\xae\x33\xac\x9a\x85\x70\x02\x6f\xb8\xbc\x8d\xf6\x3a\x49\xe2\x69\xf6\x8e\x67\x35\xb6\x68\x8d\x92\x2d\x74\x82\xe7\x26\xc5\x47\x25\x44\x11\x31\x6d\x54\xbe\x8c\xc0\x3c\xd4\x7b\xb7\xea\x04\x70\x54\x35\x04\x99\x90\xaa\xb0\x78\x74\x06\x07\xd2\x8e\x2b\x6c\x26\x12\xf6\xa5\x43\xe0\x69\xdd\x81\x33\x4b\x5c\x98\x75\x50\xe0\x50\xf2\xda\x07\x47\x85\x83\x9d\xf2\xc1\xd7\x4e\xc2\x41\xe1\xc4\x1c\x6b\xe0\xa8\x0c\x5e\x3a\xea\xe0\x15\xc2\x9f\x86\xce\xf3\xea\xf1\x09\x28\xba\xff\x6b\xe0\xb1\xe3\xe7\xbd\x3e\xa7\x24\xe2\x6e\xa7\xf6\x50\x2a\x1b\x9a\x91\xbf\x97\xe3\x9f\x1c\x61\xbb\xb4\xe1\x68\x4d\xe2\x70\xc0\x6d\x5f\xf3\x75\xf7\x57\xab\x0f\x79\xfe\xa1\x96\x89\x30\xaa\x7f\xc5\xc4\x6f\x71\xca\x5d\x0e\x3d\xe5\x16\x57\xd2\x14\x54\xc0\xf0\x7f\x69\x1c\xae\x5a\xbe\xfb\x76\xeb\x3e\xde\x0b\xb2\xdf\xea\x17\x83\xeb\x45\xbc\xd7\x0e\xdd\x52\xad\x7c\x18\xae\xad\xf1\xba\x30\x0b\x37\xce\x2d\xe6\x7f\xe4\x82\x30\x06\xba\x37\x39\xb5\x03\xb1\x3a\x29\x8b\x22\xdd\x54\x05\xb1\x17\x1a\x11\x58\x08\x9d\xc6\x61\x44\xa4\xa9\x24\x79\x0c\x42\xd2\x50\xcc\x85\xd4\xed\x83\x66\xfc\x6a\x15\x3e\x84\x8c\xbd\xde\xb6\x5e\x48\xe3\x10\x49\x13\x1f\x6b\xdc\x7e\x42\xc1\xdc\x09\xa2\xdd\xbb\xce\x78\x5d\x6a\xb4\x2b\x96\xdc\x09\x83\x58\x09\xa9\x04\x4d\x5f\xdc\x61\xe9\x14\x12\x85\x42\x87\x2f\x1c\x98\x79\xb3\x42\xeb\xda\x4f\x00\xf9\x9f\xc1\xf8\x4e\x56\x2c\x1f\xa3\x39\x9e\x1e\xb3\x4f\x8d\xd8\x70\xfc\x37\x4a\x78\x1f\xe1\x55\x33\x6f\x88\x2c\xe9\xf9\xe3\x17\x6a\xdf\x7e\x5a\x48\x71\xcf\x44\x34\x3f\xc0\xb0\xd6\x97\xff\x5d\x82\x6c\x1f\x62\x97\x55\x7f\x16\x0f\xef\x8d\xe9\x81\x42\xc1\x53\x52\xf9\x69\xaa\xec\x47\x1f\x1b\xda\xca\xe8\x0d\x1d\xdd\x5e\xf8\xf2\x9d\xde\x02\xcb\x1b\x90\xd0\xda\xcf\x10\x35\x48\x8f\x56\xd0\x3c\x44\xe8\x8a\x5f\x53\x48\x4b\xc7\xe2\xd8\x2f\x92\x82\x2e\x0a\x8e\x9f\x36\xa8\x30\x4b\x3d\xef\xb7\x5b\xe1\x7d\x2d\xde\x13\x7f\xb7\x8d\xf7\x50\x01\x99\x33\xde\x09\x54\x57\x02\x89\xbf\xe3\x6e\x91\xc7\xe6\x9d\x7b\x01\x5a\xa3\x57\x61\xa6\xde\xb9\x05\x60\xc6\x78\x13\xb0\x7b\x27\x46\x6b\xfc\xae\x01\x70\x26\x9d\x0b\x17\xc4\xec\x84\x84\xbf\xdb\x8f\x88\x92\x81\x82\xe1\xf4\x30\x03\x2d\x1d\x60\xda\xb9\x99\x20\x62\x7e\x15\x56\x43\x3d\x3f\xad\xaf\x86\x57\xf1\xa0\x72\x59\xb3\x8d\x5c\xb2\x6d\xee\xcf\x0e\x27\xb9\x61\x89\xc7\xc3\xc9\x8c\x6c\x5e\x01\xf6\x01\xd6\xfa\xac\xb1\x4f\xf2\x58\xaa\x64\xe9\x65\x66\x7b\x80\x95\xa5\xd7\x5a\x0e\x7f\xf7\x74\x91\x15\x71\x5d\xc5\x06\x4d\x43\x08\xdf\x36\xee\x2d\x1f\x9a\xb4\x68\x50\x89\x84\x65\x73\x35\x1a\x1d\x0d\xef\xaa\x0f\x23\x31\x57\x35\x68\x4a\x25\x42\x64\x84\xf3\x72\x54\xc8\x7f\x62\xdc\xb6\x1e\x83\xe5\x12\x58\x0c\x1f\x70\xb8\x9b\xa5\x10\x34\x33\x6e\x20\x0a\x47\xa3\xe8\x36\xb6\x52\x74\xd2\x62\x0a\x99\x44\x95\x82\x49\xd1\xf2\xa0\xfb\xab\x33\x3a\x7c\xaa\x43\x2b\x49\x62\xf8\x24\x19\xfe\x1d\xc0\x1f\x4a\xb5\x4c\xd0\x6f\x20\x43\xc1\xdf\xdc\xbc\x81\x5c\x38\x07\x4b\x14\x34\xda\x66\x85\x52\x1b\x30\x36\x45\x12\x5e\xcd\x7a\x14\xd6\x06\x0a\x87\xd6\xc1\x7a\x61\x62\xa9\xe5\x16\x2f\xa7\x6e\x55\xfa\x5e\xbc\xce\x91\x2e\x57\x62\x03\xd2\x53\x59\x8f\x87\xaa\x47\x7a\xf5\xa1\x8b\xbf\x96\x19\x32\xf0\x7e\x98\x97\x53\x61\x33\xce\xf9\x35\x3d\x35\x23\x3c\x0e\x45\xcd\xd8\xde\x5e\x74\x35\x03\xb9\x2c\x3d\xcd\x68\xad\x17\xb2\x66\x48\xf2\x0a\x3f\x35\x83\xb1\xd6\x6a\xf3\x02\x23\xa8\x62\xe0\xa7\x9d\xf0\x64\x2d\x63\x7c\x86\xcf\xba\x15\x39\x3f\xf5\x22\x60\xc8\x8b\x1d\x32\xce\x2d\x6e\x28\x9b\x07\x1b\xd5\x4a\x53\x78\xf1\xf9\x16\x37\x5f\x0e\x57\xa2\x08\xc7\x1a\x5d\x55\x7a\xca\xb0\x08\x6b\x8f\x24\x83\x4a\x0b\x39\x1a\x9e\x81\xfc\xbe\xce\x50\x56\x4f\x90\xcf\x9f\x97\x7b\xd6\xd7\x3f\xcb\x2f\x65\x84\x57\x88\xdf\x59\xef\x36\x34\x8a\x31\x12\x68\x28\x28\xda\xf7\xed\x7f\x05\x00\x00\xff\xff\xfb\x65\x93\x4f\xfc\x22\x00\x00") +var _call_tracerJs = []byte("\x1f\x8b\x08\x00\x00\x00\x00\x00\x00\xff\xd4\x57\xcd\x6e\xdb\x38\x10\x3e\xcb\x4f\x31\x9b\x43\x6d\xa3\xae\x95\x74\x81\x1e\xdc\xba\x80\x37\x48\x5a\x03\xd9\x24\x70\x9c\x2d\x82\x20\x07\xda\x1a\x49\x6c\x69\x52\x20\xa9\x38\xda\xd4\xef\xbe\x18\xea\xc7\x92\x6c\xa7\xd9\xd3\x62\x73\x8a\x87\xdf\x7c\x33\x9c\x3f\x8e\x7c\x1f\x4e\x55\x92\x69\x1e\xc5\x16\xde\x1f\xbf\x3f\x81\x79\x8c\x10\xa9\x77\x68\x63\xd4\x98\xae\x60\x92\xda\x58\x69\xd3\xf1\x7d\x98\xc7\xdc\x40\xc8\x05\x02\x37\x90\x30\x6d\x41\x85\x60\x5b\x78\xc1\x17\x9a\xe9\x6c\xd8\xf1\xfd\x5c\x67\xef\x31\x31\x84\x1a\x11\x8c\x0a\xed\x9a\x69\x1c\x41\xa6\x52\x58\x32\x09\x1a\x03\x6e\xac\xe6\x8b\xd4\x22\x70\x0b\x4c\x06\xbe\xd2\xb0\x52\x01\x0f\x33\xa2\xe4\x16\x52\x19\xa0\x76\xa6\x2d\xea\x95\x29\xfd\xf8\x72\x79\x0b\x17\x68\x0c\x6a\xf8\x82\x12\x35\x13\x70\x9d\x2e\x04\x5f\xc2\x05\x5f\xa2\x34\x08\xcc\x40\x42\x12\x13\x63\x00\x0b\x47\x47\x8a\xe7\xe4\xca\x4d\xe1\x0a\x9c\xab\x54\x06\xcc\x72\x25\x07\x80\x9c\x3c\x87\x47\xd4\x86\x2b\x09\xbf\x97\xa6\x0a\xc2\x01\x28\x4d\x24\x3d\x66\xe9\x02\x1a\x54\x42\x7a\x7d\x60\x32\x03\xc1\xec\x56\xf5\x15\x01\xd9\xde\x3b\x00\x2e\x9d\x99\x58\x25\x08\x36\x66\x96\x6e\xbd\xe6\x42\xc0\x02\x21\x35\x18\xa6\x62\x40\x6c\x8b\xd4\xc2\xb7\xe9\xfc\xeb\xd5\xed\x1c\x26\x97\x77\xf0\x6d\x32\x9b\x4d\x2e\xe7\x77\x1f\x61\xcd\x6d\xac\x52\x0b\xf8\x88\x39\x15\x5f\x25\x82\x63\x00\x6b\xa6\x35\x93\x36\x03\x15\x12\xc3\x9f\x67\xb3\xd3\xaf\x93\xcb\xf9\xe4\x8f\xe9\xc5\x74\x7e\x07\x4a\xc3\xf9\x74\x7e\x79\x76\x73\x03\xe7\x57\x33\x98\xc0\xf5\x64\x36\x9f\x9e\xde\x5e\x4c\x66\x70\x7d\x3b\xbb\xbe\xba\x39\x1b\xc2\x0d\x92\x57\x48\xfa\xbf\x8e\x79\xe8\xb2\xa7\x11\x02\xb4\x8c\x0b\x53\x46\xe2\x4e\xa5\x60\x62\x95\x8a\x00\x62\xf6\x88\xa0\x71\x89\xfc\x11\x03\x60\xb0\x54\x49\xf6\xea\xa4\x12\x17\x13\x4a\x46\xee\xce\x07\x0b\x12\xa6\x21\x48\x65\x07\x60\x10\xe1\x53\x6c\x6d\x32\xf2\xfd\xf5\x7a\x3d\x8c\x64\x3a\x54\x3a\xf2\x45\x4e\x67\xfc\xcf\xc3\x4e\x87\x48\x97\x4c\x88\x73\xcd\x56\x38\xd7\x6c\x89\x9a\xe2\x6e\x1c\xbd\xc4\xb5\x3b\x84\x90\x4e\xc1\x6a\xb6\xe4\x32\x82\x15\xda\x58\x05\x06\xac\x02\x8d\x89\xd2\xb6\xc8\x14\x70\x19\x2a\xbd\x72\x15\xe5\x9c\x5d\x50\x62\xb8\xb4\xa8\x25\x13\xb0\x42\x63\x58\x84\xae\x8a\x19\x91\x49\xc3\x96\xd6\x95\xcc\x73\x07\x00\x9c\x29\x63\xd9\xf2\xc7\x08\xee\x9f\x37\x0f\x03\x27\x34\x16\x93\x11\x84\xa9\x74\xd0\x9e\x50\xd1\x00\x82\x45\x1f\x9e\x37\xf9\x79\xc8\x52\x61\xf7\x02\xdc\x31\xfd\x3d\x32\x0d\x02\x25\x8c\xc1\xc6\xdc\x0c\x2b\x33\x43\x81\x32\xb2\x71\x85\xe3\x21\xf4\x08\xf7\x19\x4e\xea\xea\x25\x85\x8b\xc4\x0e\x47\xa2\x92\x5e\xbf\x81\x25\x9a\x26\xe8\x5e\xa0\x7c\x77\xf2\x90\x0b\x60\x3c\x1e\xbb\xc6\x0e\xb9\xc4\xa0\x6d\x88\xfe\x5e\x54\x86\xfb\x87\x86\xc2\xa6\xf3\x4a\xd5\x61\x92\x9a\xb8\x47\xff\x6e\xdd\xcd\x95\x8b\x48\x6a\x34\xcd\x50\x2e\xed\x53\x3b\x94\xbe\x0f\xd7\x1a\x13\x9a\x1e\x2a\xa5\xae\x2f\x92\xea\x52\xdf\x08\x78\xce\x06\xe3\xd6\xfd\x6c\x96\xe0\xc8\x25\xdb\x3e\x0d\xe9\xc7\xa0\x71\x1c\x6a\xb5\x72\xc7\x56\x7d\xc5\x27\xf2\x60\x48\xa2\x7e\x13\x65\xd5\xa8\xfc\xa7\x44\x59\xd5\xc2\x3c\x32\x91\x3a\x4b\xdd\xe3\xa7\x2e\xbc\x75\xf6\x9c\x6c\x68\xd5\x8d\xd5\x5c\x46\xbd\x93\x0f\x2d\x9d\x88\x99\x9c\xb8\xd0\x59\xf0\x68\x2a\xad\xe3\x8f\x98\xe9\xbf\xac\x79\x6b\x30\x18\xed\xd7\xa4\xa3\x97\xb4\xb9\x4c\x52\x3b\x6a\xdc\xc7\x89\x5a\x30\x95\xda\x1c\xb7\x85\xe5\xa2\x1a\x6e\xd3\xa8\xe6\x56\x39\x1c\x97\x55\xf4\xdb\xe1\x12\xcc\xf3\x56\x55\xdb\x01\x86\x57\xdb\x43\xad\x95\x7e\x85\xbd\x1c\xb7\xcf\x9e\x3b\xd9\xda\x03\x14\x06\x9d\x31\xba\xff\xbf\xa5\xaf\x74\x0e\x5c\xa0\x01\x6f\xd0\xc2\x9b\x37\x7b\x8e\x8f\xf0\x09\x97\x29\x75\x0b\x68\x7c\x44\x6d\x31\x38\x82\x9f\x3f\x4b\xb3\x79\x7a\xa8\xe3\x8f\x8e\x9f\x8e\xfa\x4d\xd7\x02\x14\x68\xb1\x09\xad\xb9\xd5\xd9\x5e\xc1\xa6\x5a\xe6\x91\x09\xb9\x64\x82\xff\x8d\x85\x27\xfd\x7a\xff\x22\x0d\xda\x5a\xfb\xba\xa1\xdd\x9e\x83\xc5\x10\xdb\xd7\x94\x0e\x3f\x8c\xd0\xce\xb3\x04\x7b\xfd\x7d\x8d\x99\x17\x5e\x05\x3c\xd7\x6a\xd5\xeb\xef\x69\xce\x16\x6e\xae\x76\x50\x45\xc9\xb7\x80\x53\x92\xee\x60\x5d\x5b\x36\x1b\xab\xd2\xf8\xc2\x4c\xaf\x5f\xeb\xad\xee\xc9\x87\xee\xc1\x76\xa8\xb4\xfe\xa2\x41\xd0\xeb\xb7\x0a\xa7\x19\x14\x8a\x54\x3e\x31\xc6\x07\x6c\x17\x2c\xcd\xce\xde\x63\xba\xfd\x62\x34\xe7\x70\x99\xbd\x27\x6e\xdb\xc9\x9b\xe5\x49\xfe\xef\x9e\x32\x17\x83\x62\x80\xc1\x78\x5f\x0e\x72\x17\x8b\x4c\x10\x6c\x37\x1b\x3b\xd6\xcb\x66\x6c\x11\x9c\x91\x78\xcf\x5b\x5a\xc0\x7f\xf5\x6a\x3a\x5f\xcb\x86\xab\x17\xd6\xd6\xc2\x95\x3b\xed\xf5\x9b\x36\x8a\x91\x72\x80\xb1\x74\xb6\x39\x35\xea\xfe\x39\x18\xb5\x90\xf3\xb1\x7b\x3a\x3b\x9b\xcc\xcf\xba\x34\x05\xf6\x9e\xbc\xef\xee\xf3\x1e\xb6\x03\x21\xd7\x52\x3b\x90\xcd\x0b\xef\x3e\xe5\xfa\xdd\x18\x4e\xfe\xf7\x8b\x88\xe7\xfb\x50\x0e\x39\xda\x94\x35\x32\x8b\x86\x56\x65\x2a\x59\xb5\xf8\x8e\x4b\x5a\x37\x69\x0d\xa5\x0d\xd5\x41\x21\x40\xc3\x35\x06\x10\x72\x14\x01\x28\xfa\x66\xa2\x65\xfc\xbb\x51\xd2\x11\x1a\xd4\x9c\x18\xdd\x66\x3a\xcc\xbf\xef\x38\x91\x4a\xbe\x44\x9b\x41\x88\xcc\xa6\x1a\x69\xa1\x4d\x98\x31\xb0\x42\x26\xb9\x8c\xc2\x54\x88\x0c\x94\x0e\x90\xc8\xf3\x89\x6b\x1c\xa1\x55\xb4\xf2\x6a\x03\xeb\x58\x41\xa0\x64\xb7\x58\x73\x13\x8d\xf4\x05\x33\x80\xef\xa9\xb1\xf4\x9d\x93\x08\x96\x01\xb7\xc3\x8e\x57\x5e\xaa\xbe\x5f\x51\x08\xe0\xb9\xe3\x79\xd4\x15\x46\xd1\xeb\xe1\x66\xb3\xe7\x79\xdb\x3d\xa9\xac\xa1\x01\x89\xab\xfd\xc8\x89\xe9\x97\x13\x57\x0b\x51\x51\x3b\x4e\x58\x6d\x40\xdb\x49\xe6\xe4\xd5\x96\x53\x76\x77\x29\xcd\x37\x98\x7a\xcf\xbb\x93\x6a\x3b\x71\x27\xee\x97\x93\x57\xeb\x48\xad\xf3\xdc\x81\x6b\x95\x51\xa3\x81\x72\x2f\xf9\xaa\x7e\x27\xbe\xca\xfd\x71\x45\x51\xc1\xdd\x2f\x92\x6f\x3a\x9e\x47\x59\xec\x51\x70\x7e\x60\x46\x9f\x8a\x79\x8c\xf2\x98\x79\x54\xde\xb9\xe0\xfe\x07\x66\x0f\xbb\xe5\xec\x79\x9e\x57\xf4\x54\x0d\x47\xe2\x4d\xc1\xbf\xa5\x38\xb4\x18\x79\x35\x27\xf8\xf8\xf8\x23\xf0\x4f\x75\x85\x62\xee\x7e\x04\xfe\xf6\x6d\x69\xb2\x7e\x7e\xcf\x1f\xca\x39\x5b\x3d\xdd\xad\xf3\x7e\xdd\xa1\xe2\xad\xcf\x21\x1d\x6f\xd3\xd9\x74\xfe\x09\x00\x00\xff\xff\x62\xa9\x69\x9e\xbb\x10\x00\x00") func call_tracerJsBytes() ([]byte, error) { return bindataRead( @@ -134,27 +134,27 @@ func call_tracerJs() (*asset, error) { } info := bindataFileInfo{name: "call_tracer.js", size: 0, mode: os.FileMode(0), modTime: time.Unix(0, 0)} - a := &asset{bytes: bytes, info: info, digest: [32]uint8{0x46, 0x79, 0xb6, 0xbc, 0xd2, 0xc, 0x25, 0xb1, 0x22, 0x56, 0xef, 0x77, 0xb9, 0x5e, 0x2e, 0xf4, 0xda, 0xb2, 0x2f, 0x53, 0xa4, 0xff, 0xc8, 0xac, 0xbb, 0x75, 0x22, 0x46, 0x59, 0xe3, 0x1d, 0x7d}} + a := &asset{bytes: bytes, info: info, digest: [32]uint8{0xae, 0xac, 0xeb, 0x36, 0x91, 0xf2, 0x8b, 0x29, 0xaa, 0xa, 0x55, 0x2e, 0xc4, 0xd7, 0x3b, 0xab, 0x2f, 0xac, 0xf6, 0x18, 0xe0, 0x18, 0x64, 0x36, 0xc4, 0xdf, 0xd9, 0xdc, 0xe9, 0xb1, 0x94, 0x78}} return a, nil } -var _callframe_tracerJs = []byte("\x1f\x8b\x08\x00\x00\x00\x00\x00\x00\xff\xd4\x57\xcd\x6e\xdb\x38\x10\x3e\xcb\x4f\x31\x9b\x43\x6d\xa3\xae\x95\x74\x81\x1e\xdc\xba\x80\x37\x48\x5a\x03\xd9\x24\x70\x9c\x2d\x82\x20\x07\xda\x1a\x49\x6c\x69\x52\x20\xa9\x38\xda\xd4\xef\xbe\x18\xea\xc7\x92\x6c\xa7\xd9\xd3\x62\x73\x8a\x87\xdf\x7c\x33\x9c\x3f\x8e\x7c\x1f\x4e\x55\x92\x69\x1e\xc5\x16\xde\x1f\xbf\x3f\x81\x79\x8c\x10\xa9\x77\x68\x63\xd4\x98\xae\x60\x92\xda\x58\x69\xd3\xf1\x7d\x98\xc7\xdc\x40\xc8\x05\x02\x37\x90\x30\x6d\x41\x85\x60\x5b\x78\xc1\x17\x9a\xe9\x6c\xd8\xf1\xfd\x5c\x67\xef\x31\x31\x84\x1a\x11\x8c\x0a\xed\x9a\x69\x1c\x41\xa6\x52\x58\x32\x09\x1a\x03\x6e\xac\xe6\x8b\xd4\x22\x70\x0b\x4c\x06\xbe\xd2\xb0\x52\x01\x0f\x33\xa2\xe4\x16\x52\x19\xa0\x76\xa6\x2d\xea\x95\x29\xfd\xf8\x72\x79\x0b\x17\x68\x0c\x6a\xf8\x82\x12\x35\x13\x70\x9d\x2e\x04\x5f\xc2\x05\x5f\xa2\x34\x08\xcc\x40\x42\x12\x13\x63\x00\x0b\x47\x47\x8a\xe7\xe4\xca\x4d\xe1\x0a\x9c\xab\x54\x06\xcc\x72\x25\x07\x80\x9c\x3c\x87\x47\xd4\x86\x2b\x09\xbf\x97\xa6\x0a\xc2\x01\x28\x4d\x24\x3d\x66\xe9\x02\x1a\x54\x42\x7a\x7d\x60\x32\x03\xc1\xec\x56\xf5\x15\x01\xd9\xde\x3b\x00\x2e\x9d\x99\x58\x25\x08\x36\x66\x96\x6e\xbd\xe6\x42\xc0\x02\x21\x35\x18\xa6\x62\x40\x6c\x8b\xd4\xc2\xb7\xe9\xfc\xeb\xd5\xed\x1c\x26\x97\x77\xf0\x6d\x32\x9b\x4d\x2e\xe7\x77\x1f\x61\xcd\x6d\xac\x52\x0b\xf8\x88\x39\x15\x5f\x25\x82\x63\x00\x6b\xa6\x35\x93\x36\x03\x15\x12\xc3\x9f\x67\xb3\xd3\xaf\x93\xcb\xf9\xe4\x8f\xe9\xc5\x74\x7e\x07\x4a\xc3\xf9\x74\x7e\x79\x76\x73\x03\xe7\x57\x33\x98\xc0\xf5\x64\x36\x9f\x9e\xde\x5e\x4c\x66\x70\x7d\x3b\xbb\xbe\xba\x39\x1b\xc2\x0d\x92\x57\x48\xfa\xbf\x8e\x79\xe8\xb2\xa7\x11\x02\xb4\x8c\x0b\x53\x46\xe2\x4e\xa5\x60\x62\x95\x8a\x00\x62\xf6\x88\xa0\x71\x89\xfc\x11\x03\x60\xb0\x54\x49\xf6\xea\xa4\x12\x17\x13\x4a\x46\xee\xce\x07\x0b\x12\xa6\x21\x48\x65\x07\x60\x10\xe1\x53\x6c\x6d\x32\xf2\xfd\xf5\x7a\x3d\x8c\x64\x3a\x54\x3a\xf2\x45\x4e\x67\xfc\xcf\xc3\x4e\x87\x48\x97\x4c\x88\x73\xcd\x56\x38\xd7\x6c\x89\x9a\xe2\x6e\x1c\xbd\xc4\xb5\x3b\x84\x90\x4e\xc1\x6a\xb6\xe4\x32\x82\x15\xda\x58\x05\x06\xac\x02\x8d\x89\xd2\xb6\xc8\x14\x70\x19\x2a\xbd\x72\x15\xe5\x9c\x5d\x50\x62\xb8\xb4\xa8\x25\x13\xb0\x42\x63\x58\x84\xae\x8a\x19\x91\x49\xc3\x96\xd6\x95\xcc\x73\x07\x00\x9c\x29\x63\xd9\xf2\xc7\x08\xee\x9f\x37\x0f\x03\x27\x34\x16\x93\x11\x84\xa9\x74\xd0\x9e\x50\xd1\x00\x82\x45\x1f\x9e\x37\xf9\x79\xc8\x52\x61\xf7\x02\xdc\x31\xfd\x3d\x32\x0d\x02\x25\x8c\xc1\xc6\xdc\x0c\x2b\x33\x43\x81\x32\xb2\x71\x85\xe3\x21\xf4\x08\xf7\x19\x4e\xea\xea\x25\x85\x8b\xc4\x0e\x47\xa2\x92\x5e\xbf\x81\x25\x9a\x26\xe8\x5e\xa0\x7c\x77\xf2\x90\x0b\x60\x3c\x1e\xbb\xc6\x0e\xb9\xc4\xa0\x6d\x88\xfe\x5e\x54\x86\xfb\x87\x86\xc2\xa6\xf3\x4a\xd5\x61\x92\x9a\xb8\x47\xff\x6e\xdd\xcd\x95\x8b\x48\x6a\x34\xcd\x50\x2e\xed\x53\x3b\x94\xbe\x0f\xd7\x1a\x13\x9a\x1e\x2a\xa5\xae\x2f\x92\xea\x52\xdf\x08\x78\xce\x06\xe3\xd6\xfd\x6c\x96\xe0\xc8\x25\xdb\x3e\x0d\xe9\xc7\xa0\x71\x1c\x6a\xb5\x72\xc7\x56\x7d\xc5\x27\xf2\x60\x48\xa2\x7e\x13\x65\xd5\xa8\xfc\xa7\x44\x59\xd5\xc2\x3c\x32\x91\x3a\x4b\xdd\xe3\xa7\x2e\xbc\x75\xf6\x9c\x6c\x68\xd5\x8d\xd5\x5c\x46\xbd\x93\x0f\x2d\x9d\x88\x99\x9c\xb8\xd0\x59\xf0\x68\x2a\xad\xe3\x8f\x98\xe9\xbf\xac\x79\x6b\x30\x18\xed\xd7\xa4\xa3\x97\xb4\xb9\x4c\x52\x3b\x6a\xdc\xc7\x89\x5a\x30\x95\xda\x1c\xb7\x85\xe5\xa2\x1a\x6e\xd3\xa8\xe6\x56\x39\x1c\x97\x55\xf4\xdb\xe1\x12\xcc\xf3\x56\x55\xdb\x01\x86\x57\xdb\x43\xad\x95\x7e\x85\xbd\x1c\xb7\xcf\x9e\x3b\xd9\xda\x03\x14\x06\x9d\x31\xba\xff\xbf\xa5\xaf\x74\x0e\x5c\xa0\x01\x6f\xd0\xc2\x9b\x37\x7b\x8e\x8f\xf0\x09\x97\x29\x75\x0b\x68\x7c\x44\x6d\x31\x38\x82\x9f\x3f\x4b\xb3\x79\x7a\xa8\xe3\x8f\x8e\x9f\x8e\xfa\x4d\xd7\x02\x14\x68\xb1\x09\xad\xb9\xd5\xd9\x5e\xc1\xa6\x5a\xe6\x91\x09\xb9\x64\x82\xff\x8d\x85\x27\xfd\x7a\xff\x22\x0d\xda\x5a\xfb\xba\xa1\xdd\x9e\x83\xc5\x10\xdb\xd7\x94\x0e\x3f\x8c\xd0\xce\xb3\x04\x7b\xfd\x7d\x8d\x99\x17\x5e\x05\x3c\xd7\x6a\xd5\xeb\xef\x69\xce\x16\x6e\xae\x76\x50\x45\xc9\xb7\x80\x53\x92\xee\x60\x5d\x5b\x36\x1b\xab\xd2\xf8\xc2\x4c\xaf\x5f\xeb\xad\xee\xc9\x87\xee\xc1\x76\xa8\xb4\xfe\xa2\x41\xd0\xeb\xb7\x0a\xa7\x19\x14\x8a\x54\x3e\x31\xc6\x07\x6c\x17\x2c\xcd\xce\xde\x63\xba\xfd\x62\x34\xe7\x70\x99\xbd\x27\x6e\xdb\xc9\x9b\xe5\x49\xfe\xef\x9e\x32\x17\x83\x62\x80\xc1\x78\x5f\x0e\x72\x17\x8b\x4c\x10\x6c\x37\x1b\x3b\xd6\xcb\x66\x6c\x11\x9c\x91\x78\xcf\x5b\x5a\xc0\x7f\xf5\x6a\x3a\x5f\xcb\x86\xab\x17\xd6\xd6\xc2\x95\x3b\xed\xf5\x9b\x36\x8a\x91\x72\x80\xb1\x74\xb6\x39\x35\xea\xfe\x39\x18\xb5\x90\xf3\xb1\x7b\x3a\x3b\x9b\xcc\xcf\xba\x34\x05\xf6\x9e\xbc\xef\xee\xf3\x1e\xb6\x03\x21\xd7\x52\x3b\x90\xcd\x0b\xef\x3e\xe5\xfa\xdd\x18\x4e\xfe\xf7\x8b\x88\xe7\xfb\x50\x0e\x39\xda\x94\x35\x32\x8b\x86\x56\x65\x2a\x59\xb5\xf8\x8e\x4b\x5a\x37\x69\x0d\xa5\x0d\xd5\x41\x21\x40\xc3\x35\x06\x10\x72\x14\x01\x28\xfa\x66\xa2\x65\xfc\xbb\x51\xd2\x11\x1a\xd4\x9c\x18\xdd\x66\x3a\xcc\xbf\xef\x38\x91\x4a\xbe\x44\x9b\x41\x88\xcc\xa6\x1a\x69\xa1\x4d\x98\x31\xb0\x42\x26\xb9\x8c\xc2\x54\x88\x0c\x94\x0e\x90\xc8\xf3\x89\x6b\x1c\xa1\x55\xb4\xf2\x6a\x03\xeb\x58\x41\xa0\x64\xb7\x58\x73\x13\x8d\xf4\x05\x33\x80\xef\xa9\xb1\xf4\x9d\x93\x08\x96\x01\xb7\xc3\x8e\x57\x5e\xaa\xbe\x5f\x51\x08\xe0\xb9\xe3\x79\xd4\x15\x46\xd1\xeb\xe1\x66\xb3\xe7\x79\xdb\x3d\xa9\xac\xa1\x01\x89\xab\xfd\xc8\x89\xe9\x97\x13\x57\x0b\x51\x51\x3b\x4e\x58\x6d\x40\xdb\x49\xe6\xe4\xd5\x96\x53\x76\x77\x29\xcd\x37\x98\x7a\xcf\xbb\x93\x6a\x3b\x71\x27\xee\x97\x93\x57\xeb\x48\xad\xf3\xdc\x81\x6b\x95\x51\xa3\x81\x72\x2f\xf9\xaa\x7e\x27\xbe\xca\xfd\x71\x45\x51\xc1\xdd\x2f\x92\x6f\x3a\x9e\x47\x59\xec\x51\x70\x7e\x60\x46\x9f\x8a\x79\x8c\xf2\x98\x79\x54\xde\xb9\xe0\xfe\x07\x66\x0f\xbb\xe5\xec\x79\x9e\x57\xf4\x54\x0d\x47\xe2\x4d\xc1\xbf\xa5\x38\xb4\x18\x79\x35\x27\xf8\xf8\xf8\x23\xf0\x4f\x75\x85\x62\xee\x7e\x04\xfe\xf6\x6d\x69\xb2\x7e\x7e\xcf\x1f\xca\x39\x5b\x3d\xdd\xad\xf3\x7e\xdd\xa1\xe2\xad\xcf\x21\x1d\x6f\xd3\xd9\x74\xfe\x09\x00\x00\xff\xff\x62\xa9\x69\x9e\xbb\x10\x00\x00") +var _call_tracer_legacyJs = []byte("\x1f\x8b\x08\x00\x00\x00\x00\x00\x00\xff\xd4\x5a\xdf\x6f\x1b\x37\xf2\x7f\x96\xfe\x8a\x89\x1f\x6a\x09\x51\x24\x39\xe9\xb7\x5f\xc0\xae\x7a\x50\x1d\x25\x35\xe0\xc6\x81\xad\x34\x08\x82\x3c\x50\xbb\xb3\x12\x6b\x8a\xdc\x92\x5c\xc9\xba\xd6\xff\xfb\x61\x86\xdc\xd5\xae\x24\x3b\xbe\x5e\x71\xe8\xbd\x69\x97\x33\xc3\xe1\xcc\x67\x7e\x71\x35\x18\xc0\xb9\xc9\x37\x56\xce\x17\x1e\x5e\x0e\x4f\xfe\x1f\xa6\x0b\x84\xb9\x79\x81\x7e\x81\x16\x8b\x25\x8c\x0b\xbf\x30\xd6\xb5\x07\x03\x98\x2e\xa4\x83\x4c\x2a\x04\xe9\x20\x17\xd6\x83\xc9\xc0\xef\xd0\x2b\x39\xb3\xc2\x6e\xfa\xed\xc1\x20\xf0\x1c\x5c\x26\x09\x99\x45\x04\x67\x32\xbf\x16\x16\x4f\x61\x63\x0a\x48\x84\x06\x8b\xa9\x74\xde\xca\x59\xe1\x11\xa4\x07\xa1\xd3\x81\xb1\xb0\x34\xa9\xcc\x36\x24\x52\x7a\x28\x74\x8a\x96\xb7\xf6\x68\x97\xae\xd4\xe3\xed\xbb\x0f\x70\x89\xce\xa1\x85\xb7\xa8\xd1\x0a\x05\xef\x8b\x99\x92\x09\x5c\xca\x04\xb5\x43\x10\x0e\x72\x7a\xe3\x16\x98\xc2\x8c\xc5\x11\xe3\x1b\x52\xe5\x26\xaa\x02\x6f\x4c\xa1\x53\xe1\xa5\xd1\x3d\x40\x49\x9a\xc3\x0a\xad\x93\x46\xc3\xab\x72\xab\x28\xb0\x07\xc6\x92\x90\x8e\xf0\x74\x00\x0b\x26\x27\xbe\x2e\x08\xbd\x01\x25\xfc\x96\xf5\x09\x06\xd9\x9e\x3b\x05\xa9\x79\x9b\x85\xc9\x11\xfc\x42\x78\x3a\xf5\x5a\x2a\x05\x33\x84\xc2\x61\x56\xa8\x1e\x49\x9b\x15\x1e\x3e\x5e\x4c\x7f\xba\xfa\x30\x85\xf1\xbb\x4f\xf0\x71\x7c\x7d\x3d\x7e\x37\xfd\x74\x06\x6b\xe9\x17\xa6\xf0\x80\x2b\x0c\xa2\xe4\x32\x57\x12\x53\x58\x0b\x6b\x85\xf6\x1b\x30\x19\x49\xf8\x79\x72\x7d\xfe\xd3\xf8\xdd\x74\xfc\xe3\xc5\xe5\xc5\xf4\x13\x18\x0b\x6f\x2e\xa6\xef\x26\x37\x37\xf0\xe6\xea\x1a\xc6\xf0\x7e\x7c\x3d\xbd\x38\xff\x70\x39\xbe\x86\xf7\x1f\xae\xdf\x5f\xdd\x4c\xfa\x70\x83\xa4\x15\x12\xff\xd7\x6d\x9e\xb1\xf7\x2c\x42\x8a\x5e\x48\xe5\x4a\x4b\x7c\x32\x05\xb8\x85\x29\x54\x0a\x0b\xb1\x42\xb0\x98\xa0\x5c\x61\x0a\x02\x12\x93\x6f\x9e\xec\x54\x92\x25\x94\xd1\x73\x3e\xf3\x83\x80\x84\x8b\x0c\xb4\xf1\x3d\x70\x88\xf0\xfd\xc2\xfb\xfc\x74\x30\x58\xaf\xd7\xfd\xb9\x2e\xfa\xc6\xce\x07\x2a\x88\x73\x83\x1f\xfa\x6d\x92\x99\x08\xa5\xa6\x56\x24\x68\xc9\x39\x02\xb2\x82\xcc\xaf\xcc\x5a\x83\xb7\x42\x3b\x91\x90\xab\xe9\x77\xc2\x60\x14\x1e\xf0\x8e\x9e\xbc\x23\xd0\x82\xc5\xdc\x58\xfa\xad\x54\x89\x33\xa9\x3d\x5a\x2d\x14\xcb\x76\xb0\x14\x29\xc2\x6c\x03\xa2\x2e\xb0\x57\x3f\x0c\xc1\x28\xb8\x1b\xa4\xce\x8c\x5d\x32\x2c\xfb\xed\xdf\xdb\xad\xa8\xa1\xf3\x22\xb9\x25\x05\x49\x7e\x52\x58\x8b\xda\x93\x29\x0b\xeb\xe4\x0a\x99\x04\x02\x4d\xb4\xe7\xe4\x97\x9f\x01\xef\x30\x29\x82\xa4\x56\x25\xe4\x14\x3e\xff\x7e\xff\xa5\xd7\x66\xd1\x29\xba\x04\x75\x8a\x29\x9f\xef\xd6\xc1\x7a\xc1\x16\x85\x35\x1e\xaf\x10\x7e\x2d\x9c\xaf\xd1\x64\xd6\x2c\x41\x68\x30\x05\x21\xbe\x6e\x1d\xa9\xbd\x61\x81\x82\x7e\x6b\xb4\xac\x51\xbf\xdd\xaa\x98\x4f\x21\x13\xca\x61\xdc\xd7\x79\xcc\xe9\x34\x52\xaf\xcc\x2d\x49\x36\x96\x20\x6c\x37\x60\xf2\xc4\xa4\x31\x18\xe8\x1c\xd5\x31\xd0\xf5\xdb\x2d\xe2\x3b\x85\xac\xd0\xbc\x6d\x47\x99\x79\x0f\xd2\x59\x17\x7e\x6f\xb7\x48\xec\xb9\xc8\x7d\x61\x91\xed\x89\xd6\x1a\xeb\x40\x2e\x97\x98\x4a\xe1\x51\x6d\xda\xad\xd6\x4a\xd8\xb0\x00\x23\x50\x66\xde\x9f\xa3\x9f\xd0\x63\xa7\x7b\xd6\x6e\xb5\x64\x06\x9d\xb0\xfa\x6c\x34\xe2\xec\x93\x49\x8d\x69\x10\xdf\xf2\x0b\xe9\xfa\x99\x28\x94\xaf\xf6\x25\xa6\x96\x45\x5f\x58\x4d\x3f\xef\x83\x16\x1f\x11\x8c\x56\x1b\x48\x28\xcb\x88\x19\x85\xa7\xdb\x38\x8f\xcb\x78\x38\xd7\x83\x4c\x38\x32\xa1\xcc\x60\x8d\x90\x5b\x7c\x91\x2c\x90\x7c\xa7\x13\x8c\x5a\xba\x8d\x63\xa7\x8e\x80\x76\xeb\x9b\xbc\xef\xcd\xbb\x62\x39\x43\xdb\xe9\xc2\x37\x30\xbc\xcb\x86\x5d\x18\x8d\xf8\x47\xa9\x7b\xe4\x89\xfa\x92\x14\x93\xc7\x83\x32\xff\x8d\xb7\x52\xcf\xc3\x59\xa3\xae\x17\x19\x08\xd0\xb8\x86\xc4\x68\x06\x35\x79\x65\x86\x52\xcf\x21\xb1\x28\x3c\xa6\x3d\x10\x69\x0a\xde\x04\xe4\x55\x38\x6b\x6e\x09\xdf\x7c\x03\x1d\xda\x6c\x04\xc7\xe7\xd7\x93\xf1\x74\x72\x0c\x7f\xfc\x01\xe1\xcd\x51\x78\xf3\xf2\xa8\x5b\xd3\x4c\xea\xab\x2c\x8b\xca\xb1\xc0\x7e\x8e\x78\xdb\x39\xe9\xf6\x57\x42\x15\x78\x95\x05\x35\x23\xed\x44\xa7\x30\x8a\x3c\xcf\x77\x79\x5e\x36\x78\x88\x69\x30\x80\xb1\x73\xb8\x9c\x29\xdc\x0f\xc8\x18\xb1\x1c\xbc\xce\x53\xc6\x22\xf4\x25\x66\x99\x2b\x24\x54\x95\xbb\x46\xf3\xb3\xc6\x2d\xbf\xc9\xf1\x14\x00\xc0\xe4\x3d\x7e\x41\xb1\xc0\x2f\xbc\xf9\x09\xef\xd8\x47\xa5\x09\x09\x55\xe3\x34\xb5\xe8\x5c\xa7\xdb\x0d\xe4\x52\xe7\x85\x3f\x6d\x90\x2f\x71\x69\xec\xa6\xef\x28\x21\x75\xf8\x68\xbd\x70\xd2\x92\x67\x2e\xdc\x85\x26\x9e\x88\xd4\xb7\xc2\x75\xb6\x4b\xe7\xc6\xf9\xd3\x72\x89\x1e\xca\x35\xb6\x05\xb1\x1d\x0f\xef\x8e\xf7\xad\x35\xec\x6e\x91\x70\xf2\x5d\x97\x58\xee\xcf\x2a\x7c\x57\x69\xa2\x9f\x17\x6e\xd1\x61\x38\x6d\x57\xb7\xa9\x60\x04\xde\x16\x78\x10\xfe\x0c\xa9\x7d\x38\x39\x54\x19\xe5\x12\x6f\x8b\x84\x61\x35\x17\x9c\x69\x38\xd2\x05\x65\x5e\x57\xcc\xd8\xe6\xde\x98\x7d\x74\x45\x70\xdd\x4c\x2e\xdf\xbc\x9e\xdc\x4c\xaf\x3f\x9c\x4f\x8f\x6b\x70\x52\x98\x79\x52\xaa\x79\x06\x85\x7a\xee\x17\xac\x3f\x89\x6b\xae\x7e\x26\x9e\x17\x27\x5f\xc2\x1b\x18\x1d\x08\xf9\xd6\xe3\x1c\xf0\xf9\x0b\xcb\xbe\xdf\x37\x5f\x93\x34\x18\xf3\xaf\x41\x92\x37\x4c\x5c\x92\x7b\x53\x12\x3c\xee\xe7\xbf\x18\x54\xe9\x8c\x28\x7e\x14\x4a\xe8\x04\x1f\xd1\x79\x1f\x6b\xf5\xa4\x79\x20\x0f\x2d\xd1\x2f\x4c\xca\x85\x21\x11\xa1\xb6\x94\x08\x4a\x8d\xc6\x7f\x3f\x1b\x8d\x2f\x2f\x6b\xb9\x88\x9f\xcf\xaf\x5e\xd7\xf3\xd3\xf1\xeb\xc9\xe5\xe4\xed\x78\x3a\xd9\xa5\xbd\x99\x8e\xa7\x17\xe7\xfc\xb6\x4c\x5d\x83\x01\xdc\xdc\xca\x9c\x2b\x0c\xe7\x6d\xb3\xcc\xb9\x55\xae\xf4\x75\x3d\xf0\x0b\x43\x4d\xa8\x8d\x05\x34\x13\x3a\x29\x0b\x9b\x2b\x01\xeb\x0d\xc1\xf5\x21\xe7\x9d\xec\x38\xaf\x82\xb0\x74\xef\x2d\xc6\x4d\xd3\x8e\x37\xa5\x5e\x5b\x83\x06\x34\x72\xf2\xe7\x04\xdb\x79\xfa\x21\xe1\x1f\x30\x84\x53\x38\x89\x59\xf4\x91\x34\xfd\x12\x9e\x93\xf8\x3f\x91\xac\x5f\x1d\xe0\xfc\x7b\xa6\xec\xbd\x40\xfb\xef\xa7\x72\x53\xf8\xab\x2c\x3b\x85\x5d\x23\x7e\xbb\x67\xc4\x8a\xfe\x12\xf5\x3e\xfd\xff\xed\xd1\x6f\xd3\x3e\xa1\xca\xe4\xf0\x6c\x0f\x22\x21\xe9\x3e\xdb\x89\x83\x68\x5c\x6e\xef\x58\x1a\x8c\x1e\x28\x34\x2f\x9b\x18\x7e\x28\x53\xfe\x47\x85\xe6\x60\x9b\x4a\xcd\x68\xb3\x11\xed\x81\x45\x6f\x25\xae\x68\xd4\x3c\x76\x2c\x92\x1a\x76\xb3\xa6\xf4\xd5\x87\x8f\x18\x24\x6a\x44\x4e\x2e\xb1\xc1\xa7\xfe\x8c\x7b\x5e\x6a\xd2\xe3\xa8\xc6\x10\x13\xdc\x87\x5b\x84\xa5\xd8\xd0\xa8\x96\x15\xfa\x76\x03\x73\xe1\x20\xdd\x68\xb1\x94\x89\x0b\xf2\xb8\xb9\xb7\x38\x17\x96\xc5\x5a\xfc\xad\x40\x47\x73\x1f\x01\x59\x24\xbe\x10\x4a\x6d\x60\x2e\x69\x78\x23\xee\xce\xcb\x57\xc3\x21\x38\x2f\x73\xd4\x69\x0f\xbe\x7b\x35\xf8\xee\x5b\xb0\x85\xc2\x6e\xbf\x5d\x2b\x61\xd5\x51\xa3\x37\x68\x21\xa2\xe7\x35\xe6\x7e\xd1\xe9\xc2\x0f\x0f\xd4\xc2\x07\x0a\xdb\x41\x5a\x78\x01\x27\x5f\xfa\xa4\xd7\xa8\x81\xdb\xe0\x49\x40\xe5\x30\x4a\xa3\x81\xf7\xea\xf5\x55\xe7\x56\x58\xa1\xc4\x0c\xbb\xa7\x3c\x00\xb3\xad\xd6\x22\x4e\x40\xe4\x14\xc8\x95\x90\x1a\x44\x92\x98\x42\x7b\x32\x7c\x39\xcc\xa8\x0d\xe5\xf7\x63\x5f\xca\xe3\x59\x51\x24\x09\x3a\x57\xa6\x7b\xf6\x1a\xa9\x23\x96\xc4\x0d\x52\x3b\x99\x62\xcd\x2b\x94\x1d\x0c\xa7\xe6\x48\x41\xa3\x74\x29\x70\x69\x1c\x6d\x32\x43\x58\x5b\x1a\xbc\x9c\xd4\x09\xdf\x3c\xa4\x48\xd6\x76\x60\x34\x08\x50\x86\xaf\x3b\x38\xc6\x41\xd8\xb9\xeb\x87\x7c\x4f\xdb\x52\xce\xd1\x66\xdd\x6f\x02\xb9\x0e\x55\x1e\x71\x76\x5a\x21\x0d\x78\x27\x9d\xe7\x8e\x9a\xb4\x94\x0e\x02\x92\xa5\x9e\xf7\x20\x37\x39\xe7\xe9\xaf\x95\xb3\x98\xac\xaf\x27\xbf\x4c\xae\xab\xc6\xe7\xe9\x4e\x2c\x67\x9e\xa3\x6a\x24\x04\x4b\xf3\x96\xc7\xf4\xe8\xc0\x10\x73\x00\x50\xa3\x07\x00\x45\xf2\xb7\xb5\xf1\x7d\xed\x38\x4a\x38\xbf\x75\xcc\x1c\xc3\x3c\x57\x57\xc0\x15\xca\xbb\x9d\xdc\xbd\x9b\x1c\x4c\x5e\x56\x08\x52\x8a\xd3\x0e\x25\xf6\xdd\x49\xa3\xb1\xb0\x1d\x38\xb6\xf8\xbc\xa8\xd9\x78\xcd\xed\x66\x20\xaa\xa5\x06\x5e\x2f\xfb\x56\x11\xaa\x01\xeb\x6e\x0a\x4f\x70\xa0\xfa\xbd\x4d\x7e\x73\xe1\x3e\x38\xf6\x7a\x4c\x7f\x33\x39\xbf\xd0\xbe\x53\x2e\x5e\x68\x78\x01\xe5\x03\x25\x75\x78\xd1\x88\xa2\x03\xd9\xb1\x95\xa2\x42\x8f\xb0\x15\x71\x06\x3b\xaf\x48\x50\x30\x07\x1b\xcd\xa2\xdf\x2f\xce\xc3\x28\x8d\x0c\xf6\xcc\xa2\xef\xe3\x6f\x85\x50\xae\x33\xac\x9a\x85\x70\x02\x6f\xb8\xbc\x8d\xf6\x3a\x49\xe2\x69\xf6\x8e\x67\x35\xb6\x68\x8d\x92\x2d\x74\x82\xe7\x26\xc5\x47\x25\x44\x11\x31\x6d\x54\xbe\x8c\xc0\x3c\xd4\x7b\xb7\xea\x04\x70\x54\x35\x04\x99\x90\xaa\xb0\x78\x74\x06\x07\xd2\x8e\x2b\x6c\x26\x12\xf6\xa5\x43\xe0\x69\xdd\x81\x33\x4b\x5c\x98\x75\x50\xe0\x50\xf2\xda\x07\x47\x85\x83\x9d\xf2\xc1\xd7\x4e\xc2\x41\xe1\xc4\x1c\x6b\xe0\xa8\x0c\x5e\x3a\xea\xe0\x15\xc2\x9f\x86\xce\xf3\xea\xf1\x09\x28\xba\xff\x6b\xe0\xb1\xe3\xe7\xbd\x3e\xa7\x24\xe2\x6e\xa7\xf6\x50\x2a\x1b\x9a\x91\xbf\x97\xe3\x9f\x1c\x61\xbb\xb4\xe1\x68\x4d\xe2\x70\xc0\x6d\x5f\xf3\x75\xf7\x57\xab\x0f\x79\xfe\xa1\x96\x89\x30\xaa\x7f\xc5\xc4\x6f\x71\xca\x5d\x0e\x3d\xe5\x16\x57\xd2\x14\x54\xc0\xf0\x7f\x69\x1c\xae\x5a\xbe\xfb\x76\xeb\x3e\xde\x0b\xb2\xdf\xea\x17\x83\xeb\x45\xbc\xd7\x0e\xdd\x52\xad\x7c\x18\xae\xad\xf1\xba\x30\x0b\x37\xce\x2d\xe6\x7f\xe4\x82\x30\x06\xba\x37\x39\xb5\x03\xb1\x3a\x29\x8b\x22\xdd\x54\x05\xb1\x17\x1a\x11\x58\x08\x9d\xc6\x61\x44\xa4\xa9\x24\x79\x0c\x42\xd2\x50\xcc\x85\xd4\xed\x83\x66\xfc\x6a\x15\x3e\x84\x8c\xbd\xde\xb6\x5e\x48\xe3\x10\x49\x13\x1f\x6b\xdc\x7e\x42\xc1\xdc\x09\xa2\xdd\xbb\xce\x78\x5d\x6a\xb4\x2b\x96\xdc\x09\x83\x58\x09\xa9\x04\x4d\x5f\xdc\x61\xe9\x14\x12\x85\x42\x87\x2f\x1c\x98\x79\xb3\x42\xeb\xda\x4f\x00\xf9\x9f\xc1\xf8\x4e\x56\x2c\x1f\xa3\x39\x9e\x1e\xb3\x4f\x8d\xd8\x70\xfc\x37\x4a\x78\x1f\xe1\x55\x33\x6f\x88\x2c\xe9\xf9\xe3\x17\x6a\xdf\x7e\x5a\x48\x71\xcf\x44\x34\x3f\xc0\xb0\xd6\x97\xff\x5d\x82\x6c\x1f\x62\x97\x55\x7f\x16\x0f\xef\x8d\xe9\x81\x42\xc1\x53\x52\xf9\x69\xaa\xec\x47\x1f\x1b\xda\xca\xe8\x0d\x1d\xdd\x5e\xf8\xf2\x9d\xde\x02\xcb\x1b\x90\xd0\xda\xcf\x10\x35\x48\x8f\x56\xd0\x3c\x44\xe8\x8a\x5f\x53\x48\x4b\xc7\xe2\xd8\x2f\x92\x82\x2e\x0a\x8e\x9f\x36\xa8\x30\x4b\x3d\xef\xb7\x5b\xe1\x7d\x2d\xde\x13\x7f\xb7\x8d\xf7\x50\x01\x99\x33\xde\x09\x54\x57\x02\x89\xbf\xe3\x6e\x91\xc7\xe6\x9d\x7b\x01\x5a\xa3\x57\x61\xa6\xde\xb9\x05\x60\xc6\x78\x13\xb0\x7b\x27\x46\x6b\xfc\xae\x01\x70\x26\x9d\x0b\x17\xc4\xec\x84\x84\xbf\xdb\x8f\x88\x92\x81\x82\xe1\xf4\x30\x03\x2d\x1d\x60\xda\xb9\x99\x20\x62\x7e\x15\x56\x43\x3d\x3f\xad\xaf\x86\x57\xf1\xa0\x72\x59\xb3\x8d\x5c\xb2\x6d\xee\xcf\x0e\x27\xb9\x61\x89\xc7\xc3\xc9\x8c\x6c\x5e\x01\xf6\x01\xd6\xfa\xac\xb1\x4f\xf2\x58\xaa\x64\xe9\x65\x66\x7b\x80\x95\xa5\xd7\x5a\x0e\x7f\xf7\x74\x91\x15\x71\x5d\xc5\x06\x4d\x43\x08\xdf\x36\xee\x2d\x1f\x9a\xb4\x68\x50\x89\x84\x65\x73\x35\x1a\x1d\x0d\xef\xaa\x0f\x23\x31\x57\x35\x68\x4a\x25\x42\x64\x84\xf3\x72\x54\xc8\x7f\x62\xdc\xb6\x1e\x83\xe5\x12\x58\x0c\x1f\x70\xb8\x9b\xa5\x10\x34\x33\x6e\x20\x0a\x47\xa3\xe8\x36\xb6\x52\x74\xd2\x62\x0a\x99\x44\x95\x82\x49\xd1\xf2\xa0\xfb\xab\x33\x3a\x7c\xaa\x43\x2b\x49\x62\xf8\x24\x19\xfe\x1d\xc0\x1f\x4a\xb5\x4c\xd0\x6f\x20\x43\xc1\xdf\xdc\xbc\x81\x5c\x38\x07\x4b\x14\x34\xda\x66\x85\x52\x1b\x30\x36\x45\x12\x5e\xcd\x7a\x14\xd6\x06\x0a\x87\xd6\xc1\x7a\x61\x62\xa9\xe5\x16\x2f\xa7\x6e\x55\xfa\x5e\xbc\xce\x91\x2e\x57\x62\x03\xd2\x53\x59\x8f\x87\xaa\x47\x7a\xf5\xa1\x8b\xbf\x96\x19\x32\xf0\x7e\x98\x97\x53\x61\x33\xce\xf9\x35\x3d\x35\x23\x3c\x0e\x45\xcd\xd8\xde\x5e\x74\x35\x03\xb9\x2c\x3d\xcd\x68\xad\x17\xb2\x66\x48\xf2\x0a\x3f\x35\x83\xb1\xd6\x6a\xf3\x02\x23\xa8\x62\xe0\xa7\x9d\xf0\x64\x2d\x63\x7c\x86\xcf\xba\x15\x39\x3f\xf5\x22\x60\xc8\x8b\x1d\x32\xce\x2d\x6e\x28\x9b\x07\x1b\xd5\x4a\x53\x78\xf1\xf9\x16\x37\x5f\x0e\x57\xa2\x08\xc7\x1a\x5d\x55\x7a\xca\xb0\x08\x6b\x8f\x24\x83\x4a\x0b\x39\x1a\x9e\x81\xfc\xbe\xce\x50\x56\x4f\x90\xcf\x9f\x97\x7b\xd6\xd7\x3f\xcb\x2f\x65\x84\x57\x88\xdf\x59\xef\x36\x34\x8a\x31\x12\x68\x28\x28\xda\xf7\xed\x7f\x05\x00\x00\xff\xff\xfb\x65\x93\x4f\xfc\x22\x00\x00") -func callframe_tracerJsBytes() ([]byte, error) { +func call_tracer_legacyJsBytes() ([]byte, error) { return bindataRead( - _callframe_tracerJs, - "callframe_tracer.js", + _call_tracer_legacyJs, + "call_tracer_legacy.js", ) } -func callframe_tracerJs() (*asset, error) { - bytes, err := callframe_tracerJsBytes() +func call_tracer_legacyJs() (*asset, error) { + bytes, err := call_tracer_legacyJsBytes() if err != nil { return nil, err } - info := bindataFileInfo{name: "callframe_tracer.js", size: 0, mode: os.FileMode(0), modTime: time.Unix(0, 0)} - a := &asset{bytes: bytes, info: info, digest: [32]uint8{0xae, 0xac, 0xeb, 0x36, 0x91, 0xf2, 0x8b, 0x29, 0xaa, 0xa, 0x55, 0x2e, 0xc4, 0xd7, 0x3b, 0xab, 0x2f, 0xac, 0xf6, 0x18, 0xe0, 0x18, 0x64, 0x36, 0xc4, 0xdf, 0xd9, 0xdc, 0xe9, 0xb1, 0x94, 0x78}} + info := bindataFileInfo{name: "call_tracer_legacy.js", size: 0, mode: os.FileMode(0), modTime: time.Unix(0, 0)} + a := &asset{bytes: bytes, info: info, digest: [32]uint8{0x46, 0x79, 0xb6, 0xbc, 0xd2, 0xc, 0x25, 0xb1, 0x22, 0x56, 0xef, 0x77, 0xb9, 0x5e, 0x2e, 0xf4, 0xda, 0xb2, 0x2f, 0x53, 0xa4, 0xff, 0xc8, 0xac, 0xbb, 0x75, 0x22, 0x46, 0x59, 0xe3, 0x1d, 0x7d}} return a, nil } @@ -369,16 +369,16 @@ func AssetNames() []string { // _bindata is a table, holding each asset generator, mapped to its name. var _bindata = map[string]func() (*asset, error){ - "4byte_tracer.js": _4byte_tracerJs, - "bigram_tracer.js": bigram_tracerJs, - "call_tracer.js": call_tracerJs, - "callframe_tracer.js": callframe_tracerJs, - "evmdis_tracer.js": evmdis_tracerJs, - "noop_tracer.js": noop_tracerJs, - "opcount_tracer.js": opcount_tracerJs, - "prestate_tracer.js": prestate_tracerJs, - "trigram_tracer.js": trigram_tracerJs, - "unigram_tracer.js": unigram_tracerJs, + "4byte_tracer.js": _4byte_tracerJs, + "bigram_tracer.js": bigram_tracerJs, + "call_tracer.js": call_tracerJs, + "call_tracer_legacy.js": call_tracer_legacyJs, + "evmdis_tracer.js": evmdis_tracerJs, + "noop_tracer.js": noop_tracerJs, + "opcount_tracer.js": opcount_tracerJs, + "prestate_tracer.js": prestate_tracerJs, + "trigram_tracer.js": trigram_tracerJs, + "unigram_tracer.js": unigram_tracerJs, } // AssetDebug is true if the assets were built with the debug flag enabled. @@ -425,16 +425,16 @@ type bintree struct { } var _bintree = &bintree{nil, map[string]*bintree{ - "4byte_tracer.js": {_4byte_tracerJs, map[string]*bintree{}}, - "bigram_tracer.js": {bigram_tracerJs, map[string]*bintree{}}, - "call_tracer.js": {call_tracerJs, map[string]*bintree{}}, - "callframe_tracer.js": {callframe_tracerJs, map[string]*bintree{}}, - "evmdis_tracer.js": {evmdis_tracerJs, map[string]*bintree{}}, - "noop_tracer.js": {noop_tracerJs, map[string]*bintree{}}, - "opcount_tracer.js": {opcount_tracerJs, map[string]*bintree{}}, - "prestate_tracer.js": {prestate_tracerJs, map[string]*bintree{}}, - "trigram_tracer.js": {trigram_tracerJs, map[string]*bintree{}}, - "unigram_tracer.js": {unigram_tracerJs, map[string]*bintree{}}, + "4byte_tracer.js": {_4byte_tracerJs, map[string]*bintree{}}, + "bigram_tracer.js": {bigram_tracerJs, map[string]*bintree{}}, + "call_tracer.js": {call_tracerJs, map[string]*bintree{}}, + "call_tracer_legacy.js": {call_tracer_legacyJs, map[string]*bintree{}}, + "evmdis_tracer.js": {evmdis_tracerJs, map[string]*bintree{}}, + "noop_tracer.js": {noop_tracerJs, map[string]*bintree{}}, + "opcount_tracer.js": {opcount_tracerJs, map[string]*bintree{}}, + "prestate_tracer.js": {prestate_tracerJs, map[string]*bintree{}}, + "trigram_tracer.js": {trigram_tracerJs, map[string]*bintree{}}, + "unigram_tracer.js": {unigram_tracerJs, map[string]*bintree{}}, }} // RestoreAsset restores an asset under the given directory. diff --git a/eth/tracers/internal/tracers/call_tracer.js b/eth/tracers/internal/tracers/call_tracer.js index 3ca7377738b7..8360cd7c9deb 100644 --- a/eth/tracers/internal/tracers/call_tracer.js +++ b/eth/tracers/internal/tracers/call_tracer.js @@ -1,4 +1,4 @@ -// Copyright 2017 The go-ethereum Authors +// Copyright 2021 The go-ethereum Authors // This file is part of the go-ethereum library. // // The go-ethereum library is free software: you can redistribute it and/or modify @@ -14,212 +14,82 @@ // You should have received a copy of the GNU Lesser General Public License // along with the go-ethereum library. If not, see . -// callTracer is a full blown transaction tracer that extracts and reports all -// the internal calls made by a transaction, along with any useful information. -{ - // callstack is the current recursive call stack of the EVM execution. - callstack: [{}], - - // descended tracks whether we've just descended from an outer transaction into - // an inner call. - descended: false, - - // step is invoked for every opcode that the VM executes. - step: function(log, db) { - // Capture any errors immediately - var error = log.getError(); - if (error !== undefined) { - this.fault(log, db); - return; - } - // We only care about system opcodes, faster if we pre-check once - var syscall = (log.op.toNumber() & 0xf0) == 0xf0; - if (syscall) { - var op = log.op.toString(); - } - // If a new contract is being created, add to the call stack - if (syscall && (op == 'CREATE' || op == "CREATE2")) { - var inOff = log.stack.peek(1).valueOf(); - var inEnd = inOff + log.stack.peek(2).valueOf(); - - // Assemble the internal call report and store for completion - var call = { - type: op, - from: toHex(log.contract.getAddress()), - input: toHex(log.memory.slice(inOff, inEnd)), - gasIn: log.getGas(), - gasCost: log.getCost(), - value: '0x' + log.stack.peek(0).toString(16) - }; - this.callstack.push(call); - this.descended = true - return; - } - // If a contract is being self destructed, gather that as a subcall too - if (syscall && op == 'SELFDESTRUCT') { - var left = this.callstack.length; - if (this.callstack[left-1].calls === undefined) { - this.callstack[left-1].calls = []; - } - this.callstack[left-1].calls.push({ - type: op, - from: toHex(log.contract.getAddress()), - to: toHex(toAddress(log.stack.peek(0).toString(16))), - gasIn: log.getGas(), - gasCost: log.getCost(), - value: '0x' + db.getBalance(log.contract.getAddress()).toString(16) - }); - return - } - // If a new method invocation is being done, add to the call stack - if (syscall && (op == 'CALL' || op == 'CALLCODE' || op == 'DELEGATECALL' || op == 'STATICCALL')) { - // Skip any pre-compile invocations, those are just fancy opcodes - var to = toAddress(log.stack.peek(1).toString(16)); - if (isPrecompiled(to)) { - return - } - var off = (op == 'DELEGATECALL' || op == 'STATICCALL' ? 0 : 1); - - var inOff = log.stack.peek(2 + off).valueOf(); - var inEnd = inOff + log.stack.peek(3 + off).valueOf(); - - // Assemble the internal call report and store for completion - var call = { - type: op, - from: toHex(log.contract.getAddress()), - to: toHex(to), - input: toHex(log.memory.slice(inOff, inEnd)), - gasIn: log.getGas(), - gasCost: log.getCost(), - outOff: log.stack.peek(4 + off).valueOf(), - outLen: log.stack.peek(5 + off).valueOf() - }; - if (op != 'DELEGATECALL' && op != 'STATICCALL') { - call.value = '0x' + log.stack.peek(2).toString(16); - } - this.callstack.push(call); - this.descended = true - return; - } - // If we've just descended into an inner call, retrieve it's true allowance. We - // need to extract if from within the call as there may be funky gas dynamics - // with regard to requested and actually given gas (2300 stipend, 63/64 rule). - if (this.descended) { - if (log.getDepth() >= this.callstack.length) { - this.callstack[this.callstack.length - 1].gas = log.getGas(); - } else { - // TODO(karalabe): The call was made to a plain account. We currently don't - // have access to the true gas amount inside the call and so any amount will - // mostly be wrong since it depends on a lot of input args. Skip gas for now. - } - this.descended = false; - } - // If an existing call is returning, pop off the call stack - if (syscall && op == 'REVERT') { - this.callstack[this.callstack.length - 1].error = "execution reverted"; - return; - } - if (log.getDepth() == this.callstack.length - 1) { - // Pop off the last call and get the execution results - var call = this.callstack.pop(); - if (call.type == 'CREATE' || call.type == "CREATE2") { - // If the call was a CREATE, retrieve the contract address and output code - call.gasUsed = '0x' + bigInt(call.gasIn - call.gasCost - log.getGas()).toString(16); - delete call.gasIn; delete call.gasCost; - - var ret = log.stack.peek(0); - if (!ret.equals(0)) { - call.to = toHex(toAddress(ret.toString(16))); - call.output = toHex(db.getCode(toAddress(ret.toString(16)))); - } else if (call.error === undefined) { - call.error = "internal failure"; // TODO(karalabe): surface these faults somehow - } - } else { - // If the call was a contract call, retrieve the gas usage and output - if (call.gas !== undefined) { - call.gasUsed = '0x' + bigInt(call.gasIn - call.gasCost + call.gas - log.getGas()).toString(16); - } - var ret = log.stack.peek(0); - if (!ret.equals(0)) { - call.output = toHex(log.memory.slice(call.outOff, call.outOff + call.outLen)); - } else if (call.error === undefined) { - call.error = "internal failure"; // TODO(karalabe): surface these faults somehow - } - delete call.gasIn; delete call.gasCost; - delete call.outOff; delete call.outLen; - } - if (call.gas !== undefined) { - call.gas = '0x' + bigInt(call.gas).toString(16); - } - // Inject the call into the previous one - var left = this.callstack.length; - if (this.callstack[left-1].calls === undefined) { - this.callstack[left-1].calls = []; - } - this.callstack[left-1].calls.push(call); - } - }, - - // fault is invoked when the actual execution of an opcode fails. - fault: function(log, db) { - // If the topmost call already reverted, don't handle the additional fault again - if (this.callstack[this.callstack.length - 1].error !== undefined) { - return; - } - // Pop off the just failed call - var call = this.callstack.pop(); - call.error = log.getError(); - - // Consume all available gas and clean any leftovers - if (call.gas !== undefined) { - call.gas = '0x' + bigInt(call.gas).toString(16); - call.gasUsed = call.gas - } - delete call.gasIn; delete call.gasCost; - delete call.outOff; delete call.outLen; - - // Flatten the failed call into its parent - var left = this.callstack.length; - if (left > 0) { - if (this.callstack[left-1].calls === undefined) { - this.callstack[left-1].calls = []; - } - this.callstack[left-1].calls.push(call); - return; - } - // Last call failed too, leave it in the stack - this.callstack.push(call); - }, - - // result is invoked when all the opcodes have been iterated over and returns - // the final result of the tracing. - result: function(ctx, db) { - var result = { - type: ctx.type, - from: toHex(ctx.from), - to: toHex(ctx.to), - value: '0x' + ctx.value.toString(16), - gas: '0x' + bigInt(ctx.gas).toString(16), - gasUsed: '0x' + bigInt(ctx.gasUsed).toString(16), - input: toHex(ctx.input), - output: toHex(ctx.output), - time: ctx.time, - }; - if (this.callstack[0].calls !== undefined) { - result.calls = this.callstack[0].calls; - } - if (this.callstack[0].error !== undefined) { - result.error = this.callstack[0].error; - } else if (ctx.error !== undefined) { - result.error = ctx.error; - } - if (result.error !== undefined && (result.error !== "execution reverted" || result.output ==="0x")) { - delete result.output; - } - return this.finalize(result); - }, +// callFrameTracer uses the new call frame tracing methods to report useful information +// about internal messages of a transaction. +{ + callstack: [{}], + step: function(log, db) {}, + fault: function(log, db) { + var len = this.callstack.length + if (len > 1) { + var call = this.callstack.pop() + if (this.callstack[len-1].calls === undefined) { + this.callstack[len-1].calls = [] + } + this.callstack[len-1].calls.push(call) + } + }, + result: function(ctx, db) { + // Prepare outer message info + var result = { + type: ctx.type, + from: toHex(ctx.from), + to: toHex(ctx.to), + value: '0x' + ctx.value.toString(16), + gas: '0x' + bigInt(ctx.gas).toString(16), + gasUsed: '0x' + bigInt(ctx.gasUsed).toString(16), + input: toHex(ctx.input), + output: toHex(ctx.output), + } + if (this.callstack[0].calls !== undefined) { + result.calls = this.callstack[0].calls + } + if (this.callstack[0].error !== undefined) { + result.error = this.callstack[0].error + } else if (ctx.error !== undefined) { + result.error = ctx.error + } + if (result.error !== undefined && (result.error !== "execution reverted" || result.output ==="0x")) { + delete result.output + } + return this.finalize(result) + }, + enter: function(frame) { + var call = { + type: frame.getType(), + from: toHex(frame.getFrom()), + to: toHex(frame.getTo()), + input: toHex(frame.getInput()), + gas: '0x' + bigInt(frame.getGas()).toString('16'), + } + if (frame.getValue() !== undefined){ + call.value='0x' + bigInt(frame.getValue()).toString(16) + } + this.callstack.push(call) + }, + exit: function(frameResult) { + var len = this.callstack.length + if (len > 1) { + var call = this.callstack.pop() + call.gasUsed = '0x' + bigInt(frameResult.getGasUsed()).toString('16') + var error = frameResult.getError() + if (error === undefined) { + call.output = toHex(frameResult.getOutput()) + } else { + call.error = error + if (call.type === 'CREATE' || call.type === 'CREATE2') { + delete call.to + } + } + len -= 1 + if (this.callstack[len-1].calls === undefined) { + this.callstack[len-1].calls = [] + } + this.callstack[len-1].calls.push(call) + } + }, // finalize recreates a call object using the final desired field oder for json // serialization. This is a nicety feature to pass meaningfully ordered results // to users who don't interpret it, just display it. @@ -239,14 +109,14 @@ } for (var key in sorted) { if (sorted[key] === undefined) { - delete sorted[key]; + delete sorted[key] } } if (sorted.calls !== undefined) { for (var i=0; i. + +// callTracer is a full blown transaction tracer that extracts and reports all +// the internal calls made by a transaction, along with any useful information. +{ + // callstack is the current recursive call stack of the EVM execution. + callstack: [{}], + + // descended tracks whether we've just descended from an outer transaction into + // an inner call. + descended: false, + + // step is invoked for every opcode that the VM executes. + step: function(log, db) { + // Capture any errors immediately + var error = log.getError(); + if (error !== undefined) { + this.fault(log, db); + return; + } + // We only care about system opcodes, faster if we pre-check once + var syscall = (log.op.toNumber() & 0xf0) == 0xf0; + if (syscall) { + var op = log.op.toString(); + } + // If a new contract is being created, add to the call stack + if (syscall && (op == 'CREATE' || op == "CREATE2")) { + var inOff = log.stack.peek(1).valueOf(); + var inEnd = inOff + log.stack.peek(2).valueOf(); + + // Assemble the internal call report and store for completion + var call = { + type: op, + from: toHex(log.contract.getAddress()), + input: toHex(log.memory.slice(inOff, inEnd)), + gasIn: log.getGas(), + gasCost: log.getCost(), + value: '0x' + log.stack.peek(0).toString(16) + }; + this.callstack.push(call); + this.descended = true + return; + } + // If a contract is being self destructed, gather that as a subcall too + if (syscall && op == 'SELFDESTRUCT') { + var left = this.callstack.length; + if (this.callstack[left-1].calls === undefined) { + this.callstack[left-1].calls = []; + } + this.callstack[left-1].calls.push({ + type: op, + from: toHex(log.contract.getAddress()), + to: toHex(toAddress(log.stack.peek(0).toString(16))), + gasIn: log.getGas(), + gasCost: log.getCost(), + value: '0x' + db.getBalance(log.contract.getAddress()).toString(16) + }); + return + } + // If a new method invocation is being done, add to the call stack + if (syscall && (op == 'CALL' || op == 'CALLCODE' || op == 'DELEGATECALL' || op == 'STATICCALL')) { + // Skip any pre-compile invocations, those are just fancy opcodes + var to = toAddress(log.stack.peek(1).toString(16)); + if (isPrecompiled(to)) { + return + } + var off = (op == 'DELEGATECALL' || op == 'STATICCALL' ? 0 : 1); + + var inOff = log.stack.peek(2 + off).valueOf(); + var inEnd = inOff + log.stack.peek(3 + off).valueOf(); + + // Assemble the internal call report and store for completion + var call = { + type: op, + from: toHex(log.contract.getAddress()), + to: toHex(to), + input: toHex(log.memory.slice(inOff, inEnd)), + gasIn: log.getGas(), + gasCost: log.getCost(), + outOff: log.stack.peek(4 + off).valueOf(), + outLen: log.stack.peek(5 + off).valueOf() + }; + if (op != 'DELEGATECALL' && op != 'STATICCALL') { + call.value = '0x' + log.stack.peek(2).toString(16); + } + this.callstack.push(call); + this.descended = true + return; + } + // If we've just descended into an inner call, retrieve it's true allowance. We + // need to extract if from within the call as there may be funky gas dynamics + // with regard to requested and actually given gas (2300 stipend, 63/64 rule). + if (this.descended) { + if (log.getDepth() >= this.callstack.length) { + this.callstack[this.callstack.length - 1].gas = log.getGas(); + } else { + // TODO(karalabe): The call was made to a plain account. We currently don't + // have access to the true gas amount inside the call and so any amount will + // mostly be wrong since it depends on a lot of input args. Skip gas for now. + } + this.descended = false; + } + // If an existing call is returning, pop off the call stack + if (syscall && op == 'REVERT') { + this.callstack[this.callstack.length - 1].error = "execution reverted"; + return; + } + if (log.getDepth() == this.callstack.length - 1) { + // Pop off the last call and get the execution results + var call = this.callstack.pop(); + + if (call.type == 'CREATE' || call.type == "CREATE2") { + // If the call was a CREATE, retrieve the contract address and output code + call.gasUsed = '0x' + bigInt(call.gasIn - call.gasCost - log.getGas()).toString(16); + delete call.gasIn; delete call.gasCost; + + var ret = log.stack.peek(0); + if (!ret.equals(0)) { + call.to = toHex(toAddress(ret.toString(16))); + call.output = toHex(db.getCode(toAddress(ret.toString(16)))); + } else if (call.error === undefined) { + call.error = "internal failure"; // TODO(karalabe): surface these faults somehow + } + } else { + // If the call was a contract call, retrieve the gas usage and output + if (call.gas !== undefined) { + call.gasUsed = '0x' + bigInt(call.gasIn - call.gasCost + call.gas - log.getGas()).toString(16); + } + var ret = log.stack.peek(0); + if (!ret.equals(0)) { + call.output = toHex(log.memory.slice(call.outOff, call.outOff + call.outLen)); + } else if (call.error === undefined) { + call.error = "internal failure"; // TODO(karalabe): surface these faults somehow + } + delete call.gasIn; delete call.gasCost; + delete call.outOff; delete call.outLen; + } + if (call.gas !== undefined) { + call.gas = '0x' + bigInt(call.gas).toString(16); + } + // Inject the call into the previous one + var left = this.callstack.length; + if (this.callstack[left-1].calls === undefined) { + this.callstack[left-1].calls = []; + } + this.callstack[left-1].calls.push(call); + } + }, + + // fault is invoked when the actual execution of an opcode fails. + fault: function(log, db) { + // If the topmost call already reverted, don't handle the additional fault again + if (this.callstack[this.callstack.length - 1].error !== undefined) { + return; + } + // Pop off the just failed call + var call = this.callstack.pop(); + call.error = log.getError(); + + // Consume all available gas and clean any leftovers + if (call.gas !== undefined) { + call.gas = '0x' + bigInt(call.gas).toString(16); + call.gasUsed = call.gas + } + delete call.gasIn; delete call.gasCost; + delete call.outOff; delete call.outLen; + + // Flatten the failed call into its parent + var left = this.callstack.length; + if (left > 0) { + if (this.callstack[left-1].calls === undefined) { + this.callstack[left-1].calls = []; + } + this.callstack[left-1].calls.push(call); + return; + } + // Last call failed too, leave it in the stack + this.callstack.push(call); + }, + + // result is invoked when all the opcodes have been iterated over and returns + // the final result of the tracing. + result: function(ctx, db) { + var result = { + type: ctx.type, + from: toHex(ctx.from), + to: toHex(ctx.to), + value: '0x' + ctx.value.toString(16), + gas: '0x' + bigInt(ctx.gas).toString(16), + gasUsed: '0x' + bigInt(ctx.gasUsed).toString(16), + input: toHex(ctx.input), + output: toHex(ctx.output), + time: ctx.time, + }; + if (this.callstack[0].calls !== undefined) { + result.calls = this.callstack[0].calls; + } + if (this.callstack[0].error !== undefined) { + result.error = this.callstack[0].error; + } else if (ctx.error !== undefined) { + result.error = ctx.error; + } + if (result.error !== undefined && (result.error !== "execution reverted" || result.output ==="0x")) { + delete result.output; + } + return this.finalize(result); + }, + + // finalize recreates a call object using the final desired field oder for json + // serialization. This is a nicety feature to pass meaningfully ordered results + // to users who don't interpret it, just display it. + finalize: function(call) { + var sorted = { + type: call.type, + from: call.from, + to: call.to, + value: call.value, + gas: call.gas, + gasUsed: call.gasUsed, + input: call.input, + output: call.output, + error: call.error, + time: call.time, + calls: call.calls, + } + for (var key in sorted) { + if (sorted[key] === undefined) { + delete sorted[key]; + } + } + if (sorted.calls !== undefined) { + for (var i=0; i. - - -// callFrameTracer uses the new call frame tracing methods to report useful information -// about internal messages of a transaction. -{ - callstack: [{}], - step: function(log, db) {}, - fault: function(log, db) { - var len = this.callstack.length - if (len > 1) { - var call = this.callstack.pop() - if (this.callstack[len-1].calls === undefined) { - this.callstack[len-1].calls = [] - } - this.callstack[len-1].calls.push(call) - } - }, - result: function(ctx, db) { - // Prepare outer message info - var result = { - type: ctx.type, - from: toHex(ctx.from), - to: toHex(ctx.to), - value: '0x' + ctx.value.toString(16), - gas: '0x' + bigInt(ctx.gas).toString(16), - gasUsed: '0x' + bigInt(ctx.gasUsed).toString(16), - input: toHex(ctx.input), - output: toHex(ctx.output), - } - if (this.callstack[0].calls !== undefined) { - result.calls = this.callstack[0].calls - } - if (this.callstack[0].error !== undefined) { - result.error = this.callstack[0].error - } else if (ctx.error !== undefined) { - result.error = ctx.error - } - if (result.error !== undefined && (result.error !== "execution reverted" || result.output ==="0x")) { - delete result.output - } - - return this.finalize(result) - }, - enter: function(frame) { - var call = { - type: frame.getType(), - from: toHex(frame.getFrom()), - to: toHex(frame.getTo()), - input: toHex(frame.getInput()), - gas: '0x' + bigInt(frame.getGas()).toString('16'), - } - if (frame.getValue() !== undefined){ - call.value='0x' + bigInt(frame.getValue()).toString(16) - } - this.callstack.push(call) - }, - exit: function(frameResult) { - var len = this.callstack.length - if (len > 1) { - var call = this.callstack.pop() - call.gasUsed = '0x' + bigInt(frameResult.getGasUsed()).toString('16') - var error = frameResult.getError() - if (error === undefined) { - call.output = toHex(frameResult.getOutput()) - } else { - call.error = error - if (call.type === 'CREATE' || call.type === 'CREATE2') { - delete call.to - } - } - len -= 1 - if (this.callstack[len-1].calls === undefined) { - this.callstack[len-1].calls = [] - } - this.callstack[len-1].calls.push(call) - } - }, - // finalize recreates a call object using the final desired field oder for json - // serialization. This is a nicety feature to pass meaningfully ordered results - // to users who don't interpret it, just display it. - finalize: function(call) { - var sorted = { - type: call.type, - from: call.from, - to: call.to, - value: call.value, - gas: call.gas, - gasUsed: call.gasUsed, - input: call.input, - output: call.output, - error: call.error, - time: call.time, - calls: call.calls, - } - for (var key in sorted) { - if (sorted[key] === undefined) { - delete sorted[key] - } - } - if (sorted.calls !== undefined) { - for (var i=0; i Date: Thu, 16 Sep 2021 12:24:22 +0200 Subject: [PATCH 46/47] eth/tracers: drop step from call_tracer --- eth/tracers/internal/tracers/assets.go | 6 +++--- eth/tracers/internal/tracers/call_tracer.js | 1 - 2 files changed, 3 insertions(+), 4 deletions(-) diff --git a/eth/tracers/internal/tracers/assets.go b/eth/tracers/internal/tracers/assets.go index f38cf6be8688..52cc7f39f519 100644 --- a/eth/tracers/internal/tracers/assets.go +++ b/eth/tracers/internal/tracers/assets.go @@ -2,7 +2,7 @@ // sources: // 4byte_tracer.js (2.933kB) // bigram_tracer.js (1.712kB) -// call_tracer.js (4.283kB) +// call_tracer.js (4.251kB) // call_tracer_legacy.js (8.956kB) // evmdis_tracer.js (4.195kB) // noop_tracer.js (1.271kB) @@ -118,7 +118,7 @@ func bigram_tracerJs() (*asset, error) { return a, nil } -var _call_tracerJs = []byte("\x1f\x8b\x08\x00\x00\x00\x00\x00\x00\xff\xd4\x57\xcd\x6e\xdb\x38\x10\x3e\xcb\x4f\x31\x9b\x43\x6d\xa3\xae\x95\x74\x81\x1e\xdc\xba\x80\x37\x48\x5a\x03\xd9\x24\x70\x9c\x2d\x82\x20\x07\xda\x1a\x49\x6c\x69\x52\x20\xa9\x38\xda\xd4\xef\xbe\x18\xea\xc7\x92\x6c\xa7\xd9\xd3\x62\x73\x8a\x87\xdf\x7c\x33\x9c\x3f\x8e\x7c\x1f\x4e\x55\x92\x69\x1e\xc5\x16\xde\x1f\xbf\x3f\x81\x79\x8c\x10\xa9\x77\x68\x63\xd4\x98\xae\x60\x92\xda\x58\x69\xd3\xf1\x7d\x98\xc7\xdc\x40\xc8\x05\x02\x37\x90\x30\x6d\x41\x85\x60\x5b\x78\xc1\x17\x9a\xe9\x6c\xd8\xf1\xfd\x5c\x67\xef\x31\x31\x84\x1a\x11\x8c\x0a\xed\x9a\x69\x1c\x41\xa6\x52\x58\x32\x09\x1a\x03\x6e\xac\xe6\x8b\xd4\x22\x70\x0b\x4c\x06\xbe\xd2\xb0\x52\x01\x0f\x33\xa2\xe4\x16\x52\x19\xa0\x76\xa6\x2d\xea\x95\x29\xfd\xf8\x72\x79\x0b\x17\x68\x0c\x6a\xf8\x82\x12\x35\x13\x70\x9d\x2e\x04\x5f\xc2\x05\x5f\xa2\x34\x08\xcc\x40\x42\x12\x13\x63\x00\x0b\x47\x47\x8a\xe7\xe4\xca\x4d\xe1\x0a\x9c\xab\x54\x06\xcc\x72\x25\x07\x80\x9c\x3c\x87\x47\xd4\x86\x2b\x09\xbf\x97\xa6\x0a\xc2\x01\x28\x4d\x24\x3d\x66\xe9\x02\x1a\x54\x42\x7a\x7d\x60\x32\x03\xc1\xec\x56\xf5\x15\x01\xd9\xde\x3b\x00\x2e\x9d\x99\x58\x25\x08\x36\x66\x96\x6e\xbd\xe6\x42\xc0\x02\x21\x35\x18\xa6\x62\x40\x6c\x8b\xd4\xc2\xb7\xe9\xfc\xeb\xd5\xed\x1c\x26\x97\x77\xf0\x6d\x32\x9b\x4d\x2e\xe7\x77\x1f\x61\xcd\x6d\xac\x52\x0b\xf8\x88\x39\x15\x5f\x25\x82\x63\x00\x6b\xa6\x35\x93\x36\x03\x15\x12\xc3\x9f\x67\xb3\xd3\xaf\x93\xcb\xf9\xe4\x8f\xe9\xc5\x74\x7e\x07\x4a\xc3\xf9\x74\x7e\x79\x76\x73\x03\xe7\x57\x33\x98\xc0\xf5\x64\x36\x9f\x9e\xde\x5e\x4c\x66\x70\x7d\x3b\xbb\xbe\xba\x39\x1b\xc2\x0d\x92\x57\x48\xfa\xbf\x8e\x79\xe8\xb2\xa7\x11\x02\xb4\x8c\x0b\x53\x46\xe2\x4e\xa5\x60\x62\x95\x8a\x00\x62\xf6\x88\xa0\x71\x89\xfc\x11\x03\x60\xb0\x54\x49\xf6\xea\xa4\x12\x17\x13\x4a\x46\xee\xce\x07\x0b\x12\xa6\x21\x48\x65\x07\x60\x10\xe1\x53\x6c\x6d\x32\xf2\xfd\xf5\x7a\x3d\x8c\x64\x3a\x54\x3a\xf2\x45\x4e\x67\xfc\xcf\xc3\x4e\x87\x48\x97\x4c\x88\x73\xcd\x56\x38\xd7\x6c\x89\x9a\xe2\x6e\x1c\xbd\xc4\xb5\x3b\x84\x90\x4e\xc1\x6a\xb6\xe4\x32\x82\x15\xda\x58\x05\x06\xac\x02\x8d\x89\xd2\xb6\xc8\x14\x70\x19\x2a\xbd\x72\x15\xe5\x9c\x5d\x50\x62\xb8\xb4\xa8\x25\x13\xb0\x42\x63\x58\x84\xae\x8a\x19\x91\x49\xc3\x96\xd6\x95\xcc\x73\x07\x00\x9c\x29\x63\xd9\xf2\xc7\x08\xee\x9f\x37\x0f\x03\x27\x34\x16\x93\x11\x84\xa9\x74\xd0\x9e\x50\xd1\x00\x82\x45\x1f\x9e\x37\xf9\x79\xc8\x52\x61\xf7\x02\xdc\x31\xfd\x3d\x32\x0d\x02\x25\x8c\xc1\xc6\xdc\x0c\x2b\x33\x43\x81\x32\xb2\x71\x85\xe3\x21\xf4\x08\xf7\x19\x4e\xea\xea\x25\x85\x8b\xc4\x0e\x47\xa2\x92\x5e\xbf\x81\x25\x9a\x26\xe8\x5e\xa0\x7c\x77\xf2\x90\x0b\x60\x3c\x1e\xbb\xc6\x0e\xb9\xc4\xa0\x6d\x88\xfe\x5e\x54\x86\xfb\x87\x86\xc2\xa6\xf3\x4a\xd5\x61\x92\x9a\xb8\x47\xff\x6e\xdd\xcd\x95\x8b\x48\x6a\x34\xcd\x50\x2e\xed\x53\x3b\x94\xbe\x0f\xd7\x1a\x13\x9a\x1e\x2a\xa5\xae\x2f\x92\xea\x52\xdf\x08\x78\xce\x06\xe3\xd6\xfd\x6c\x96\xe0\xc8\x25\xdb\x3e\x0d\xe9\xc7\xa0\x71\x1c\x6a\xb5\x72\xc7\x56\x7d\xc5\x27\xf2\x60\x48\xa2\x7e\x13\x65\xd5\xa8\xfc\xa7\x44\x59\xd5\xc2\x3c\x32\x91\x3a\x4b\xdd\xe3\xa7\x2e\xbc\x75\xf6\x9c\x6c\x68\xd5\x8d\xd5\x5c\x46\xbd\x93\x0f\x2d\x9d\x88\x99\x9c\xb8\xd0\x59\xf0\x68\x2a\xad\xe3\x8f\x98\xe9\xbf\xac\x79\x6b\x30\x18\xed\xd7\xa4\xa3\x97\xb4\xb9\x4c\x52\x3b\x6a\xdc\xc7\x89\x5a\x30\x95\xda\x1c\xb7\x85\xe5\xa2\x1a\x6e\xd3\xa8\xe6\x56\x39\x1c\x97\x55\xf4\xdb\xe1\x12\xcc\xf3\x56\x55\xdb\x01\x86\x57\xdb\x43\xad\x95\x7e\x85\xbd\x1c\xb7\xcf\x9e\x3b\xd9\xda\x03\x14\x06\x9d\x31\xba\xff\xbf\xa5\xaf\x74\x0e\x5c\xa0\x01\x6f\xd0\xc2\x9b\x37\x7b\x8e\x8f\xf0\x09\x97\x29\x75\x0b\x68\x7c\x44\x6d\x31\x38\x82\x9f\x3f\x4b\xb3\x79\x7a\xa8\xe3\x8f\x8e\x9f\x8e\xfa\x4d\xd7\x02\x14\x68\xb1\x09\xad\xb9\xd5\xd9\x5e\xc1\xa6\x5a\xe6\x91\x09\xb9\x64\x82\xff\x8d\x85\x27\xfd\x7a\xff\x22\x0d\xda\x5a\xfb\xba\xa1\xdd\x9e\x83\xc5\x10\xdb\xd7\x94\x0e\x3f\x8c\xd0\xce\xb3\x04\x7b\xfd\x7d\x8d\x99\x17\x5e\x05\x3c\xd7\x6a\xd5\xeb\xef\x69\xce\x16\x6e\xae\x76\x50\x45\xc9\xb7\x80\x53\x92\xee\x60\x5d\x5b\x36\x1b\xab\xd2\xf8\xc2\x4c\xaf\x5f\xeb\xad\xee\xc9\x87\xee\xc1\x76\xa8\xb4\xfe\xa2\x41\xd0\xeb\xb7\x0a\xa7\x19\x14\x8a\x54\x3e\x31\xc6\x07\x6c\x17\x2c\xcd\xce\xde\x63\xba\xfd\x62\x34\xe7\x70\x99\xbd\x27\x6e\xdb\xc9\x9b\xe5\x49\xfe\xef\x9e\x32\x17\x83\x62\x80\xc1\x78\x5f\x0e\x72\x17\x8b\x4c\x10\x6c\x37\x1b\x3b\xd6\xcb\x66\x6c\x11\x9c\x91\x78\xcf\x5b\x5a\xc0\x7f\xf5\x6a\x3a\x5f\xcb\x86\xab\x17\xd6\xd6\xc2\x95\x3b\xed\xf5\x9b\x36\x8a\x91\x72\x80\xb1\x74\xb6\x39\x35\xea\xfe\x39\x18\xb5\x90\xf3\xb1\x7b\x3a\x3b\x9b\xcc\xcf\xba\x34\x05\xf6\x9e\xbc\xef\xee\xf3\x1e\xb6\x03\x21\xd7\x52\x3b\x90\xcd\x0b\xef\x3e\xe5\xfa\xdd\x18\x4e\xfe\xf7\x8b\x88\xe7\xfb\x50\x0e\x39\xda\x94\x35\x32\x8b\x86\x56\x65\x2a\x59\xb5\xf8\x8e\x4b\x5a\x37\x69\x0d\xa5\x0d\xd5\x41\x21\x40\xc3\x35\x06\x10\x72\x14\x01\x28\xfa\x66\xa2\x65\xfc\xbb\x51\xd2\x11\x1a\xd4\x9c\x18\xdd\x66\x3a\xcc\xbf\xef\x38\x91\x4a\xbe\x44\x9b\x41\x88\xcc\xa6\x1a\x69\xa1\x4d\x98\x31\xb0\x42\x26\xb9\x8c\xc2\x54\x88\x0c\x94\x0e\x90\xc8\xf3\x89\x6b\x1c\xa1\x55\xb4\xf2\x6a\x03\xeb\x58\x41\xa0\x64\xb7\x58\x73\x13\x8d\xf4\x05\x33\x80\xef\xa9\xb1\xf4\x9d\x93\x08\x96\x01\xb7\xc3\x8e\x57\x5e\xaa\xbe\x5f\x51\x08\xe0\xb9\xe3\x79\xd4\x15\x46\xd1\xeb\xe1\x66\xb3\xe7\x79\xdb\x3d\xa9\xac\xa1\x01\x89\xab\xfd\xc8\x89\xe9\x97\x13\x57\x0b\x51\x51\x3b\x4e\x58\x6d\x40\xdb\x49\xe6\xe4\xd5\x96\x53\x76\x77\x29\xcd\x37\x98\x7a\xcf\xbb\x93\x6a\x3b\x71\x27\xee\x97\x93\x57\xeb\x48\xad\xf3\xdc\x81\x6b\x95\x51\xa3\x81\x72\x2f\xf9\xaa\x7e\x27\xbe\xca\xfd\x71\x45\x51\xc1\xdd\x2f\x92\x6f\x3a\x9e\x47\x59\xec\x51\x70\x7e\x60\x46\x9f\x8a\x79\x8c\xf2\x98\x79\x54\xde\xb9\xe0\xfe\x07\x66\x0f\xbb\xe5\xec\x79\x9e\x57\xf4\x54\x0d\x47\xe2\x4d\xc1\xbf\xa5\x38\xb4\x18\x79\x35\x27\xf8\xf8\xf8\x23\xf0\x4f\x75\x85\x62\xee\x7e\x04\xfe\xf6\x6d\x69\xb2\x7e\x7e\xcf\x1f\xca\x39\x5b\x3d\xdd\xad\xf3\x7e\xdd\xa1\xe2\xad\xcf\x21\x1d\x6f\xd3\xd9\x74\xfe\x09\x00\x00\xff\xff\x62\xa9\x69\x9e\xbb\x10\x00\x00") +var _call_tracerJs = []byte("\x1f\x8b\x08\x00\x00\x00\x00\x00\x00\xff\xd4\x57\x4f\x6f\xdb\xb8\x12\x3f\xcb\x9f\x62\x5e\x0e\xb5\x8d\xba\x56\xd2\x07\xf4\xe0\xd6\x05\xfc\x82\xa4\x35\x90\x97\x04\x8e\xb3\x45\x10\xe4\x40\x5b\x23\x89\x2d\x4d\x0a\x24\x15\xc7\xdb\xfa\xbb\x2f\x86\x94\x64\x49\xb1\xd3\xec\x69\xb1\x39\xc5\xc3\xdf\xfc\x66\x38\xff\x38\x0a\x43\x38\x55\xd9\x46\xf3\x24\xb5\xf0\xfe\xf8\xfd\x09\xcc\x53\x84\x44\xbd\x43\x9b\xa2\xc6\x7c\x05\x93\xdc\xa6\x4a\x9b\x4e\x18\xc2\x3c\xe5\x06\x62\x2e\x10\xb8\x81\x8c\x69\x0b\x2a\x06\xdb\xc2\x0b\xbe\xd0\x4c\x6f\x86\x9d\x30\xf4\x3a\x7b\x8f\x89\x21\xd6\x88\x60\x54\x6c\xd7\x4c\xe3\x08\x36\x2a\x87\x25\x93\xa0\x31\xe2\xc6\x6a\xbe\xc8\x2d\x02\xb7\xc0\x64\x14\x2a\x0d\x2b\x15\xf1\x78\x43\x94\xdc\x42\x2e\x23\xd4\xce\xb4\x45\xbd\x32\xa5\x1f\x5f\x2e\x6f\xe1\x02\x8d\x41\x0d\x5f\x50\xa2\x66\x02\xae\xf3\x85\xe0\x4b\xb8\xe0\x4b\x94\x06\x81\x19\xc8\x48\x62\x52\x8c\x60\xe1\xe8\x48\xf1\x9c\x5c\xb9\x29\x5c\x81\x73\x95\xcb\x88\x59\xae\xe4\x00\x90\x93\xe7\xf0\x88\xda\x70\x25\xe1\xbf\xa5\xa9\x82\x70\x00\x4a\x13\x49\x8f\x59\xba\x80\x06\x95\x91\x5e\x1f\x98\xdc\x80\x60\x76\xa7\xfa\x8a\x80\xec\xee\x1d\x01\x97\xce\x4c\xaa\x32\x04\x9b\x32\x4b\xb7\x5e\x73\x21\x60\x81\x90\x1b\x8c\x73\x31\x20\xb6\x45\x6e\xe1\xdb\x74\xfe\xf5\xea\x76\x0e\x93\xcb\x3b\xf8\x36\x99\xcd\x26\x97\xf3\xbb\x8f\xb0\xe6\x36\x55\xb9\x05\x7c\x44\x4f\xc5\x57\x99\xe0\x18\xc1\x9a\x69\xcd\xa4\xdd\x80\x8a\x89\xe1\xff\x67\xb3\xd3\xaf\x93\xcb\xf9\xe4\x7f\xd3\x8b\xe9\xfc\x0e\x94\x86\xf3\xe9\xfc\xf2\xec\xe6\x06\xce\xaf\x66\x30\x81\xeb\xc9\x6c\x3e\x3d\xbd\xbd\x98\xcc\xe0\xfa\x76\x76\x7d\x75\x73\x36\x84\x1b\x24\xaf\x90\xf4\x7f\x1f\xf3\xd8\x65\x4f\x23\x44\x68\x19\x17\xa6\x8c\xc4\x9d\xca\xc1\xa4\x2a\x17\x11\xa4\xec\x11\x41\xe3\x12\xf9\x23\x46\xc0\x60\xa9\xb2\xcd\xab\x93\x4a\x5c\x4c\x28\x99\xb8\x3b\x1f\x2c\x48\x98\xc6\x20\x95\x1d\x80\x41\x84\x4f\xa9\xb5\xd9\x28\x0c\xd7\xeb\xf5\x30\x91\xf9\x50\xe9\x24\x14\x9e\xce\x84\x9f\x87\x9d\x0e\x91\x2e\x99\x10\xe7\x9a\xad\x70\xae\xd9\x12\x35\xc5\xdd\x38\x7a\x89\x6b\x77\x08\x31\x9d\x82\xd5\x6c\xc9\x65\x02\x2b\xb4\xa9\x8a\x0c\x58\x05\x1a\x33\xa5\x6d\x91\x29\xe0\x32\x56\x7a\xe5\x2a\xca\x39\xbb\xa0\xc4\x70\x69\x51\x4b\x26\x60\x85\xc6\xb0\x04\x5d\x15\x33\x22\x93\x86\x2d\xad\x2b\x99\x9f\x1d\x00\x70\xa6\x8c\x65\xcb\x1f\x23\xb8\xff\xb9\x7d\x18\x38\x61\xcc\x72\x61\x47\x10\xe7\xd2\x61\x7b\x42\x25\x03\x88\x16\x7d\xf0\x3a\xf4\xf7\xc8\x34\x08\x94\x30\x06\x9b\x72\x33\xac\x68\x86\x02\x65\x62\xd3\x0a\xc7\x63\xe8\x11\xee\x33\x9c\xd4\xd5\x4b\x0a\x77\xd3\x67\x1c\x99\xca\x7a\xfd\x06\x96\x68\x9a\xa0\x7b\x81\xf2\xdd\xc9\x83\x17\xc0\x78\x3c\x76\x8d\x1b\x73\x89\x51\xdb\x10\xfd\xbd\xa8\x0c\xf7\x0f\x0d\x85\x6d\xe7\x95\xaa\xc3\x2c\x37\x69\x8f\xfe\xdd\xb9\xeb\x95\xb7\x3e\x92\x1a\x4d\x33\x94\x4b\xfb\xd4\x0e\x65\x18\xc2\xb5\xc6\x8c\xa6\x83\xca\xa9\xab\x8b\xa4\xb9\xd4\x36\x02\xee\xd9\x60\xdc\xba\x9f\xdd\x64\x38\x72\xc9\xb4\x4f\x43\xfa\x31\x68\x1c\xc7\x5a\xad\xdc\xb1\x55\x5f\xf1\x89\x3c\x18\x92\xa8\xdf\x44\x59\x35\x2a\xff\x29\x51\x56\xb5\x30\x8f\x4c\xe4\xce\x52\xf7\xf8\xa9\x0b\x6f\x9d\x3d\x27\x1b\x5a\x75\x63\x35\x97\x49\xef\xe4\x43\x4b\x27\x61\xc6\x13\x17\x3a\x0b\x9e\x4c\xa5\x75\xfc\x09\x33\xfd\x97\x35\x6f\x0d\x46\xa3\xfd\x9a\x74\xf4\x92\x36\x97\x59\x6e\x47\x8d\xfb\x38\x51\x0b\xa6\x72\xeb\x71\x3b\x98\x17\xd5\x70\xdb\x46\x35\xb7\xca\xe1\xb8\xac\xa2\xff\x1c\x2e\x41\x9f\xb7\xaa\xda\x0e\x30\xbc\xda\x1e\x6a\xad\xf4\x2b\xec\x79\xdc\x3e\x7b\xee\x64\x67\x0f\x50\x18\x74\xc6\xe8\xfe\x7f\x97\xbe\xd2\x39\x70\x81\x06\xbc\x41\x0b\x6f\xde\xec\x39\x3e\xc2\x27\x5c\xe6\xd4\x2d\xa0\xf1\x11\xb5\xc5\xe8\x08\x7e\xfd\x2a\xcd\xfa\xf4\x50\xc7\x1f\x1d\x3f\x1d\xf5\x9b\xae\x45\x28\xd0\x62\x13\x5a\x73\xab\xb3\xbb\x82\xcd\xb5\xf4\x91\x89\xb9\x64\x82\xff\x89\x85\x27\xfd\x7a\xff\x22\x0d\xd2\x5a\xfb\xba\xa1\xdc\x9e\x83\xc5\x10\xdb\xd7\x94\x0e\x3f\x4c\xd0\xce\x37\x19\xf6\xfa\xfb\x1a\xd3\x17\x5e\x05\x3c\xd7\x6a\xd5\xeb\xef\x69\xce\x16\x6e\xae\x9e\xa1\x8a\x92\x6f\x01\xa7\x24\x7d\x86\x75\x6d\xd9\x6c\xac\x4a\xe3\x0b\x33\xbd\x7e\xad\xb7\xba\x27\x1f\xba\x07\xdb\xa1\xd2\xfa\x83\x06\x41\xaf\xdf\x2a\x9c\x66\x50\x28\x52\x7e\x62\x8c\x0f\xd8\x2e\x58\x9a\x9d\xbd\xc7\x74\xfb\xc5\x68\xce\xe1\x32\x7b\x4f\xdc\xb6\x93\x37\xf3\x49\xfe\xe7\x9e\x32\x17\x83\x62\x80\xc1\x78\x5f\x0e\xbc\x8b\x45\x26\x08\xf6\x3c\x1b\xcf\xac\x97\xcd\xd8\x22\x38\x23\xf1\x9e\xb7\xb4\x80\xff\xee\xd5\x74\xbe\x96\x0d\x57\x2f\xac\x9d\x85\x2b\x77\xda\xeb\x37\x6d\x14\x23\xe5\x00\x63\xe9\x6c\x73\x6a\xd4\xfd\x73\x30\x6a\x21\xe7\x63\xf7\x74\x76\x36\x99\x9f\x75\x69\x0a\xec\x3d\x79\xdf\xdd\xe7\x3d\xec\x06\x82\xd7\x52\xcf\x20\xdb\x17\xde\x7d\xca\xf5\xbb\x31\x9c\xfc\xeb\x17\x91\x20\x0c\xa1\x1c\x72\xb4\x09\x6b\x64\x16\x0d\xad\xc2\x54\xb2\x6a\xf1\x1d\x97\xb4\x4e\xd2\x9a\x49\x1b\xa8\x83\x42\x84\x86\x6b\x8c\x20\xe6\x28\x22\x50\xf4\x4d\x44\xcb\xf6\x77\xa3\xa4\x23\x34\xa8\x39\x31\xba\xcd\x73\xe8\xbf\xdf\x38\x91\x4a\xbe\x44\xbb\x81\x18\x99\xcd\x35\xd2\xc2\x9a\x31\x63\x60\x85\x4c\x72\x99\xc4\xb9\x10\x1b\x50\x3a\x42\x22\xf7\x13\xd7\x38\x42\xab\x68\xa5\xd5\x06\xd6\xa9\x82\x48\xc9\x6e\xb1\xc6\x66\x1a\xe9\x0b\x65\x00\xdf\x73\x63\xe9\x3b\x26\x13\x6c\x03\xdc\x0e\x3b\x41\x79\xa9\xfa\x7e\x45\x21\x80\x9f\x9d\x20\xa0\xae\x30\x8a\x5e\x0f\x37\x9b\x83\x20\xd8\xed\x49\x65\x0d\x0d\x48\x5c\xed\x47\x4e\x4c\xbf\x9c\xb8\x5a\x88\x8a\xda\x71\xc2\x6a\x03\xda\x4d\x32\x27\xaf\xb6\x9c\xb2\xbb\x4b\xa9\xdf\x60\xea\x3d\xef\x4e\xaa\xed\xc4\x9d\xb8\x5f\x4e\x5e\xad\x23\xb5\xce\x73\x07\xae\x55\x46\x8d\x06\xf2\x5e\xf2\x55\xfd\x4e\x7c\xe5\xfd\x71\x45\x51\xc1\xdd\x2f\x92\x6f\x3b\x41\x40\x59\xec\x51\x70\x7e\xe0\x86\x3e\x05\x7d\x8c\x7c\xcc\x02\x2a\x6f\x2f\xb8\xff\x81\x9b\x87\xe7\xe5\x1c\x04\x41\x50\xf4\x54\x0d\x47\xe2\x6d\xc1\xbf\xa3\x38\xb4\x18\x05\x35\x27\xf8\xf8\xf8\x23\xf0\x4f\x75\x85\x62\xee\x7e\x04\xfe\xf6\x6d\x69\xb2\x7e\x7e\xcf\x1f\xca\x39\x5b\x3d\xdd\xad\xf3\x7e\xdd\xa1\xe2\xad\xf7\x90\x4e\xb0\xed\x6c\x3b\x7f\x05\x00\x00\xff\xff\x71\x10\x40\x55\x9b\x10\x00\x00") func call_tracerJsBytes() ([]byte, error) { return bindataRead( @@ -134,7 +134,7 @@ func call_tracerJs() (*asset, error) { } info := bindataFileInfo{name: "call_tracer.js", size: 0, mode: os.FileMode(0), modTime: time.Unix(0, 0)} - a := &asset{bytes: bytes, info: info, digest: [32]uint8{0xae, 0xac, 0xeb, 0x36, 0x91, 0xf2, 0x8b, 0x29, 0xaa, 0xa, 0x55, 0x2e, 0xc4, 0xd7, 0x3b, 0xab, 0x2f, 0xac, 0xf6, 0x18, 0xe0, 0x18, 0x64, 0x36, 0xc4, 0xdf, 0xd9, 0xdc, 0xe9, 0xb1, 0x94, 0x78}} + a := &asset{bytes: bytes, info: info, digest: [32]uint8{0x96, 0x54, 0x29, 0x1, 0x3b, 0x86, 0xea, 0xb2, 0x35, 0xbd, 0x97, 0xb1, 0x17, 0x8c, 0x17, 0x79, 0x1c, 0x4c, 0x8e, 0x7b, 0xe2, 0x5f, 0x11, 0x59, 0xa0, 0x94, 0x35, 0x43, 0xec, 0x18, 0x2a, 0xd9}} return a, nil } diff --git a/eth/tracers/internal/tracers/call_tracer.js b/eth/tracers/internal/tracers/call_tracer.js index 8360cd7c9deb..98cfa0e6d455 100644 --- a/eth/tracers/internal/tracers/call_tracer.js +++ b/eth/tracers/internal/tracers/call_tracer.js @@ -19,7 +19,6 @@ // about internal messages of a transaction. { callstack: [{}], - step: function(log, db) {}, fault: function(log, db) { var len = this.callstack.length if (len > 1) { From 3f79aaadb90b9c2e2066e217689d9cd63ebfae09 Mon Sep 17 00:00:00 2001 From: Martin Holst Swende Date: Thu, 16 Sep 2021 22:55:15 +0200 Subject: [PATCH 47/47] eth/tracers: simplify tracer benchmark --- eth/tracers/tracers_test.go | 21 ++------------------- 1 file changed, 2 insertions(+), 19 deletions(-) diff --git a/eth/tracers/tracers_test.go b/eth/tracers/tracers_test.go index acf8713aaf5b..ae0eb16a3852 100644 --- a/eth/tracers/tracers_test.go +++ b/eth/tracers/tracers_test.go @@ -388,42 +388,25 @@ func BenchmarkTransactionTrace(b *testing.B) { } func BenchmarkTracers(b *testing.B) { - files, err := ioutil.ReadDir(filepath.Join("testdata", "call_tracer_legacy")) + files, err := ioutil.ReadDir(filepath.Join("testdata", "call_tracer")) if err != nil { b.Fatalf("failed to retrieve tracer test suite: %v", err) } - for _, file := range files { if !strings.HasSuffix(file.Name(), ".json") { continue } file := file // capture range variable b.Run(camel(strings.TrimSuffix(file.Name(), ".json")), func(b *testing.B) { - // Call tracer test found, read if from disk - legacyBlob, err := ioutil.ReadFile(filepath.Join("testdata", "call_tracer_legacy", file.Name())) - if err != nil { - b.Fatalf("failed to read testcase: %v", err) - } - // Read out test for call frame tracer blob, err := ioutil.ReadFile(filepath.Join("testdata", "call_tracer", file.Name())) if err != nil { b.Fatalf("failed to read testcase: %v", err) } - legacyTest := new(callTracerTest) - if err := json.Unmarshal(legacyBlob, legacyTest); err != nil { - b.Fatalf("failed to parse testcase: %v", err) - } test := new(callTracerTest) if err := json.Unmarshal(blob, test); err != nil { b.Fatalf("failed to parse testcase: %v", err) } - - b.Run("legacy", func(b *testing.B) { - benchTracer("callTracerLegacy", legacyTest, b) - }) - b.Run("scoped", func(b *testing.B) { - benchTracer("callTracer", test, b) - }) + benchTracer("callTracer", test, b) }) } }