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(snapshot creator): Make snapshot creator fault-tolerant #691

Merged
merged 23 commits into from
Jan 3, 2024

Conversation

slowli
Copy link
Contributor

@slowli slowli commented Dec 15, 2023

What ❔

Makes the snapshot creator tolerant to failures. The snapshot creator now checks whether there's a partially created snapshot on start. If there is, the creator continues producing this snapshot instead of starting from scratch.

Why ❔

Since the snapshot creator can run for an extended amount of time, not having fault tolerance is unmaintainable in the long run.

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 cargo spellcheck --cfg=./spellcheck/era.cfg --code 1.

@slowli slowli marked this pull request as ready for review December 15, 2023 10:51
prover/Cargo.lock Outdated Show resolved Hide resolved
@slowli slowli force-pushed the aov-pla-696-snapshot-generation-fault-tolerance branch from 32da308 to 598de62 Compare December 15, 2023 15:00
Copy link
Contributor

@tomg10 tomg10 left a comment

Choose a reason for hiding this comment

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

Looks correct and should not have any corner cases, it may only get stuck (for instance I've seen postgres queries get stuck on very large queries in the pas), but It's not very probable and there would be an alert for that.
I also suggested we make resilience completely transparent on the RPC API level and suggested a few changes regarding snapshots db schema.

core/lib/dal/src/snapshots_dal.rs Outdated Show resolved Hide resolved
core/bin/snapshots_creator/src/creator.rs Outdated Show resolved Hide resolved
core/lib/types/src/snapshots.rs Outdated Show resolved Hide resolved
core/lib/types/src/snapshots.rs Outdated Show resolved Hide resolved
core/lib/types/src/snapshots.rs Show resolved Hide resolved
@slowli slowli requested a review from tomg10 December 20, 2023 11:55
tomg10
tomg10 previously approved these changes Dec 21, 2023
@slowli slowli requested a review from RomanBrodetski January 3, 2024 14:11
RomanBrodetski
RomanBrodetski previously approved these changes Jan 3, 2024
core/bin/snapshots_creator/src/creator.rs Outdated Show resolved Hide resolved
@slowli slowli added this pull request to the merge queue Jan 3, 2024
Merged via the queue into main with commit 286c7d1 Jan 3, 2024
25 checks passed
@slowli slowli deleted the aov-pla-696-snapshot-generation-fault-tolerance branch January 3, 2024 19:23
github-merge-queue bot pushed a commit that referenced this pull request Jan 5, 2024
🤖 I have created a release *beep* *boop*
---


##
[19.0.0](core-v18.13.0...core-v19.0.0)
(2024-01-05)


### ⚠ BREAKING CHANGES

* **vm:** Release v19 - remove allowlist
([#747](#747))

### Features

* **en:** Make consistency checker work with pruned data
([#742](#742))
([ae6e18e](ae6e18e))
* **eth_sender:** Remove generic bounds on L1TxParamsProvider in
EthSender ([#799](#799))
([29a4f52](29a4f52))
* **merkle tree:** Finalize metadata calculator snapshot recovery logic
([#798](#798))
([c83db35](c83db35))
* **prover:** Remove circuit-synthesizer
([#801](#801))
([1426b1b](1426b1b))
* **prover:** Remove old prover
([#810](#810))
([8be1925](8be1925))
* **snapshot creator:** Make snapshot creator fault-tolerant
([#691](#691))
([286c7d1](286c7d1))
* **vm:** Add boojum integration folder
([#805](#805))
([4071e90](4071e90))
* **vm:** Make utils version-dependent
([#809](#809))
([e5fbcb5](e5fbcb5))
* **vm:** Release v19 - remove allowlist
([#747](#747))
([0e2bc56](0e2bc56))
* **vm:** Separate boojum integration vm
([#806](#806))
([61712a6](61712a6))


### Bug Fixes

* **db:** Fix parsing statement timeout from env
([#818](#818))
([3f663ec](3f663ec))
* **prover:** Remove old prover subsystems tables
([#812](#812))
([9d0aefc](9d0aefc))
* **prover:** Remove prover-utils from core
([#819](#819))
([2ceb911](2ceb911))

---
This PR was generated with [Release
Please](https://github.com/googleapis/release-please). See
[documentation](https://github.com/googleapis/release-please#release-please).

Co-authored-by: EmilLuta <[email protected]>
@slowli slowli mentioned this pull request Jan 8, 2024
5 tasks
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.

3 participants