Skip to content

feat: merge-train/spartan-v5 - #24652

Merged
AztecBot merged 1 commit into
v5-nextfrom
merge-train/spartan-v5
Jul 13, 2026
Merged

feat: merge-train/spartan-v5#24652
AztecBot merged 1 commit into
v5-nextfrom
merge-train/spartan-v5

Conversation

@AztecBot

@AztecBot AztecBot commented Jul 13, 2026

Copy link
Copy Markdown
Collaborator

BEGIN_COMMIT_OVERRIDE
fix(prover-node): do not abort in-flight proving jobs on a clean shutdown (#24579)
END_COMMIT_OVERRIDE

…down (#24579)

v5 version of #24562 (based on `merge-train/spartan-v5`). Stacked on
#24578 — review/merge that first.

Note: this is a fresh implementation, not a port — the v5 prover-node
architecture differs from `next` (it uses `EpochSession` / `TopTreeJob`
rather than `EpochProvingJob` / `ProvingOrchestrator`), which is the
structure actually running on testnet.

## Problem

On a clean shutdown, `SessionManager.stop()` cancels every live session
with reason `'prover-node stopping'`. That flows `EpochSession.cancel` →
`TopTreeJob.cancel()` → `topTree.cancel({ abortJobs: true })` — the
`abortJobs: true` was **hardcoded**, so a deploy/restart aborted the
in-flight top-tree broker jobs. Aborting on a clean restart is wasteful:
the proofs are still valid, agents are mid-flight, and a restarted node
re-orchestrating the same epoch produces the same
deterministically-hashed job ids, so it re-proves from scratch.

## Fix

Thread an `abortJobs` decision from the cancel reason down to the
broker:

- `SessionManager.stop()` cancels with `{ abortJobs: false }` — a clean
shutdown preserves the jobs.
- `EpochSession.cancel(reason, { abortJobs })` forwards it to
`TopTreeJob.cancel(abortJobs)` → `topTree.cancel({ abortJobs })`.
- All other cancels (reorg / supersede / deadline) keep the default
`abortJobs: true`, since their inputs are stale.

Composes with #24578: a clean redeploy mid-epoch neither cancels the
in-flight jobs nor (if one ever were aborted) poisons them, so the epoch
keeps proving across the restart.

## Tests

- `session-manager.test.ts`: `stop()` cancels every session with
`abortJobs: false`.
- `epoch-session.test.ts`: a normal cancel forwards `abortJobs: true` to
the top-tree orchestrator; a clean-shutdown cancel forwards `abortJobs:
false`.

Note: not run locally in this session — the prover-node suite needs a
full noir/wasm bootstrap that wasn't available here — so relied on CI.

---
*Created by
[claudebox](https://claudebox.work/v2/sessions/6fa5e242ed9ceae7) ·
group: `slackbot`*

---------

Co-authored-by: Phil Windle <philip.windle@gmail.com>

@ludamad ludamad left a comment

Copy link
Copy Markdown
Collaborator

Choose a reason for hiding this comment

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

🤖 Auto-approved

@AztecBot
AztecBot added this pull request to the merge queue Jul 13, 2026
@AztecBot

Copy link
Copy Markdown
Collaborator Author

🤖 Auto-merge enabled after 4 hours of inactivity. This PR will be merged automatically once all checks pass.

@AztecBot

Copy link
Copy Markdown
Collaborator Author

Flakey Tests

🤖 says: This CI run detected 1 tests that failed, but were tolerated due to a .test_patterns.yml entry.

\033FLAKED\033 (8;;http://ci.aztec-labs.com/4c2500b145f16185�4c2500b145f161858;;�):  yarn-project/end-to-end/scripts/run_test.sh simple src/multi-node/block-production/proof_boundary.parallel.test.ts "proof lands during slot build and checkpoint succeeds at boundary" (219s) (code: 0) group:e2e-p2p-epoch-flakes

@AztecBot

Copy link
Copy Markdown
Collaborator Author

🤖 Auto-merge enabled after 4 hours of inactivity. This PR will be merged automatically once all checks pass.

Merged via the queue into v5-next with commit 31d073e Jul 13, 2026
53 checks passed
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants