Skip to content

fix(p2p): use per-batch ops array in AztecDatastore.batch() - #22357

Merged
spypsy merged 1 commit into
merge-train/spartanfrom
spyros/a-761-audit-92-aztecdatastorebatch-shares-batchops-across
Apr 9, 2026
Merged

fix(p2p): use per-batch ops array in AztecDatastore.batch()#22357
spypsy merged 1 commit into
merge-train/spartanfrom
spyros/a-761-audit-92-aztecdatastorebatch-shares-batchops-across

Conversation

@spypsy

@spypsy spypsy commented Apr 7, 2026

Copy link
Copy Markdown
Member

Summary

  • AztecDatastore.batch() stored batch operations in a shared class-level #batchOps array, meaning concurrent batches would corrupt each other's operations. Replaced with a local ops array per batch call, matching the reference BaseDatastore implementation from datastore-core.
  • Added a test that verifies concurrent batches don't interfere with each other.

Fixes A-761

Co-Authored-By: Claude Opus 4.6 (1M context) <noreply@anthropic.com>
Made-with: Cursor
@spypsy
spypsy marked this pull request as ready for review April 8, 2026 11:46
@spypsy
spypsy merged commit d2d33dd into merge-train/spartan Apr 9, 2026
20 checks passed
@spypsy
spypsy deleted the spyros/a-761-audit-92-aztecdatastorebatch-shares-batchops-across branch April 9, 2026 10:59
github-merge-queue Bot pushed a commit that referenced this pull request Apr 10, 2026
BEGIN_COMMIT_OVERRIDE
fix(stdlib): use bigint arithmetic in GasFees.mul() for non-integer
scalars (#22383)
fix(node-lib): reuse existing fileStore in snapshot sync instead of
recreating (#22375)
fix: gate req/resp data protocols for unauthenticated peers (#22406)
fix(p2p): use per-batch ops array in AztecDatastore.batch() (#22357)
chore(pipeline): spartan config (#21285)
chore: add claude skill to send txs (#22439)
feat(pipeline): minimize deadzone w cross slot attesting (#21435)
fix(p2p): avoid 32-bit overflow in attestation pool block position key
(#22412)
fix(prover-client): increment retry count on timeout re-enqueue to
prevent infinite loop (#22355)
fix: remove redundant p2pClient.start() call (#22438)
chore: add kubectl binary to spartan .gitignore (#22454)
END_COMMIT_OVERRIDE
critesjosh pushed a commit that referenced this pull request Apr 14, 2026
## Summary

- `AztecDatastore.batch()` stored batch operations in a shared
class-level `#batchOps` array, meaning concurrent batches would corrupt
each other's operations. Replaced with a local `ops` array per batch
call, matching the reference `BaseDatastore` implementation from
`datastore-core`.
- Added a test that verifies concurrent batches don't interfere with
each other.

Fixes
[A-761](https://linear.app/aztec-labs/issue/A-761/audit-92-aztecdatastorebatch-shares-batchops-across-concurrent-batches)

Co-authored-by: Claude Opus 4.6 (1M context) <noreply@anthropic.com>
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants