-
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.
Apply Emil's cherrypicked changes (#3594)
## What ❔ <!-- What are the changes this PR brings about? --> <!-- Example: This PR adds a PR template to the repo. --> <!-- (For bigger PRs adding more context is appreciated) --> ## Why ❔ <!-- Why are these changes done? What goal do they contribute to? What are the principles behind them? --> <!-- The `Why` has to be clear to non-Matter Labs entities running their own ZK Chain --> <!-- Example: PR templates ensure PR reviewers, observers, and future iterators are in context about the evolution of repos. --> ## Is this a breaking change? - [ ] Yes - [ ] No ## Operational changes <!-- Any config changes? Any new flags? Any changes to any scripts? --> <!-- Please add anything that non-Matter Labs entities running their own ZK Chain may need to know --> ## Checklist <!-- Check your PR fulfills the following items. --> <!-- For draft PRs check the boxes as you complete them. --> - [ ] 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 `zkstack dev fmt` and `zkstack dev lint`. Co-authored-by: EmilLuta <virgil.luta@gmail.com>
- Loading branch information
1 parent
ba3136c
commit c97f7e6
Showing
4 changed files
with
39 additions
and
2 deletions.
There are no files selected for viewing
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
21 changes: 21 additions & 0 deletions
21
prover/crates/lib/prover_dal/migrations/20250207111830_simplify_prover_jobs_indices.down.sql
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
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,21 @@ | ||
CREATE INDEX IF NOT EXISTS ix_prover_jobs_fri_t1 | ||
ON prover_jobs_fri (circuit_id, aggregation_round, l1_batch_number, id) | ||
WHERE (status = 'queued'::text); | ||
|
||
CREATE INDEX IF NOT EXISTS idx_prover_jobs_fri_status | ||
ON prover_jobs_fri (circuit_id, aggregation_round, status) | ||
WHERE ((status <> 'successful'::text) AND (status <> 'skipped'::text)); | ||
|
||
CREATE INDEX IF NOT EXISTS idx_prover_jobs_fri_queued_order2 | ||
ON prover_jobs_fri (l1_batch_number, aggregation_round DESC, id) | ||
WHERE (status = 'queued'::text); | ||
|
||
CREATE INDEX IF NOT EXISTS idx_prover_jobs_fri_queued_order | ||
ON prover_jobs_fri (aggregation_round DESC, l1_batch_number, id) | ||
WHERE (status = 'queued'::text); | ||
|
||
CREATE INDEX IF NOT EXISTS idx_prover_jobs_fri_circuit_id_agg_batch_num | ||
ON prover_jobs_fri (circuit_id, aggregation_round, l1_batch_number) | ||
WHERE (status = ANY (ARRAY['queued'::text, 'in_progress'::text, 'in_gpu_proof'::text, 'failed'::text])); | ||
|
||
DROP INDEX IF EXISTS idx_prover_jobs_fri_get_next_job; |
13 changes: 13 additions & 0 deletions
13
prover/crates/lib/prover_dal/migrations/20250207111830_simplify_prover_jobs_indices.up.sql
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
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,13 @@ | ||
CREATE INDEX IF NOT EXISTS idx_prover_jobs_fri_get_next_job | ||
ON prover_jobs_fri USING btree (l1_batch_number, aggregation_round, circuit_id, id) | ||
WHERE (status = 'queued'::text); | ||
|
||
DROP INDEX IF EXISTS idx_prover_jobs_fri_circuit_id_agg_batch_num; | ||
|
||
DROP INDEX IF EXISTS idx_prover_jobs_fri_queued_order; | ||
|
||
DROP INDEX IF EXISTS idx_prover_jobs_fri_queued_order2; | ||
|
||
DROP INDEX IF EXISTS idx_prover_jobs_fri_status; | ||
|
||
DROP INDEX IF EXISTS ix_prover_jobs_fri_t1; |