Skip to content

fix(pxe): run parallel operations to completion on failure - #25218

Merged
nchamo merged 1 commit into
merge-train/fairiesfrom
cb/port-25208-fairies
Aug 13, 2026
Merged

fix(pxe): run parallel operations to completion on failure#25218
nchamo merged 1 commit into
merge-train/fairiesfrom
cb/port-25208-fairies

Conversation

@AztecBot

Copy link
Copy Markdown
Collaborator

Port of #25208 onto merge-train/fairies.

Original description:

The PXE stores intermediate simulation state (contract classes, notes, tagging indexes, etc.) via a set of KV stores. To avoid the tx being polluted with intermediate state on failure, most of these stores accept 'staged' entries that only get persisted if the tx succeeds.

The PXE runs many things in parallel to speed things up, using Promise.all. This is problematic because as soon as one operation fails, we discard the tx and drop its staged writes — but siblings continue running and may recreate a staged entry after we drop it, wedging reorg handling and leaking memory.

This PR adds an allToCompletion helper to foundation that runs a collection of tasks fully (mirroring Promise.allSettled semantics) but rejects with the first error once every task has settled, and replaces every Promise.all in PXE with it.

Cherry-pick of 8ac210655c2ea74f708caea05cab55f15575ae65; applied cleanly on top of merge-train/fairies.


Created by claudebox · group: slackbot · requested by Nico Chamo · Slack thread

@AztecBot AztecBot added ci-draft Run CI on draft PRs. ci-no-fail-fast Sets NO_FAIL_FAST in the CI so the run is not aborted on the first failure claudebox Owned by claudebox. it can push to this PR. labels Aug 13, 2026
@nchamo
nchamo self-requested a review August 13, 2026 17:41
@nchamo nchamo self-assigned this Aug 13, 2026
@nchamo
nchamo marked this pull request as ready for review August 13, 2026 17:41
@nchamo
nchamo enabled auto-merge (squash) August 13, 2026 17:42
@nchamo
nchamo disabled auto-merge August 13, 2026 17:54
@nchamo
nchamo merged commit fc4d2cf into merge-train/fairies Aug 13, 2026
35 of 41 checks passed
@nchamo
nchamo deleted the cb/port-25208-fairies branch August 13, 2026 18:57
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. ci-no-fail-fast Sets NO_FAIL_FAST in the CI so the run is not aborted on the first failure claudebox Owned by claudebox. it can push to this PR.

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants