Skip to content

fix(prover-client): don't persist stale proving job results (racing epoch GC)#22688

Closed
AztecBot wants to merge 1 commit intomerge-train/spartanfrom
claudebox/fix-merge-train-spartan-22508
Closed

fix(prover-client): don't persist stale proving job results (racing epoch GC)#22688
AztecBot wants to merge 1 commit intomerge-train/spartanfrom
claudebox/fix-merge-train-spartan-22508

Conversation

@AztecBot
Copy link
Copy Markdown
Collaborator

Summary

Follow-up to #22508. That PR kept in-progress jobs from stale epochs alive, but cleanupPass() still calls deleteAllProvingJobsOlderThanEpoch(...), which closes and deletes the per-epoch LMDB store. When an agent then reports an error/result for such a stale in-progress job, the broker's rejected/fulfilled path calls database.setProvingJobError/Result(...), whose batch-queue commit runs batchWrite on the just-closed store — producing Error: Store is closed and failing the new Retries > does not retry if job is stale test.

Skip the DB persist when the job is already stale. The in-memory resultsCache + promise resolution still happen, so callers still observe { status: 'rejected' | 'fulfilled', ... }. There's no point writing to a per-epoch store that is on the way out.

Details

Test plan

  • yarn workspace @aztec/prover-client test src/proving_broker/ — all 7 files pass (145/145).
  • Stress-ran proving_broker.test.ts x20 — all green.
  • ./bootstrap.sh format / ./bootstrap.sh lint clean.

Failing CI run that motivated this fix: https://github.com/AztecProtocol/aztec-packages/actions/runs/24714302818

ClaudeBox log: https://claudebox.work/s/2bbcd00ade5c0a6a?run=1

@AztecBot AztecBot added ci-draft Run CI on draft PRs. claudebox Owned by claudebox. it can push to this PR. labels Apr 21, 2026
@AztecBot
Copy link
Copy Markdown
Collaborator Author

Automatically closing this stale claudebox draft PR (no updates for 5+ days). Re-open if still needed.

@AztecBot AztecBot closed this Apr 27, 2026
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

ci-draft Run CI on draft PRs. claudebox Owned by claudebox. it can push to this PR.

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant