mirror of
https://github.com/status-im/nimbus-eth2.git
synced 2025-01-10 06:16:25 +00:00
58d77153fc
* fix invalid state root being written to database When rewinding state data, the wrong block reference would be used when saving the state root - this would cause state loading to fail by loading a different state than expected, preventing blocks to be applied. * refactor state loading and saving to consistently use and set StateData block * avoid rollback when state is missing from database (as opposed to being partially overwritten and therefore in need of rollback) * don't store state roots for empty slots - previously, these were used as a cache to avoid recalculating them in state transition, but this has been superceded by hash tree root caching * don't attempt loading states / state roots for non-epoch slots, these are not saved to the database * simplify rewinder and clean up funcitions after caches have been reworked * fix chaindag logscope * add database reload metric * re-enable clearance epoch tests * names