aboutsummaryrefslogtreecommitdiffstats
path: root/core/vm/logger.go
Commit message (Collapse)AuthorAgeFilesLines
* Change import go github.com/dexon-foundation/dexonWei-Ning Huang2019-06-121-4/+4
|
* core/vm: adds refund as part of the json standard trace (#17910)Martin Holst Swende2018-10-231-11/+12
| | | | | | | This adds the global accumulated refund counter to the standard json output as a numeric json value. Previously this was not very interesting since it was not used much, but with the new sstore gas changes the value is a lot more interesting from a consensus investigation perspective.
* core/vm: clear linter warnings (#17057)Guillaume Ballet2018-06-261-0/+8
| | | | | | | | * core/vm: clear linter warnings * core/vm: review input * core/vm.go: revert lint in noop as per request
* core: golint updates for this or self warning (#16633)kiel barry2018-05-021-2/+2
|
* cmd/evm: print vm output when debug flag is on (#16326)dm42018-04-061-0/+7
|
* all: update generated code (#15808)Felix Lange2018-01-081-6/+14
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | * core/types, core/vm, eth, tests: regenerate gencodec files * Makefile: update devtools target Install protoc-gen-go and print reminders about npm, solc and protoc. Also switch to github.com/kevinburke/go-bindata because it's more maintained. * contracts/ens: update contracts and regenerate with solidity v0.4.19 The newer upstream version of the FIFSRegistrar contract doesn't set the resolver anymore. The resolver is now deployed separately. * contracts/release: regenerate with solidity v0.4.19 * contracts/chequebook: fix fallback and regenerate with solidity v0.4.19 The contract didn't have a fallback function, payments would be rejected when compiled with newer solidity. References to 'mortal' and 'owned' use the local file system so we can compile without network access. * p2p/discv5: regenerate with recent stringer * cmd/faucet: regenerate * dashboard: regenerate * eth/tracers: regenerate * internal/jsre/deps: regenerate * dashboard: avoid sed -i because it's not portable * accounts/usbwallet/internal/trezor: fix go generate warnings
* tests: update to upstream commit 2bb0c3da3b (#15806)Felix Lange2018-01-041-8/+12
| | | | Also raise traceLimit once again and print the VM error and output on failure.
* cmd, core, eth/tracers: support fancier js tracing (#15516)Péter Szilágyi2017-12-211-0/+10
| | | | | | | | | | | | | | | | | | | | | | | | | | | | * cmd, core, eth/tracers: support fancier js tracing * eth, internal/web3ext: rework trace API, concurrency, chain tracing * eth/tracers: add three more JavaScript tracers * eth/tracers, vendor: swap ottovm to duktape for tracing * core, eth, internal: finalize call tracer and needed extras * eth, tests: prestate tracer, call test suite, rewinding * vendor: fix windows builds for tracer js engine * vendor: temporary duktape fix * eth/tracers: fix up 4byte and evmdis tracer * vendor: pull in latest duktape with my upstream fixes * eth: fix some review comments * eth: rename rewind to reexec to make it more obvious * core/vm: terminate tracing using defers
* core/vm, internal/ethapi: tracer no full storage, nicer json output (#15499)Péter Szilágyi2017-11-171-22/+4
| | | | | | * core/vm, internal/ethapi: tracer no full storage, nicer json output * core/vm, internal/ethapi: omit disabled trace fields
* consensus, core, tests: implement Metropolis EIP 649Péter Szilágyi2017-08-241-6/+2
|
* cmd/evm, core/vm, internal/ethapi: Show error when exiting (#14985)Martin Holst Swende2017-08-231-2/+5
| | | | | | * cmd/evm, core/vm, internal/ethapi: Add 'err' to tracer interface CaptureEnd * cmd/evm: fix nullpointer when there is no error
* core/vm: remove logging and add section labels to struct logs (#14782)Felix Lange2017-07-191-9/+16
|
* cmd/evm, core/vm: add --nomemory, --nostack to evm (#14617)Martin Holst Swende2017-06-211-20/+16
|
* cmd/evm: add --prestate, --sender, --json flags for fuzzing (#14476)Martin Holst Swende2017-06-071-12/+40
|
* core/vm: use uint64 instead of *big.Int in tracer (#3805)Yohann Leon2017-03-221-5/+5
|
* core/evm, core/vm: improved evm trace outputJeffrey Wilcke2017-03-011-15/+25
| | | | | | | | * Improved the standard evm tracer output and renamed it to WriteTrace which now takes an io.Writer to write the logs to. * Added WriteLogs which writes logs to the given writer in a readable format. * evm utility now also prints logs generated during the execution.
* cmd/evm, core/asm: add EVM assembler (#3686)Jeffrey Wilcke2017-03-011-18/+2
| | | | | The evm compile command implements a simple assembly language that compiles to EVM bytecode.
* all: unify big.Int zero checks, use common/math in more places (#3716)Felix Lange2017-02-281-1/+2
| | | | | | | | | | | | | | | | | | | | | | | | | | | | * common/math: optimize PaddedBigBytes, use it more name old time/op new time/op delta PaddedBigBytes-8 71.1ns ± 5% 46.1ns ± 1% -35.15% (p=0.000 n=20+19) name old alloc/op new alloc/op delta PaddedBigBytes-8 48.0B ± 0% 32.0B ± 0% -33.33% (p=0.000 n=20+20) * all: unify big.Int zero checks Various checks were in use. This commit replaces them all with Int.Sign, which is cheaper and less code. eg templates: func before(x *big.Int) bool { return x.BitLen() == 0 } func after(x *big.Int) bool { return x.Sign() == 0 } func before(x *big.Int) bool { return x.BitLen() > 0 } func after(x *big.Int) bool { return x.Sign() != 0 } func before(x *big.Int) int { return x.Cmp(common.Big0) } func after(x *big.Int) int { return x.Sign() } * common/math, crypto/secp256k1: make ReadBits public in package math
* core, core/state, core/vm: remove exported account getters (#3618)Jeffrey Wilcke2017-02-231-1/+2
| | | | Removed exported statedb object accessors, reducing the chance for nasty bugs to creep in. It's also ugly and unnecessary to have these methods.
* core/vm: improved EVM run loop & instruction calling (#3378)Jeffrey Wilcke2017-01-051-5/+5
| | | | | | | | | | | | | | | The run loop, which previously contained custom opcode executes have been removed and has been simplified to a few checks. Each operation consists of 4 elements: execution function, gas cost function, stack validation function and memory size function. The execution function implements the operation's runtime behaviour, the gas cost function implements the operation gas costs function and greatly depends on the memory and stack, the stack validation function validates the stack and makes sure that enough items can be popped off and pushed on and the memory size function calculates the memory required for the operation and returns it. This commit also allows the EVM to go unmetered. This is helpful for offline operations such as contract calls.
* core, core/vm: implemented a generic environment (#3348)Jeffrey Wilcke2016-12-061-4/+4
| | | | | | | | Environment is now a struct (not an interface). This reduces a lot of tech-debt throughout the codebase where a virtual machine environment had to be implemented in order to test or run it. The new environment is suitable to be used en the json tests, core consensus and light client.
* vm, ethapi: add `limit` option to traceTransactionYoichi Hirai2016-09-301-2/+9
| | | | | | | | | | | | that specifies the maximum number of elements in the `structLogs` output. This option is useful for debugging a transaction that involves a large number of repetition. For example, ``` debug.traceTransaction(tx, {disableStorage: true, limit: 2}) ``` shows at most the first two steps in the `structLogs`.
* core/vm: Refactor tracing to make Tracer the main interfaceNick Johnson2016-08-221-30/+34
| | | | | | | | | | | | | | | | | | | | | | | | | | This CL makes several refactors: - Define a Tracer interface, implementing the `CaptureState` method - Add the VM environment as the first argument of `Tracer.CaptureState` - Rename existing functionality `StructLogger` an make it an implementation of `Tracer` - Delete `StructLogCollector` and make `StructLogger` collect the logs directly - Change all callers to use the new `StructLogger` where necessary and extract logs from that. - Deletes the apparently obsolete and likely nonfunctional 'TraceCall' from the eth API. Callers that only wish accumulated logs can use the `StructLogger` implementation straightforwardly. Callers that wish to efficiently capture VM traces and operate on them without excessive copying can now implement the `Tracer` interface to receive VM state at each step and do with it as they wish. This CL also removes the accumulation of logs from the vm.Environment; this was necessary as part of the refactor, but also simplifies it by removing a responsibility that doesn't directly belong to the Environment.
* core: added basic chain configurationJeffrey Wilcke2016-04-011-1/+1
| | | | | | | | | Added chain configuration options and write out during genesis database insertion. If no "config" was found, nothing is written to the database. Configurations are written on a per genesis base. This means that any chain (which is identified by it's genesis hash) can have their own chain settings.
* core: Added EVM configuration optionsJeffrey Wilcke2016-03-241-1/+132
| | | | | The EVM is now initialised with an additional configured object that allows you to turn on debugging options.
* cmd/evm, core/vm, test: refactored VM and coreJeffrey Wilcke2015-10-041-0/+1
| | | | | | | | | | | | | | | | | * Moved `vm.Transfer` to `core` package and changed execution to call `env.Transfer` instead of `core.Transfer` directly. * core/vm: byte code VM moved to jump table instead of switch * Moved `vm.Transfer` to `core` package and changed execution to call `env.Transfer` instead of `core.Transfer` directly. * Byte code VM now shares the same code as the JITVM * Renamed Context to Contract * Changed initialiser of state transition & unexported methods * Removed the Execution object and refactor `Call`, `CallCode` & `Create` in to their own functions instead of being methods. * Removed the hard dep on the state for the VM. The VM now depends on a Database interface returned by the environment. In the process the core now depends less on the statedb by usage of the env * Moved `Log` from package `core/state` to package `core/vm`.
* all: fix license headers one more timeFelix Lange2015-07-241-1/+1
| | | | I forgot to update one instance of "go-ethereum" in commit 3f047be5a.
* all: update license headers to distiguish GPL/LGPLFelix Lange2015-07-231-4/+4
| | | | | All code outside of cmd/ is licensed as LGPL. The headers now reflect this by calling the whole work "the go-ethereum library".
* all: update license informationFelix Lange2015-07-071-0/+16
|
* core/vm: Improved error reporting for trace loggingobscuren2015-06-121-2/+7
|
* core/vm: fixed printable characters using unicode insteadobscuren2015-06-121-2/+2
|
* core/vm: reverse loop stackobscuren2015-06-111-2/+3
|
* core, core/vm: moved logger and added gas cost to struct loggingobscuren2015-06-111-0/+45