philip-morlier
968e79b705
Merge tag 'v1.10.14' into develop
2021-12-23 10:21:12 -08:00
Andrei Maiboroda
3e47e38a4e
core/vm: Make INVALID a defined opcode ( #24017 )
...
* core/vm: Define 0xfe opcode as INVALID
* core/vm: Remove opInvalid as opUndefined handles it
Co-authored-by: Alex Beregszaszi <alex@rtfs.hu>
2021-12-17 13:44:05 +01:00
Paweł Bylica
81ec6b1d4c
core/vm: reverse bit order in bytes of code bitmap ( #24120 )
...
* core/vm: reverse bit order in bytes of code bitmap
This bit order is more natural for bit manipulation operations and we
can eliminate some small number of CPU instructions.
* core/vm: drop lookup table
2021-12-17 10:32:00 +01:00
Martin Holst Swende
155795be99
core/vm: avoid memory expansion check for trivial ops ( #24048 )
2021-12-14 11:30:20 +01:00
Alex Beregszaszi
ae8ff2661d
core/vm: remove unused code (IsStaticJump) ( #24085 )
2021-12-09 13:55:06 +01:00
Martin Holst Swende
a95675d50f
core/vm: remove no-recursion option from config
2021-12-06 09:55:50 +01:00
Andrei Maiboroda
b02fe5317f
core/vm: move interpreter interruption check to jump instructions ( #24026 )
...
* core/vm: Remove interpreter loop interruption check
* core/vm: Unit test for interpreter loop interruption
* core/vm: Check for interpreter loop abort on every jump
2021-12-03 11:10:26 +01:00
Paweł Bylica
9331fe28e8
core/vm: fill gaps in jump table with opUndefined ( #24031 )
2021-12-03 11:04:54 +01:00
Alex Beregszaszi
a0f7771962
core/vm: remove stack.pushN ( #24040 )
2021-12-03 10:16:49 +01:00
Alex Beregszaszi
2be129b5cf
core/vm: rename opSuicide to opSelfdestruct ( #24022 )
...
The opcode was renamed in the codebase in 2017, but the functions were kept unchanged.
2021-12-01 10:33:29 +01:00
Alex Beregszaszi
9393d1fb5d
core/vm: Move interpreter.ReadOnly check into the opcode implementations ( #23970 )
...
* core/vm: Move interpreter.ReadOnly check into the opcode implementations
Also remove the same check from the interpreter inner loop.
* core/vm: Remove obsolete operation.writes flag
* core/vm: Capture fault states in logger
Co-authored-by: Martin Holst Swende <martin@swende.se>
* core/vm: Remove panic added for testing
Co-authored-by: Martin Holst Swende <martin@swende.se>
2021-12-01 10:21:21 +01:00
Andrei Maiboroda
163f1665dd
core/vm: don't copy JumpTable when no EIP mods are needed ( #23977 )
2021-11-30 14:21:40 +02:00
Alex Beregszaszi
a69d4b273d
core/vm: Rename SHA3 instruction to KECCAK256 ( #23976 )
...
This was proposed in 2016, Solidity uses this since 2017, and evmone and other VMs use the keccak256 name. This brings geth in line with those.
2021-11-30 10:34:34 +01:00
Austin Roberts
72b7820579
Merge tag 'v1.10.13' into HEAD
2021-11-29 10:16:31 -06:00
Austin Roberts
6060d4adc9
Merge tag 'v1.10.12' into HEAD
2021-11-29 10:16:13 -06:00
Paweł Bylica
1fa91729f2
core/vm: simplify error handling in interpreter loop ( #23952 )
...
* core/vm: break loop on any error
* core/vm: move ErrExecutionReverted to opRevert()
* core/vm: use "stop token" to stop the loop
* core/vm: unconditionally pc++ in the loop
* core/vm: set return data in instruction impls
2021-11-29 14:46:24 +01:00
Andrei Maiboroda
519cf98b69
core/vm: simplify op lookup in contract ( #23974 )
2021-11-25 20:10:01 +01:00
Péter Szilágyi
4ebeca19d7
Merge pull request #23967 from ipsilon/evm_jumptable_type
...
core/vm: use proper JumpTable type
2021-11-25 14:18:34 +02:00
Sina Mahmoodi
1876cb443b
all: move loggers to eth/tracers ( #23892 )
...
* all: mv loggers to eth/tracers
* core/vm: minor
* eth/tracers: tmp comment out testStoreCapture
* eth/tracers: uncomment and fix logger test
* eth/tracers: simplify test
* core/vm: re-add license
* core/vm: minor
* rename LogConfig to Config
2021-11-25 14:17:09 +02:00
Martin Holst Swende
9055cc14ec
core/vm, core/state/snapshot: remove unused code ( #23956 )
...
* core/state/snapshot: remove wiper functionality
* core/vm: remove unused 'unofficial' opcodes
2021-11-25 10:37:47 +02:00
Paweł Bylica
10b1cd9b1b
core/vm: use proper JumpTable type
2021-11-24 16:02:12 +01:00
Martin Holst Swende
ab31fbbde1
core/vm: don't use iota for opcode definitions
2021-11-18 09:50:52 +01:00
Andrei Maiboroda
f32feeb260
core/vm: implement EIP-2681: Limit account nonce to 2^64-1 ( #23853 )
...
This retroactively implements requirements or EIP-2681 for the account nonce upper limit.
2021-11-11 15:00:58 +01:00
Martin Holst Swende
6b9c77f060
eth/tracers: package restructuring ( #23857 )
...
* eth/tracers: restructure tracer package
* core/vm/runtime: load js tracers
* eth/tracers: mv bigint js code to own file
* eth/tracers: add method docs for native tracers
* eth/tracers: minor doc fix
* core,eth: cancel evm on nativecalltracer stop
* core/vm: fix failing test
Co-authored-by: Sina Mahmoodi <itz.s1na@gmail.com>
2021-11-09 12:09:35 +01:00
Sina Mahmoodi
8d7e6062ec
eth/tracers: support for golang tracers + add golang callTracer ( #23708 )
...
* eth/tracers: add basic native loader
* eth/tracers: add GetResult to tracer interface
* eth/tracers: add native call tracer
* eth/tracers: fix call tracer json result
* eth/tracers: minor fix
* eth/tracers: fix
* eth/tracers: fix benchTracer
* eth/tracers: test native call tracer
* eth/tracers: fix
* eth/tracers: rm extra make
Co-authored-by: Martin Holst Swende <martin@swende.se>
* eth/tracers: rm extra make
* eth/tracers: make callFrame private
* eth/tracers: clean-up and comments
* eth/tracers: add license
* eth/tracers: rework the model a bit
* eth/tracers: move tracecall tests to subpackage
* cmd/geth: load native tracers
* eth/tracers: minor fix
* eth/tracers: impl stop
* eth/tracers: add native noop tracer
* renamings
Co-authored-by: Martin Holst Swende <martin@swende.se>
* eth/tracers: more renamings
* eth/tracers: make jstracer non-exported, avoid cast
* eth/tracers, core/vm: rename vm.Tracer to vm.EVMLogger for clarity
* eth/tracers: minor comment fix
* eth/tracers/testing: lint nitpicks
* core,eth: cancel evm on nativecalltracer stop
* Revert "core,eth: cancel evm on nativecalltracer stop"
This reverts commit 01bb908790a369c1bb9d3937df9325c6857bf855.
* eth/tracers: linter nits
* eth/tracers: fix output on err
Co-authored-by: Martin Holst Swende <martin@swende.se>
2021-11-05 11:48:21 +01:00
Martin Holst Swende
551bd6e721
eth/tracers: invoke enter/exit on 0-value calls to inex accounts ( #23828 )
2021-11-01 19:06:33 +01:00
Austin Roberts
5d4d973cc4
Merge tag 'v1.10.9' into develop
...
Notes: the AppendAncient plugin hook is broken by this commit.
This adds CaptureEnter() and CaptureExit() as no-ops for interface
compliance, but these capabilities should be added for plugin tracers
soon.
2021-10-18 12:02:35 -05:00
Austin Roberts
9497293e26
Merge tag 'v1.10.8' into develop
2021-10-18 11:17:14 -05:00
Austin Roberts
416ff11059
Merge tag 'v1.10.7' into develop
2021-10-18 11:12:22 -05:00
Sina Mahmoodi
401354976b
core,eth: call frame tracing ( #23087 )
...
This change introduces 2 new optional methods; `enter()` and `exit()` for js tracers, and makes `step()` optiona. The two new methods are invoked when entering and exiting a call frame (but not invoked for the outermost scope, which has it's own methods). Currently these are the data fields passed to each of them:
enter: type (opcode), from, to, input, gas, value
exit: output, gasUsed, error
The PR also comes with a re-write of the callTracer. As a backup we keep the previous tracing script under the name `callTracerLegacy`. Behaviour of both tracers are equivalent for the most part, although there are some small differences (improvements), where the new tracer is more correct / has more information.
2021-09-17 09:31:22 +02:00
Marius van der Wijden
b8d7c662cd
core, rpc: disable memory output by default in traces ( #23558 )
...
* core: cmd: invert disableMemory
* core: fix missed inversion
* cmd/evm: preserve Flags but change default value
* Apply suggestions from code review
Co-authored-by: Martin Holst Swende <martin@swende.se>
Co-authored-by: Martin Holst Swende <martin@swende.se>
2021-09-13 18:59:52 +02:00
Austin Roberts
0d5af1c7dc
Add Len() to Stack
2021-09-02 16:26:40 -05:00
Paweł Bylica
3258211f68
core/vm: rework jumpdest analysis benchmarks ( #23499 )
...
* core/vm: rework jumpdest analysis benchmarks
For BenchmarkJumpdestOpAnalysis use fixed code size of ~1.2MB
and classic benchmark loop.
* core/vm: clear bitvec in jumpdest analysis benchmark
2021-08-30 14:13:06 +02:00
Guillaume Ballet
0b40977480
core/vm: fix typo in comment ( #23450 )
2021-08-24 13:57:05 +02:00
Martin Holst Swende
1d99573192
core/vm: faster code analysis ( #23381 )
...
* core/vm: more detailed benchmark for jumpdest analysis
* core/vm: make jd analysis benchmark alloc free
* core/vm: improve jumpdest analysis
* core/vm: improve worst-case
* core/vm: further improvements in analysis
* core/vm: improve jumpdest analysis >PUSH15
* core/vm: make jd analysis ref by value
* core/vm: fix misspell
* core/vm: improve set8 and set16 a bit
* core/vm: reduce amount of code
* core/vm: optimize byte copying
2021-08-24 10:00:10 +03:00
Marius van der Wijden
2faf796d2a
internal/ethapi: fix panic in accesslist creation ( #23225 )
...
* internal/ethapi: revert + fix properly in al tracer
* internal/ethapi: use toMessage instead of creating new message
* internal/ethapi: remove ineffassign
* core: fix invalid unmarshalling, fix test
Co-authored-by: Martin Holst Swende <martin@swende.se>
2021-07-28 14:21:35 +02:00
Sina Mahmoodi
5441a8fa47
all: remove noop vm config flags ( #23111 )
...
* all: rm external interpreter and ewasm config
* core/vm: rm Interpreter interface
* cmd/geth: deprecate interpreter config fields
2021-07-06 22:03:09 +02:00
Martin Holst Swende
f5f906dd0d
eth/tracers: improve tracing performance ( #23016 )
...
Improves the performance of debug.traceTransaction
2021-07-01 09:15:04 +02:00
Li Dongwei
bca8c03e57
core/state: remove unused methods ReturnGas, GetStorageProofByHash ( #23092 )
...
Co-authored-by: lidongwei <lidongwei@huobi.com>
2021-06-25 14:34:09 +02:00
Martin Holst Swende
080b6ebe91
core/vm: evm fix panic ( #23047 )
...
* core/vm: evm fix panic
* core/vm/runtime: default to params.initialbasefee
2021-06-16 09:53:27 +03:00
Péter Szilágyi
f68a68a313
core, internal: support various eth_call invocations post 1559
2021-06-10 08:02:51 +03:00
Martin Holst Swende
94451c2788
all: implement EIP-1559 ( #22837 )
...
This is the initial implementation of EIP-1559 in packages core/types and core.
Mining, RPC, etc. will be added in subsequent commits.
Co-authored-by: Marius van der Wijden <m.vanderwijden@live.de>
Co-authored-by: lightclient@protonmail.com <lightclient@protonmail.com>
Co-authored-by: Felix Lange <fjl@twurst.com>
2021-05-17 15:13:22 +02:00
Martin Holst Swende
ae5fcdc67f
go.mod: upgrade to github.com/holiman/uint256 v1.2.0 ( #22745 )
2021-05-10 12:29:33 +02:00
Martin Holst Swende
a5669ae292
core, params: implement EIP-3529 ( #22733 )
...
* core, params: implement EIP-3529
* core/vm: add london instructionset
* core/vm: add method doc for EIP enabler
Co-authored-by: Péter Szilágyi <peterke@gmail.com>
2021-05-07 09:25:32 +03:00
Paweł Bylica
e69130d9f1
core/vm, params: implement EIP 3541
2021-05-06 11:28:46 +02:00
Martin Holst Swende
cc606be74c
all: define London+baikal, undefine yolov3, add london override flag ( #22822 )
...
* all: define London+baikal, undefine yolov3, add london override flag
* cmd, core, params: add baikal genesis definition
2021-05-06 12:07:42 +03:00
Evgeny Danilenko
df20b3b982
core/vm: avoid duplicate log in json logger ( #22825 )
2021-05-06 10:46:27 +02:00
aaronbuchwald
ca9c576e62
core/vm: fix interpreter comments ( #22797 )
...
* Fix interpreter comment
* Fix comment
2021-05-03 11:58:00 +03:00
Paweł Bylica
0e00ee42ec
core/vm: clean up contract creation error handling ( #22766 )
...
Do not keep separate flag for "max code size exceeded" case, but instead
assign appropriate error for it sooner.
2021-05-01 13:19:24 +02:00
aaronbuchwald
dde6cb0b92
core/vm: replace repeated string with variable in tests ( #22774 )
2021-04-30 12:49:13 +02:00