Marius van der Wijden
2045a2bba3
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
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
Marius van der Wijden
de971cc845
eth: added trace_call to trace on top of arbitrary blocks ( #21338 )
...
* eth: Added TraceTransactionPending
* eth: Implement Trace_Call, remove traceTxPending
* eth: debug_call -> debug_traceCall, recompute tx environment if pruned
* eth: fix nil panic
* eth: improve block retrieving logic in tracers
* internal/web3ext: add debug_traceCall to console
4 years ago
Marius van der Wijden
16d7eae1c8
eth: updated comments ( #21490 )
4 years ago
gary rong
93da0cf8a1
cmd, core, eth, light, trie: dump clean cache periodically ( #20391 )
...
* cmd, core, eth, light, trie: dump clean cache periodically
* eth: update config
* trie: minor fix
* core, trie: address comments
* eth: remove useless
* trie: print clean cache dump start too
Co-authored-by: Péter Szilágyi <peterke@gmail.com>
4 years ago
Marius van der Wijden
02cea2330d
eth: returned revert reason in traceTx ( #21195 )
...
* eth: returned revert reason in traceTx
* eth: return result data
4 years ago
gary rong
b9df7ecdc3
all: seperate consensus error and evm internal error ( #20830 )
...
* all: seperate consensus error and evm internal error
There are actually two types of error will be returned when
a tranaction/message call is executed: (a) consensus error
(b) evm internal error. The former should be converted to
a consensus issue, e.g. The sender doesn't enough asset to
purchase the gas it specifies. The latter is allowed since
evm itself is a blackbox and internal error is allowed to happen.
This PR emphasizes the difference by introducing a executionResult
structure. The evm error is embedded inside. So if any error
returned, it indicates consensus issue happens.
And also this PR improve the `EstimateGas` API to return the concrete
revert reason if the transaction always fails
* all: polish
* accounts/abi/bind/backends: add tests
* accounts/abi/bind/backends, internal: cleanup error message
* all: address comments
* core: fix lint
* accounts, core, eth, internal: address comments
* accounts, internal: resolve revert reason if possible
* accounts, internal: address comments
5 years ago
Péter Szilágyi
542df8898e
core: initial version of state snapshots
5 years ago
cdetrio
49a7ee460e
eth: fix storageRangeAt for empty blocks ( #18076 )
5 years ago
Péter Szilágyi
ac3e7c9b3d
eth: remove redundant chain config fields
6 years ago
Jonas
dba336e612
eth: fix EIP158 account cleanup on chain tracing ( #19341 )
...
Fixes #19337
6 years ago
Matthew Halpern
8af6c9e6a2
eth: extract check for tracing transaction in block file ( #19107 )
...
Simplifies the transaction presense check to use a function to
determine if the transaction is present in the block provided
to trace, which originally had a redundant parenthesis and used
a `exist` flag to dictate control flow.
6 years ago
Martin Holst Swende
05d21438de
eth: make tracers respect pre- EIP 158/161 rule
6 years ago
Martin Holst Swende
9bc0138ded
eth: properly flush files in standardTraceBlockToFile ( #18502 )
6 years ago
Péter Szilágyi
0983d02aa9
eth, internal/web3ext: tiny polishes in tracers
6 years ago
Martin Holst Swende
42a914a84f
cmd/evm, core/vm, eth: implement api methods to do stdjson dump to local filesystem
6 years ago
Péter Szilágyi
434dd5bc00
cmd, core, eth, light, trie: add trie read caching layer
6 years ago
Martin Holst Swende
89a32451ae
core/vm: faster create/create2 ( #17806 )
...
* core/vm/runtim: benchmark create/create2
* core/vm: do less hashing in CREATE2
* core/vm: avoid storing jumpdest analysis for initcode
* core/vm: avoid unneccesary lookups, remove unused fields
* core/vm: go formatting tests
* core/vm: save jumpdest analysis locally
* core/vm: use common.Hash instead of nil, fix review comments
* core/vm: removed type destinations
* core/vm: correct check for empty hash
* eth: more elegant api_tracer
* core/vm: address review concerns
6 years ago
HackyMiner
6975c72981
all: fix various comment typos ( #17591 )
...
* swarm: fixed comment typo
* eth: fixed comment typo
* cmd/puppeth: fixed comment typo
6 years ago
gary rong
c1c003e4ff
consensus, miner: stale block mining support ( #17506 )
...
* consensus, miner: stale block supporting
* consensus, miner: refactor seal signature
* cmd, consensus, eth: add miner noverify flag
* cmd, consensus, miner: polish
6 years ago
Martin Holst Swende
106d196ec4
eth: ensure from<to when tracing chain (credits Chen Nan via bugbounty)
6 years ago
Péter Szilágyi
11bbc66082
eth, trie: fix tracer GC which accidentally pruned the metaroot
6 years ago
Péter Szilágyi
d926bf2c7e
trie: cache collapsed tries node, not rlp blobs ( #16876 )
...
The current trie memory database/cache that we do pruning on stores
trie nodes as binary rlp encoded blobs, and also stores the node
relationships/references for GC purposes. However, most of the trie
nodes (everything apart from a value node) is in essence just a
collection of references.
This PR switches out the RLP encoded trie blobs with the
collapsed-but-not-serialized trie nodes. This permits most of the
references to be recovered from within the node data structure,
avoiding the need to track them a second time (expensive memory wise).
6 years ago
Péter Szilágyi
143c4341d8
core, eth, trie: streaming GC for the trie cache ( #16810 )
...
* core, eth, trie: streaming GC for the trie cache
* trie: track memcache statistics
7 years ago
Péter Szilágyi
6cf0ab38bd
core/rawdb: separate raw database access to own package ( #16666 )
7 years ago
Péter Szilágyi
7a7428a027
core, eth: fix tracer dirty finalization
7 years ago
Péter Szilágyi
55599ee95d
core, trie: intermediate mempool between trie and database ( #15857 )
...
This commit reduces database I/O by not writing every state trie to disk.
7 years ago
Péter Szilágyi
ae71da1b03
eth: fix tracer panic when running without configs + reexec ( #15799 )
7 years ago
Felix Lange
9d48dbf5c2
eth: revert tracer preimage recording ( #15800 )
...
This reverts commits 85a1eda59e
(#15792 ) and c495bca4ad
(#15787 )
because they introduce database writes during tracing.
7 years ago
Felix Lange
85a1eda59e
eth: uncaptialize tracer preimage error message ( #15792 )
...
* eth: uncaptialize tracer preimage error message
* eth: improve very important error message
7 years ago
cdetrio
c495bca4ad
eth: enable preimage recording when tracing ( #15787 )
7 years ago
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
7 years ago