gary rong
87c0ba9213
core, eth, les, trie: add a prefix to contract code ( #21080 )
4 years ago
Martin Holst Swende
7ebc6c43ff
cmd/evm: statet8n output folder + tx hashes on trace filenames ( #21406 )
...
* t8ntool: add output basedir
* t8ntool: add txhash to trace filename
* t8ntool: don't default to '.' basedir, allow absolute paths
4 years ago
Martin Holst Swende
295693759e
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>
4 years ago
rene
5b081ab214
cmd/clef: change --rpcport to --http.port and update flags in docs ( #21318 )
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
Péter Szilágyi
65cd28aa0e
tests: cleanup snapshot generator goroutine leak
5 years ago
Paweł Bylica
d56dc038d2
cmd/evm: Rework execution stats ( #20792 )
...
- Dump stats also for --bench flag.
- From memory stats only show number and size of allocations. This is what `test -bench` shows. I doubt others like number of GC runs are any useful, but can be added if requested.
- Now the mem stats are for single execution in case of --bench.
5 years ago
Péter Szilágyi
6e05ccd845
core/state/snapshot, tests: sync snap gen + snaps in consensus tests
5 years ago
Péter Szilágyi
542df8898e
core: initial version of state snapshots
5 years ago
Guillaume Ballet
60deeb103e
cmd/evm: accept --input for disasm command ( #20548 )
5 years ago
Paweł Bylica
49cf000df7
cmd/evm: Add --bench flag for benchmarking ( #20330 )
...
The --bench flag uses the testing.B to execute the EVM bytecode many times and get the average exeuction time out of it.
5 years ago
zaccoding
23c8c74131
cmd: fix command help messages in modules ( #20203 )
5 years ago
Michael Forney
9e71f55bfa
cmd/evm: Allow loading input from file ( #20273 )
...
Make it possible to load input from a file. Simlar to `--code` / `--codefile`, have `--input`/`--inputfile`.
5 years ago
Michael Forney
9c81387bef
cmd/evm: remove surrounding whitespace in hex input code ( #20211 )
...
This way, the output of `evm compile` can be used directly in `evm
--codefile code.txt run`, without stripping the trailing newline first.
5 years ago
Martin Holst Swende
16f0fb70f1
cmd/evm: make evm default to all ethash protocol changes
5 years ago
Martin Holst Swende
2ca89ea479
cmd/evm: evm input minor fixes ( #19740 )
...
* cmd/evm: evm input minor fixes, handle prefix, validate length, fixes #18041
* cmd/evm: remove whitespace
5 years ago
Martin Holst Swende
1da5e0ebb0
core/state, cmd/geth: streaming json output for dump command ( #15475 )
...
* core/state, cmd/geth: streaming json output dump cmd + optional code+storage
* dump: add option to continue even if preimages are missing
* core, evm: lint nits
* cmd: use local flags for dump, omit empty code/storage
* core/state: fix state dump test
5 years ago
C. Brown
be4d74f8d2
cmd, internal/build, docker: advertise commit date in unstable build versions ( #19522 )
...
* add-date-to unstable
* fields-insteadof-split
* internal/build: support building with missing git
* docker: add git history back to support commit date in version
* internal/build: use PR commits hashes for PR builds
6 years ago
Corey Lin
768b4c2e6b
asm: remove unused parameter for function Lex ( #18058 )
6 years ago
Péter Szilágyi
054412e335
all: clean up and proerly abstract database access
6 years ago
Paweł Bylica
d37f987639
cmd/evm: Add --vm.evm flag to support EVMC ( #18457 )
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
Matthew Di Ferrante
3d21d455dc
cmd/evm: commit statedb if dump is requested ( #18208 )
...
Add a call `statedb.Commit(true)` if the `Dump` flag is on, as otherwise the `storage` output in the dump is always empty.
6 years ago
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.
6 years ago
cdetrio
bfa0f96822
cmd/evm: fix state dump ( #17832 )
6 years ago
Kevin
3fec73500b
cmd/evm: EVM prestate initialization ( #17685 )
...
* Bugfix #17216 : evm loads prestate file properly now
* code gofmted
6 years ago
Emil
86a03f97d3
all: simplify s[:] to s where s is a slice ( #17673 )
6 years ago
Péter Szilágyi
83e2761c3a
Revert "cmd/evm: change error msg output to stderr ( #17118 )"
...
This reverts commit fb9f7261ec
.
6 years ago
Chen Quan
fb9f7261ec
cmd/evm: change error msg output to stderr ( #17118 )
...
* cmd/evm: change error msg output to stderr
* cmd/evm: fix some linter error
6 years ago
gary rong
7beccb29be
all: get rid of error when creating memory database ( #16716 )
...
* all: get rid of error when create mdb
* core: clean up variables definition
* all: inline mdb definition
7 years ago
kiel barry
4ea493e7eb
cmd: various golint fixes ( #16700 )
...
* cmd: various golint fixes
* cmd: update to pr change request
* cmd: update to pr change request
7 years ago
Martin Holst Swende
8dfa4f46a9
evm/main: use blocknumber from genesis
7 years ago
Felix Lange
c7ab3e5544
common: delete StringToAddress, StringToHash ( #16436 )
...
* common: delete StringToAddress, StringToHash
These functions are confusing because they don't parse hex, but use the
bytes of the string. This change removes them, replacing all uses of
StringToAddress(s) by BytesToAddress([]byte(s)).
* eth/filters: remove incorrect use of common.BytesToAddress
7 years ago
dm4
3ebcf92b42
cmd/evm: print vm output when debug flag is on ( #16326 )
7 years ago
Péter Szilágyi
b7e57ca1d0
cmd/evm, core/vm, internal/ethapi: don't disable call gas metering
7 years ago
Felix Lange
a5c0bbb4f4
all: update license information ( #16089 )
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
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
Martin Holst Swende
0900aae412
cmd/evm: print stateroot in evm utility ( #15341 )
7 years ago
cdetrio
673007d7ae
core/vm: standard vm traces ( #15035 )
7 years ago
Martin Holst Swende
8cab3ab435
cmd/evm: adds ability to run individual state test file ( #14998 )
...
* cmd/evm: adds ability to run individual state test file
* cmd/evm: Fix statetest runner to be more json friendly
* cmd/evm, tests: minor polishes, dump state on fail
7 years ago
Martin Holst Swende
286ec5df40
cmd/evm, core/vm, internal/ethapi: Show error when exiting ( #14985 )
...
* cmd/evm, core/vm, internal/ethapi: Add 'err' to tracer interface CaptureEnd
* cmd/evm: fix nullpointer when there is no error
7 years ago
Martin Holst Swende
3040243042
cmd/evm: add --receiver, support code from stdin ( #14873 )
7 years ago
Egon Elbre
85454e7678
cmd: fix megacheck warnings ( #14912 )
...
* cmd: fix megacheck warnings
* cmd: revert time.Until changes, keep readFloat
7 years ago
Felix Lange
9e5f03b6c4
core/state: access trie through Database interface, track errors ( #14589 )
...
With this commit, core/state's access to the underlying key/value database is
mediated through an interface. Database errors are tracked in StateDB and
returned by CommitTo or the new Error method.
Motivation for this change: We can remove the light client's duplicated copy of
core/state. The light client now supports node iteration, so tracing and storage
enumeration can work with the light client (not implemented in this commit).
8 years ago
Martin Holst Swende
9a44e1035e
cmd/evm, core/vm: add --nomemory, --nostack to evm ( #14617 )
8 years ago
Martin Holst Swende
80f7c6c299
cmd/evm: add --prestate, --sender, --json flags for fuzzing ( #14476 )
8 years ago
Jeffrey Wilcke
3ee75bec9f
cmd/evm: added mem/cpu profiling
8 years ago
Péter Szilágyi
09777952ee
core, consensus: pluggable consensus engines ( #3817 )
...
This commit adds pluggable consensus engines to go-ethereum. In short, it
introduces a generic consensus interface, and refactors the entire codebase to
use this interface.
8 years ago
Valentin Wüstholz
c52ab932e6
cmd/disasm, cmd/evm: integrate disasm tool into evm tool. ( #3729 )
8 years ago