Skip to content

Commit

Permalink
feat(tee_verifier): speedup SQL query for new jobs (#3133)
Browse files Browse the repository at this point in the history
## What ❔

Speedup SQL queries for new TEE prover jobs.

## Why ❔

Testing the L1Batch table also gives nothing, as missing data would be
caught later anyway, when assembling the TEE prover input data. Catching
it later also means, that we can apply different error handling
strategies depending on the L1Batch age.

## 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`.

Signed-off-by: Harald Hoyer <[email protected]>
  • Loading branch information
haraldh authored Oct 21, 2024
1 parent 650361a commit 30ceee8
Show file tree
Hide file tree
Showing 3 changed files with 26 additions and 32 deletions.

This file was deleted.

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

6 changes: 0 additions & 6 deletions core/lib/dal/src/tee_proof_generation_dal.rs
Original file line number Diff line number Diff line change
Expand Up @@ -43,9 +43,6 @@ impl TeeProofGenerationDal<'_, '_> {
p.l1_batch_number
FROM
proof_generation_details p
LEFT JOIN
l1_batches l1
ON p.l1_batch_number = l1.number
LEFT JOIN
tee_proof_generation_details tee
ON
Expand All @@ -56,9 +53,6 @@ impl TeeProofGenerationDal<'_, '_> {
p.l1_batch_number >= $5
AND p.vm_run_data_blob_url IS NOT NULL
AND p.proof_gen_data_blob_url IS NOT NULL
AND l1.hash IS NOT NULL
AND l1.aux_data_hash IS NOT NULL
AND l1.meta_parameters_hash IS NOT NULL
)
AND (
tee.l1_batch_number IS NULL
Expand Down

0 comments on commit 30ceee8

Please sign in to comment.