Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

feat(en): Make state keeper work with pruned data #900

Conversation

slowli
Copy link
Contributor

@slowli slowli commented Jan 19, 2024

What ❔

Modifies state keeper so that it works with pruned node data during snapshot recovery.

Why ❔

Part of preparations of EN code to support snapshot recovery.

Checklist

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

@slowli slowli force-pushed the aov-pla-703-snapshot-recovery-make-state-keeper-work-with-pruned-data branch from 1a31b74 to ef8bbc2 Compare January 19, 2024 09:00
RomanBrodetski
RomanBrodetski previously approved these changes Jan 31, 2024
Copy link
Collaborator

@RomanBrodetski RomanBrodetski left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

looks really good. For the amount of changes in invariants, I expected worse changes are needed on the code level.

Like the L1BatchParamsProvider abstraction. I don't see a good way around it.

Are the new invariants documented anywhere? Like, what can programmer rely on when writing code that runs agains our DB? Something like:

  • there are no gaps in miniblock/l1 batch indices
  • if miniblock #N is missing, there is a snapshot with miniblock >N

Separately, would Main Node work with pruned data? I don't see why not.

@slowli
Copy link
Contributor Author

slowli commented Jan 31, 2024

Separately, would Main Node work with pruned data? I don't see why not.

Right now it won't because some components only run on the main node would need to be adapted to support snapshot recovery. Such adaptation seems straightforward though.

RomanBrodetski
RomanBrodetski previously approved these changes Feb 1, 2024
@slowli slowli force-pushed the aov-pla-703-snapshot-recovery-make-state-keeper-work-with-pruned-data branch from 42967bc to fac593f Compare February 5, 2024 18:27
@slowli slowli added this pull request to the merge queue Feb 7, 2024
Merged via the queue into main with commit f1913ae Feb 7, 2024
30 checks passed
@slowli slowli deleted the aov-pla-703-snapshot-recovery-make-state-keeper-work-with-pruned-data branch February 7, 2024 10:18
github-merge-queue bot pushed a commit that referenced this pull request Feb 8, 2024
🤖 I have created a release *beep* *boop*
---


##
[20.6.0](core-v20.5.2...core-v20.6.0)
(2024-02-08)


### Features

* **api:** Start API server after first L1 batch
([#1026](#1026))
([86e189c](86e189c))
* **db:** Instrument DB connection lifecycle
([#1027](#1027))
([636fcfd](636fcfd))
* **db:** Soft-remove `storage` table
([#982](#982))
([601f893](601f893))
* **en:** Make state keeper work with pruned data
([#900](#900))
([f1913ae](f1913ae))
* export fee model for the test node
([#1030](#1030))
([d1e4774](d1e4774))
* Time-limit health checks and log them
([#993](#993))
([f3c190d](f3c190d))
* **types:** Added KZG info needed for 4844 blobs
([#894](#894))
([758f487](758f487))


### Bug Fixes

* fix link
([#1007](#1007))
([f1424ce](f1424ce))
* **metrics:** Use latest block for non pos ethereum as safe
([#1022](#1022))
([49ec843](49ec843))
* Revert "preparation for shared bridge migration (server)"
([#1010](#1010))
([d4c984a](d4c984a))

---
This PR was generated with [Release
Please](https://github.com/googleapis/release-please). See
[documentation](https://github.com/googleapis/release-please#release-please).
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

2 participants