Skip to content

fix: fully validate txs retrieved from tx file store (backport #21988)#21998

Merged
alexghr merged 2 commits into
backport-to-v4-stagingfrom
claudebox/backport-21988-v4
Mar 25, 2026
Merged

fix: fully validate txs retrieved from tx file store (backport #21988)#21998
alexghr merged 2 commits into
backport-to-v4-stagingfrom
claudebox/backport-21988-v4

Conversation

@AztecBot

Copy link
Copy Markdown
Collaborator

Summary

Backport of #21988 to v4.

Adds full transaction validation (via TxValidator) to txs retrieved from the tx file store and node RPC sources, replacing the previous hash-only validation. This ensures downloaded txs are validated with the same rigor as txs received via p2p.

Cherry-pick details

  • Commit 1: Raw cherry-pick with conflict markers in yarn-project/p2p/src/client/factory.ts
  • Commit 2: Conflict resolution — simplified import to only include functions used in this file

The conflict was minor: the v4 branch had a single-line import while next had a multi-line import block with additional unused imports (createCheckAllowedSetupCalls, getDefaultAllowedSetupFunctions). Resolved by importing only the two functions actually used.

Verification

  • Build passes (yarn build)
  • All related tests pass:
    • p2p/src/services/tx_collection/tx_source.test.ts (3/3)
    • p2p/src/services/tx_file_store/tx_file_store.test.ts (17/17)
    • foundation/src/collection/array.test.ts (61/61)

ClaudeBox log: https://claudebox.work/s/9c69d8936952bb70?run=1

alexghr and others added 2 commits March 25, 2026 14:06
…1988)

Cherry-pick of 8407f66 with conflicts in:
- yarn-project/p2p/src/client/factory.ts
Resolved import conflict in factory.ts — only importing the functions
actually used in this file (createTxValidatorForReqResponseReceivedTxs
and createTxValidatorForTransactionsEnteringPendingTxPool).
@AztecBot AztecBot added ci-draft Run CI on draft PRs. claudebox Owned by claudebox. it can push to this PR. labels Mar 25, 2026
@alexghr alexghr marked this pull request as ready for review March 25, 2026 16:20
@alexghr alexghr merged commit 1508c21 into backport-to-v4-staging Mar 25, 2026
23 of 26 checks passed
@alexghr alexghr deleted the claudebox/backport-21988-v4 branch March 25, 2026 16:21
alexghr added a commit that referenced this pull request Mar 25, 2026
#21998)

## Summary
Backport of #21988
to v4.

Adds full transaction validation (via `TxValidator`) to txs retrieved
from the tx file store and node RPC sources, replacing the previous
hash-only validation. This ensures downloaded txs are validated with the
same rigor as txs received via p2p.

## Cherry-pick details
- **Commit 1**: Raw cherry-pick with conflict markers in
`yarn-project/p2p/src/client/factory.ts`
- **Commit 2**: Conflict resolution — simplified import to only include
functions used in this file

The conflict was minor: the v4 branch had a single-line import while
`next` had a multi-line import block with additional unused imports
(`createCheckAllowedSetupCalls`, `getDefaultAllowedSetupFunctions`).
Resolved by importing only the two functions actually used.

## Verification
- Build passes (`yarn build`)
- All related tests pass:
  - `p2p/src/services/tx_collection/tx_source.test.ts` (3/3)
  - `p2p/src/services/tx_file_store/tx_file_store.test.ts` (17/17)
  - `foundation/src/collection/array.test.ts` (61/61)

ClaudeBox log: https://claudebox.work/s/9c69d8936952bb70?run=1

---------

Co-authored-by: Alex Gherghisan <alexghr@users.noreply.github.com>
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.

2 participants