previously, every time the VMState was created, it will also create
new stateDB, and this action will nullify the advantages of cached accounts.
the new changes will conserve the accounts cache if the executed blocks
are contiguous. if not the stateDB need to be reinited.
this changes also allow rpcCallEvm and rpcEstimateGas executed properly
using current stateDB instead of creating new one each time they are called.
why:
it was convenient to have relocatable source modules when writing the
vm interface wrappers. this patch moves it back to the standard.
also:
there are no deep links into the vm folder anymore which leaves some
room for manoeuvring inside
why:
the nvm_ prefix was used inside the vm folder to hide them temporarily
from the outside world while writing export wrappers. now all
functionality is accessed via vm_*, rather than vm/* imports.
todo:
at a later stage the import headers of the vm modules need to get fixed
to meet style guide standards (as jacek kindly pointed out.)
why:
relative paths make sources inherently non-relocatable
details:
import base is set to the nimbus directoy, so importing ./stack
from file interpreter.nim becomes vm/stack etc.
caveat:
a file named nimbus/strformat.nim would clash with strformat (but
not with std/strformat)
The existing vmState tracing is plugged into chronicles, at the TRACE
level, to facilitate state test debugging.
Some useful chronicles defines are added to "tests/nim.cfg" to simplify
the compile-and-run command for individual tests.