-
Notifications
You must be signed in to change notification settings - Fork 2.1k
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
perf: Add prover jobs as one multi-insert for Witness Generator (#3587)
## What ❔ This PR modifies the logic of inserting prover jobs to the database - switching from adding each job sequentially to performing once multi-insert for all rows. ## Why ❔ Currently [insert_prover_jobs](https://github.com/matter-labs/zksync-era/blob/prover-v18.0.0/prover/crates/lib/prover_dal/src/fri_prover_dal.rs#L32-L57) iterates over jobs one by one and makes one network call per job insert. This is inefficient and can result into big latency for cases when Witness Generator and DB are located in different regions. BWG is especially affected since there can be 10k+ jobs added [here](https://github.com/matter-labs/zksync-era/blob/prover-v18.0.0/prover/crates/bin/witness_generator/src/rounds/basic_circuits/artifacts.rs#L71-L111) We expect a significant gain in performance for the non collocated BWG and DB setup. ## 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. - [x] Documentation comments have been added / updated. - [x] Code has been formatted via `zkstack dev fmt` and `zkstack dev lint`.
- Loading branch information
1 parent
86efd40
commit d7be3b6
Showing
3 changed files
with
105 additions
and
15 deletions.
There are no files selected for viewing
Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.
Oops, something went wrong.
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters