nimbus-eth1/nimbus/transaction
Jordan Hrycaj 261c0b51a7
Redesign of BaseVMState descriptor (#923)
* Redesign of BaseVMState descriptor

why:
  BaseVMState provides an environment for executing transactions. The
  current descriptor also provides data that cannot generally be known
  within the execution environment, e.g. the total gasUsed which is
  available not before after all transactions have finished.

  Also, the BaseVMState constructor has been replaced by a constructor
  that does not need pre-initialised input of the account database.

also:
  Previous constructor and some fields are provided with a deprecated
  annotation (producing a lot of noise.)

* Replace legacy directives in production sources

* Replace legacy directives in unit test sources

* fix CI (missing premix update)

* Remove legacy directives

* chase CI problem

* rebased

* Re-introduce 'AccountsCache' constructor optimisation for 'BaseVmState' re-initialisation

why:
  Constructing a new 'AccountsCache' descriptor can be avoided sometimes
  when the current state root is properly positioned already. Such a
  feature existed already as the update function 'initStateDB()' for the
  'BaseChanDB' where the accounts cache was linked into this desctiptor.

  The function 'initStateDB()' was removed and re-implemented into the
  'BaseVmState' constructor without optimisation. The old version was of
  restricted use as a wrong accounts cache state would unconditionally
  throw an exception rather than conceptually ask for a remedy.

  The optimised 'BaseVmState' re-initialisation has been implemented for
  the 'persistBlocks()' function.

also:
  moved some test helpers to 'test/replay' folder

* Remove unused & undocumented fields from Chain descriptor

why:
  Reduces attack surface in general & improves reading the code.
2022-01-18 16:19:32 +00:00
..
call_common.nim Transaction: Map `evmc_result` back to `Computation` result 2021-12-10 16:27:53 +00:00
call_evm.nim Redesign of BaseVMState descriptor (#923) 2022-01-18 16:19:32 +00:00
evmc_dynamic_loader.nim EVMC: Improve `--evm`, remove it in non-EVMC builds, change imports 2021-12-14 15:51:09 +00:00
evmc_host_glue.nim EVMC: Option `--evm`, load third-party EVM as a shared library 2021-12-10 16:32:18 +00:00
evmc_vm_glue.nim EVMC: Option `--evm`, load third-party EVM as a shared library 2021-12-10 16:32:18 +00:00
host_call_nested.nim EVMC: Byte-endian conversions for 256-bit numeric values 2021-12-10 16:23:27 +00:00
host_services.nim Redesign of BaseVMState descriptor (#923) 2022-01-18 16:19:32 +00:00
host_trace.nim EVMC: Improve host call tracing and fix nested call C stack usage 2021-08-12 07:48:56 +07:00
host_types.nim EVMC: Use the same host interface for nested calls as top-level 2021-08-17 17:18:26 +01:00