Commit Graph

19 Commits

Author SHA1 Message Date
Trung Nguyen bc204f148d
run goimports 2019-05-20 11:23:12 -04:00
amalraj.manigmail.com 47571689ee Merge remote-tracking branch 'remotes/goeth/release/1.8' into geth-upgrade-1.8.15_new
# Conflicts:
#	.travis.yml
#	README.md
#	cmd/utils/flags.go
#	consensus/consensus.go
#	consensus/ethash/consensus.go
#	consensus/ethash/ethash.go
#	core/blockchain.go
#	core/genesis_test.go
#	core/state/state_object.go
#	core/state_processor.go
#	core/vm/errors.go
#	core/vm/evm.go
#	core/vm/gas_table.go
#	core/vm/instructions_test.go
#	core/vm/interface.go
#	eth/api_tracer.go
#	eth/backend.go
#	eth/config.go
#	eth/filters/filter.go
#	les/backend.go
#	les/helper_test.go
#	miner/worker.go
#	params/config.go
#	params/version.go
2018-10-04 16:19:02 +08:00
Guillaume Ballet 7abedf9bbb
core/vm: support for multiple interpreters (#17093)
- Define an Interpreter interface
- One contract can call contracts from other interpreter types.
- Pass the interpreter to the operands instead of the evm.
  This is meant to prevent type assertions in operands.
2018-07-25 08:56:39 -04:00
Guillaume Ballet 598f786aab core/vm: clear linter warnings (#17057)
* core/vm: clear linter warnings

* core/vm: review input

* core/vm.go: revert lint in noop as per request
2018-06-26 15:56:25 +03:00
Patrick Mylund Nielsen 3d91976f08
Geth 1.7.2 rebase and addition of Istanbul BFT (#207) 2017-10-31 18:24:11 -04:00
Péter Szilágyi 08f27428b4
core, tests: implement Metropolis EIP 684 2017-08-25 13:00:27 +03:00
Jeffrey Wilcke bbc4ea4ae8 core/vm: improved EVM run loop & instruction calling (#3378)
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.
2017-01-05 11:52:10 +01:00
Jeffrey Wilcke 3fc7c97827 core, core/vm: implemented a generic environment (#3348)
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.
2016-12-06 02:16:03 +01:00
Yoichi Hirai bb6115b737 vm, ethapi: add `limit` option to traceTransaction
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`.
2016-09-30 17:36:00 +02:00
Gustav Simonsson 371871d685 parmas, crypto, core, core/vm: homestead consensus protocol changes
* change gas cost for contract creating txs
* invalidate signature with s value greater than secp256k1 N / 2
* OOG contract creation if not enough gas to store code
* new difficulty adjustment algorithm
* new DELEGATECALL op code
2016-02-18 10:08:11 +01:00
Gustav Simonsson b81a6e6ab8 core, core/vm, core/state: remove unused functions 2015-09-10 21:10:58 +02:00
Felix Lange bfbcfbe4a9 all: fix license headers one more time
I forgot to update one instance of "go-ethereum" in commit 3f047be5a.
2015-07-23 18:35:11 +02:00
Felix Lange 3f047be5aa all: update license headers to distiguish GPL/LGPL
All code outside of cmd/ is licensed as LGPL. The headers
now reflect this by calling the whole work "the go-ethereum library".
2015-07-22 18:51:45 +02:00
Felix Lange ea54283b30 all: update license information 2015-07-07 14:12:44 +02:00
Jeffrey Wilcke e6bb9c1cad core, miner: removed vm errors from consensus err checking
Removed VM errors from the consensus errors. They now used for output
only.
2015-07-06 12:43:05 +02:00
Gustav Simonsson 0f04af5916 Fix core error forwarding, unify OOG VM err 2015-07-04 09:27:42 +02:00
obscuren 287f990891 core/vm: Improved error reporting for trace logging 2015-06-12 13:35:14 +02:00
Gustav Simonsson c26c8d3a44 Read most protocol params from common/params.json
* 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
2015-04-02 06:22:32 +02:00
obscuren 0330077d76 moved state and vm to core 2015-03-23 16:59:09 +01:00