3d58393b4c
In block processing, depending on the complexity of a transaction and
hotness of caches etc, signature checking can actually make up the
majority of time needed to process a transaction (60% observed in some
randomly sampled block ranges).
Fortunately, this is a task that trivially can be offloaded to a task
pool similar to how nimbus-eth2 does it.
This PR introduces taskpools in the most simple way possible, by
performing signature checking concurrently with other TX processing,
assigning a taskpool task per TX effectively.
With this little trick, we're in gigagas land 🎉 on my laptop!
```
INF 2024-12-10 21:05:35.170+01:00 Imported blocks
blockNumber=3874817 b... mgps=1222.707 ...
```
Tests don't use the taskpool for now because it needs manual cleanup and
we don't have a good mechanism in place. Future PR:s should address this
by creating a common shutdown sequence that also closes and cleans up
other resources like the DB.
Co-authored-by: andri lim <jangko128@gmail.com>
|
||
---|---|---|
.. | ||
testdata | ||
config.nim | ||
config.nims | ||
evmstate.nim | ||
evmstate_test.nim | ||
helpers.nim | ||
readme.md |
readme.md
EVM state test tool
The evmstate
tool to execute state test.
Build instructions
There are few options to build evmstate
tool like any other nimbus tools.
- Use your system Nim compiler(v1.6.12) and git to install dependencies.
$> git submodule update --init --recursive $> ./env.sh (run once to generate nimbus-build-system.paths) $> nim c -d:release tools/evmstate/evmstate $> nim c -r -d:release tools/evmstate/evmstate_test
- Use nimbus shipped Nim compiler and dependencies.
$> make update deps $> ./env.sh nim c -d:release tools/evmstate/evmstate $> ./env.sh nim c -r -d:release tools/evmstate/evmstate_test
- Use nimbus makefile.
$> make update $> make evmstate $> make evmstate_test
Command line params
Available command line params
Usage:
evmstate [OPTIONS]... <inputFile>
<inputFile> json file contains state test data.
The following options are available:
--dump dumps the state after the run [=false].
--json output trace logs in machine readable format (json) [=false].
--debug output full trace logs [=false].
--nomemory disable memory output [=true].
--nostack disable stack output [=false].
--nostorage disable storage output [=false].
--noreturndata enable return data output [=true].
--fork choose which fork to be tested.
--index if index is unset, all subtest in the fork will be tested [=none(int)].
--pretty pretty print the trace result [=false].
--verbosity sets the verbosity level [=0].
0 = silent, 1 = error, 2 = warn, 3 = info, 4 = debug, 5 = detail.