Martin Holst Swende
0fda25e471
eth/tracers, core: use scopecontext in tracers, provide statedb in capturestart ( #22333 )
...
Fixes the CaptureStart api to include the EVM, thus being able to set the statedb early on. This pr also exposes the struct we used internally in the interpreter to encapsulate the contract, mem, stack, rstack, so we pass it as a single struct to the tracer, and removes the error returns on the capture methods.
4 years ago
Péter Szilágyi
7834e4a278
core, eth: unship EIP 2315
4 years ago
Martin Holst Swende
6487c002f6
all: implement EIP-2929 (gas cost increases for state access opcodes) + yolo-v2 ( #21509 )
...
* core/vm, core/state: implement EIP-2929 + YOLOv2
* core/state, core/vm: fix some review concerns
* core/state, core/vm: address review concerns
* core/vm: address review concerns
* core/vm: better documentation
* core/vm: unify sload cost as fully dynamic
* core/vm: fix typo
* core/vm/runtime: fix compilation flaw
* core/vm/runtime: fix renaming-err leftovers
* core/vm: renaming
* params/config: use correct yolov2 chainid for config
* core, params: use a proper new genesis for yolov2
* core/state/tests: golinter nitpicks
4 years ago
Péter Szilágyi
508891e64b
core/vm: use pointers to operations vs. copy by value
4 years ago
Martin Holst Swende
e376d2fb31
cmd/evm: add state transition tool for testing ( #20958 )
...
This PR implements the EVM state transition tool, which is intended
to be the replacement for our retesteth client implementation.
Documentation is present in the cmd/evm/README.md file.
Co-authored-by: Felix Lange <fjl@twurst.com>
4 years ago
Paweł Bylica
cf6674539c
core/vm: use uint256 in EVM implementation ( #20787 )
...
* core/vm: use fixed uint256 library instead of big
* core/vm: remove intpools
* core/vm: upgrade uint256, fixes uint256.NewFromBig
* core/vm: use uint256.Int by value in Stack
* core/vm: upgrade uint256 to v1.0.0
* core/vm: don't preallocate space for 1024 stack items (only 16)
Co-authored-by: Martin Holst Swende <martin@swende.se>
5 years ago
Greg Colvin
cd57d5cd38
core/vm: EIP-2315, JUMPSUB for the EVM ( #20619 )
...
* core/vm: implement EIP 2315, subroutines for the EVM
* core/vm: eip 2315 - lintfix + check jump dest validity + check ret stack size constraints
logger: markdown-friendly traces, validate jumpdest, more testcase, correct opcodes
* core/vm: update subroutines acc to eip: disallow walk-into
* core/vm/eips: gas cost changes for subroutines
* core/vm: update opcodes for EIP-2315
* core/vm: define RETURNSUB as a 'jumping' operation + review concerns
Co-authored-by: Martin Holst Swende <martin@swende.se>
5 years ago
Martin Holst Swende
8dc8941551
core/vm: use a callcontext struct ( #20761 )
...
* core/vm: use a callcontext struct
* core/vm: fix tests
* core/vm/runtime: benchmark
* core/vm: make intpool push inlineable, unexpose callcontext
5 years ago
Gregory Markou
4be8840120
core/vm: use dedicated SLOAD gas constant for EIP-2200 ( #20646 )
5 years ago
Péter Szilágyi
3bb9b49afb
core/vm, params: implement EIP2200, SSTORE optimizations ( #19964 )
...
* core/vm, params: implement EIP2200, SSTORE optimizations
* core/vm, params: switch EIP2200 to Wei's version
5 years ago
Martin Holst Swende
081642ed25
Eip 1344 (ChainID opcode) ( #19921 )
...
* core/vm: implement EIP 1344 (ChainID opcode)
* core/vm: formatting
5 years ago
Martin Holst Swende
3e993ff64a
Eip 1884 v3 ( #19743 )
...
* core/vm, tests: implement EIP 1884, add support for feature-tests
* core/vm: 1884-changes to extcodehash, move selfbalance opcode
* tests: fix statetests
* core/vm: move constants, address review concerns
* core/vm: word formatting
Co-Authored-By: Péter Szilágyi <peterke@gmail.com>
5 years ago