zksync-era icon indicating copy to clipboard operation
zksync-era copied to clipboard

feat(state-keeper): Refactor persistence in `StateKeeper`

Open slowli opened this issue 2 years ago • 0 comments

What ❔

  • Splits off miniblock and L1 batch persistence from StateKeeperIO into a separate trait.
  • Moves tracking current miniblock / L1 batch number from StateKeeperIO to the state keeper.

Why ❔

  • Simplifies further changes to the persistence logic, e.g. toggling saving protective reads.
  • Can be used as a building block for generic retrospective L1 batch execution.

Checklist

  • [x] PR title corresponds to the body of PR (we generate changelog entries from PRs).
  • [x] Tests for the changes have been added / updated.
  • [ ] Documentation comments have been added / updated.
  • [x] Code has been formatted via zk fmt and zk lint.
  • [x] Spellcheck has been run via zk spellcheck.
  • [x] Linkcheck has been run via zk linkcheck.

slowli avatar Mar 12 '24 13:03 slowli