nimbus-eth1/nimbus/db
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
..
access_list.nim EIP2929 implementation 2021-01-11 14:56:42 +07:00
accounts_cache.nim Redesign of BaseVMState descriptor (#923) 2022-01-18 16:19:32 +00:00
capturedb.nim rlp: don't use ranges / experimental features (#495) 2020-04-20 20:12:44 +02:00
db_chain.nim Redesign of BaseVMState descriptor (#923) 2022-01-18 16:19:32 +00:00
geth_db.nim allow nimbus to read geth database 2020-06-18 13:16:25 +07:00
select_backend.nim Add a first, simple, content network test (#760) 2021-07-15 15:12:33 +02:00
state_db.nim rlp: don't use ranges / experimental features (#495) 2020-04-20 20:12:44 +02:00
storage_types.nim Eip225 clique/PoA consensus protocol 2021-06-17 08:03:57 +01:00