aboutsummaryrefslogtreecommitdiffstats
path: root/core/vm/stack.go
Commit message (Collapse)AuthorAgeFilesLines
* core: vm: Optimize evm (#13)Jimmy Hu2019-04-091-1/+14
| | | | | | | * core: vm: add an EVM benchmark * core: vm: optimize stack allocation and instruction for calculating 2^n * Add DEXONBet bench
* core/vm: clear linter warnings (#17057)Guillaume Ballet2018-06-261-1/+3
| | | | | | | | * core/vm: clear linter warnings * core/vm: review input * core/vm.go: revert lint in noop as per request
* core/vm: allocate stack to 1024Jeffrey Wilcke2017-05-251-1/+1
| | | | | Pre allocate the stack to 1024 optimising stack pushing, reducing calls to runtime.makeslice and runtime.mallocgc
* core/vm: expose intpool to stack dup methodJeffrey Wilcke2017-05-231-2/+2
| | | | | Improve the duplication method of the stack to reuse big ints by passing in an existing integer pool.
* core/vm: improved EVM run loop & instruction calling (#3378)Jeffrey Wilcke2017-01-051-0/+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/vm: Refactor tracing to make Tracer the main interfaceNick Johnson2016-08-221-13/+13
| | | | | | | | | | | | | | | | | | | | | | | | | | 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/vm: added JIT segmenting / optimisationsJeffrey Wilcke2015-10-171-0/+3
| | | | | * multi-push segments * static jumps segments
* core/vm: reduced big int allocationsJeffrey Wilcke2015-08-071-4/+7
| | | | | | | Reduced big int allocation by making stack items modifiable. Instead of adding items such as `common.Big0` to the stack, `new(big.Int)` is added instead. One must expect that any item that is added to the stack might change.
* core/vm, tests: implemented semi-jit vmJeffrey Wilcke2015-08-071-13/+8
| | | | * changed stack and removed stack ptr. Let go decide on slice reuse.
* 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: fixed a bug where `Data` ignored the stack ptrobscuren2015-06-111-1/+1
|
* core/vm: unexported stack again. No longer requiredobscuren2015-06-101-12/+12
|
* core, core/vm: added structure loggingobscuren2015-06-101-11/+15
| | | | This also reduces the time required spend in the VM
* Read most protocol params from common/params.jsonGustav Simonsson2015-04-021-2/+0
| | | | | | | | | * Add params package with exported variables generated from github.com/ethereum/common/blob/master/params.json * Use params package variables in applicable places * Add check for minimum gas limit in validation of block's gas limit * Remove common/params.json from go-ethereum to avoid outdated version of it
* Removed defer/panic. #503obscuren2015-03-271-6/+4
|
* Stack limitobscuren2015-03-271-0/+6
|
* moved state and vm to coreobscuren2015-03-231-0/+65