Evgeny Danilenko
de26634d8d
TEVM status pruning ( #2034 )
...
* use trace for TEVM status
* restore testdata
* fix getting contract from plain state
* unwind
* linters
* reproducible build debug
* debug
* debug
* remove debug
2021-06-11 09:34:25 +01:00
Alex Sharov
1f13f73045
up version of uint256 lib ( #2082 )
...
* eip 1559_tx_constraints
* eip 1559_tx_constraints
* return error on uint256 overflow
* up uint256 version
* merge master
* fix master
Co-authored-by: ledgerwatch <akhounov@gmail.com>
2021-06-04 17:25:28 +01:00
Evgeny Danilenko
7352b81122
Tevm stage 1 ( #1845 )
...
* convert contracts after block execution
* check if has tevm code
* after review-1
* handle ErrNotFound
* typo
* tests
* tevm code bucket
* testdata
* execute pre-stage
* after merge
* test fix
* test fix
* fix test after merge
* disable translation stage
* after merge
* rename params
* rename to Erigon
* parallelize EVM translation
* fix
* logging and fixes
* fix
* todos
* cleanup
* revert erigorn renaming
* unwind
* tevm unwind
* fix AppData
* non-parallel version
* comments
2021-05-27 14:54:55 +01:00
Alex Sharov
0be3044b7e
rename ( #1978 )
...
* rename
* rename "make grpc"
* rename "abi bindings templates"
* rename "abi bindings templates"
2021-05-20 19:25:53 +01:00
ledgerwatch
12cde41772
Aleut support (Eip1559) ( #1704 )
...
* Where I am at
* Refactoring of transaction types
* More refactoring
* Use Homested signer in rpc daemon
* Unified signer
* Continue unified signer
* A bit more
* Fixes and down the rabbit hole...
* More tx pool fixes
* More refactoring fixes
* More fixes'
* more fixes
* More fixes
* More compile fixes
* More RLP hand-writing
* Finish RLP encoding/decoding of transactions
* Fixes to header encoding, start on protocol packets
* Transaction decoding
* Use DecodeTransaction function
* Decoding BlockBodyPacket
* Encode and decode for pool txs
* Start fixing tests
* Introduce SigningHash
* Fixes to SignHash
* RLP encoding fixes
* Fixes for encoding/decoding
* More test fixes
* Fix more tests
* More test fixes
* More test fixes
* Fix core tests
* More fixes for signer
* Fix for tx
* Fixes to string encoding/size
* Fix eip2930 test
* Fix rest of ./tests
* More fixes
* Fix compilation
* More test fixes
* More test fixes
* Test fixes
* More fixes
* Reuse EncodingSize in EncodeRLP for accessList
* Rearrange things in dynamic fee tx
* Add MarshalBinary
* More fixes
* Make V,R,S non-pointers
* More NPE fixes
* More fixes
* Receipt fixes
* Fix core/types
* Fix ./eth
* More compile fixes for tests
* More test fixes
* More test fixes
* Try to see lint errors better
* Try to see lint errors better
* Fix lint
* Debugging eip1559 test
* Fix TestEIP1559Transition test
* Fix NewBlockPacket encoding/decoding
* Fix calculation of TxHash
* Fix perf problem with senders
* Update aleut config values
* Try adding static peers
* Add staticpeers to defaul flags
* Change aleut networkID
* Fix test
Co-authored-by: Alex Sharp <alexsharp@Alexs-MacBook-Pro.local>
Co-authored-by: Alexey Sharp <alexeysharp@Alexeys-iMac.local>
2021-04-22 18:11:37 +01:00
Alexey Sharp
cdca7f94ad
Fix lints
2021-03-17 22:24:46 +00:00
Igor Mandrigin
5510de2fae
add tracer_test
2021-03-17 17:47:01 +01:00
Igor Mandrigin
a04d6f0e45
semi-cleanup of eth/tracers
2021-03-17 17:28:04 +01:00
Péter Szilágyi
d00a121246
core, eth: unship EIP 2315
...
# Conflicts:
# core/vm/contract.go
# core/vm/gen_structlog.go
# core/vm/instructions.go
# core/vm/instructions_test.go
# core/vm/interpreter.go
# core/vm/logger.go
# core/vm/logger_json.go
# core/vm/logger_test.go
# core/vm/stack/stack.go
# eth/tracers/tracer.go
# eth/tracers/tracer_test.go
2021-03-12 16:05:37 +01:00
Sina Mahmoodi
0907f5badc
eth, eth/tracers: include intrinsic gas in calltracer, expose for all tracers ( #22038 )
...
* eth/tracers: share tx gas price with js tracer
* eth/tracers: use `go generate`
* eth/tracers: try with another version of go-bindata
* eth/tracers: export txGas
* eth, eth/tracers: pass intrinsic gas to js tracers
eth/tracers: include tx gas in tracers usedGas
eth/tracers: fix prestate tracer's sender balance
eth/tracers: rm unnecessary import
eth/tracers: pass intrinsicGas separately to tracer
eth/tracers: fix tests broken by lack of txdata
eth, eth/tracers: minor fix
* eth/tracers: regenerate assets + unexport test-struct + add testcase
* eth/tracers: simplify tests + make table-driven
Co-authored-by: Guillaume Ballet <gballet@gmail.com>
Co-authored-by: Martin Holst Swende <martin@swende.se>
# Conflicts:
# eth/tracers/tracer.go
# eth/tracers/tracer_test.go
2021-03-09 10:11:49 +01:00
Marius van der Wijden
bcc51ea117
core, all: split vm.Context into BlockContext and TxContext ( #21672 )
...
* all: core: split vm.Config into BlockConfig and TxConfig
* core: core/vm: reset EVM between tx in block instead of creating new
* core/vm: added docs
# Conflicts:
# accounts/abi/bind/backends/simulated.go
# cmd/evm/internal/t8ntool/execution.go
# cmd/geth/retesteth.go
# core/evm.go
# core/state_prefetcher.go
# core/state_processor.go
# core/state_transition.go
# core/vm/evm.go
# core/vm/gas_table_test.go
# core/vm/instructions.go
# core/vm/instructions_test.go
# eth/api_tracer.go
# eth/tracers/tracer_test.go
# eth/tracers/tracers_test.go
# les/api_backend.go
# les/odr_test.go
# light/odr_test.go
# tests/vm_test_util.go
2021-03-08 12:17:35 +01:00
Igor Mandrigin
8600616c3d
geth 1.9.18 post-rebase fixups
2020-08-08 17:33:35 +02:00
Martin Holst Swende
a4b70f9ee9
core/vm: less allocations for various call variants ( #21222 )
...
* core/vm/runtime/tests: add more benchmarks
* core/vm: initial work on improving alloc count for calls to precompiles
name old time/op new time/op delta
SimpleLoop/identity-precompile-10M-6 117ms ±75% 43ms ± 1% -63.09% (p=0.008 n=5+5)
SimpleLoop/loop-10M-6 79.6ms ± 4% 70.5ms ± 1% -11.42% (p=0.008 n=5+5)
name old alloc/op new alloc/op delta
SimpleLoop/identity-precompile-10M-6 24.4MB ± 0% 4.9MB ± 0% -79.94% (p=0.008 n=5+5)
SimpleLoop/loop-10M-6 13.2kB ± 0% 13.2kB ± 0% ~ (p=0.357 n=5+5)
name old allocs/op new allocs/op delta
SimpleLoop/identity-precompile-10M-6 382k ± 0% 153k ± 0% -59.99% (p=0.000 n=5+4)
SimpleLoop/loop-10M-6 40.0 ± 0% 40.0 ± 0% ~ (all equal)
* core/vm: don't allocate big.int for touch
name old time/op new time/op delta
SimpleLoop/identity-precompile-10M-6 43.3ms ± 1% 42.4ms ± 7% ~ (p=0.151 n=5+5)
SimpleLoop/loop-10M-6 70.5ms ± 1% 76.7ms ± 1% +8.67% (p=0.008 n=5+5)
name old alloc/op new alloc/op delta
SimpleLoop/identity-precompile-10M-6 4.90MB ± 0% 2.46MB ± 0% -49.83% (p=0.008 n=5+5)
SimpleLoop/loop-10M-6 13.2kB ± 0% 13.2kB ± 1% ~ (p=0.571 n=5+5)
name old allocs/op new allocs/op delta
SimpleLoop/identity-precompile-10M-6 153k ± 0% 76k ± 0% -49.98% (p=0.029 n=4+4)
SimpleLoop/loop-10M-6 40.0 ± 0% 40.0 ± 0% ~ (all equal)
* core/vm: reduce allocs in staticcall
name old time/op new time/op delta
SimpleLoop/identity-precompile-10M-6 42.4ms ± 7% 37.5ms ± 6% -11.68% (p=0.008 n=5+5)
SimpleLoop/loop-10M-6 76.7ms ± 1% 69.1ms ± 1% -9.82% (p=0.008 n=5+5)
name old alloc/op new alloc/op delta
SimpleLoop/identity-precompile-10M-6 2.46MB ± 0% 0.02MB ± 0% -99.35% (p=0.008 n=5+5)
SimpleLoop/loop-10M-6 13.2kB ± 1% 13.2kB ± 0% ~ (p=0.143 n=5+5)
name old allocs/op new allocs/op delta
SimpleLoop/identity-precompile-10M-6 76.4k ± 0% 0.1k ± 0% ~ (p=0.079 n=4+5)
SimpleLoop/loop-10M-6 40.0 ± 0% 40.0 ± 0% ~ (all equal)
* trie: better use of hasher keccakState
* core/state/statedb: reduce allocations in getDeletedStateObject
* core/vm: reduce allocations in all call derivates
* core/vm: reduce allocations in call variants
- Make returnstack `uint32`
- Use a `sync.Pool` of `stack`s
* core/vm: fix tests
* core/vm: goimports
* core/vm: tracer fix + staticcall gas fix
* core/vm: add back snapshot to staticcall
* core/vm: review concerns + make returnstack pooled + enable returndata in traces
* core/vm: fix some test tracer method signatures
* core/vm: run gencodec, minor comment polish
Co-authored-by: Péter Szilágyi <peterke@gmail.com>
# Conflicts:
# core/state/statedb.go
# core/vm/contracts_test.go
# core/vm/evm.go
# core/vm/instructions.go
# core/vm/interpreter.go
# core/vm/logger.go
# core/vm/logger_json.go
# core/vm/logger_test.go
# core/vm/runtime/runtime_test.go
# core/vm/stack/stack.go
# eth/tracers/tracer.go
# eth/tracers/tracer_test.go
# trie/secure_trie.go
2020-08-07 13:46:26 +02:00
ledgerwatch
cf799157cc
Jumpdest skip optimisation ( #851 )
...
* Jumpdest skipping optimisation
* Fix formatting
* Move skipAnalysis into vmConfig, introduce tracing ability
* Improve detection logging
* Added release instructions
* Fix lint
2020-08-01 17:56:57 +01:00
Igor Mandrigin
93f6c4c01a
post-rebase fixups
2020-06-15 19:38:54 +03:00
Greg Colvin
57e88afcd4
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>
# Conflicts:
# core/vm/contract.go
# core/vm/instructions_test.go
# core/vm/interpreter.go
# core/vm/logger.go
# core/vm/logger_json.go
# core/vm/logger_test.go
# core/vm/runtime/runtime_test.go
# eth/tracers/tracer.go
2020-06-15 19:38:13 +03:00
Evgeny Danilenko
41ee460a27
optimize codeBitmap ( #626 )
...
* optimize codeBitmap
* add lru
* remove custom lru
* jumpDests as explocit parameter
* lint
* lint
* linters
* default jumpDestsCache
* remove common.rand
2020-06-06 21:49:06 +01:00
Andrew Ashikhmin
5bbdb6a4b9
Use uint256 for account balance ( #580 )
...
* Use uint256 for account balance
* linter
2020-05-26 17:53:50 +01:00
tintin
d7a5c2dd3f
tracers: avoid panic on invalid arguments ( #20612 )
...
* add regression tests for #20611
* eth/tracers: fix panics occurring for invalid params in js-tracers
Co-authored-by: Martin Holst Swende <martin@swende.se>
2020-02-27 17:20:36 +03:00
Alexey Akhunov
fe01bccbb8
Apply Turbo-Geth modifications to go-ethereum codebase
2019-11-01 21:52:03 +01:00
Corey Lin
a5dc087845
core/vm, eth/tracers: use pointer receiver for GetRefund ( #18018 )
2018-11-08 13:07:15 +01:00
Martin Holst Swende
4c0883e20d
core/vm: adds refund as part of the json standard trace ( #17910 )
...
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.
2018-10-23 16:28:18 +02:00
Paweł Bylica
ae992a5d73
core/vm: Hide read only flag from Interpreter interface ( #17461 )
...
Makes Interface interface a bit more stateless and abstract.
Obviously this change is dictated by EVMC design. The EVMC tries to keep the responsibility for EVM features totally inside the VMs, if feasible. This makes VM "stateless" because VM does not need to pass any information between executions, all information is included in parameters of the execute function.
2018-09-07 18:13:25 +02:00
Felix Lange
a5c0bbb4f4
all: update license information ( #16089 )
2018-02-14 13:49:11 +01:00
Péter Szilágyi
5258785c81
cmd, core, eth/tracers: support fancier js tracing ( #15516 )
...
* 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
2017-12-21 13:56:11 +02:00