Skip to content

fix: fully validate txs retrieved from tx file store#21988

Merged
alexghr merged 1 commit intomerge-train/spartanfrom
ag/fix-tx-validation
Mar 25, 2026
Merged

fix: fully validate txs retrieved from tx file store#21988
alexghr merged 1 commit intomerge-train/spartanfrom
ag/fix-tx-validation

Conversation

@alexghr
Copy link
Copy Markdown
Contributor

@alexghr alexghr commented Mar 25, 2026

.

@alexghr alexghr force-pushed the ag/fix-tx-validation branch from 2027026 to 7254f7d Compare March 25, 2026 13:44
@alexghr alexghr enabled auto-merge (squash) March 25, 2026 13:55
@alexghr alexghr merged commit 8407f66 into merge-train/spartan Mar 25, 2026
11 checks passed
@alexghr alexghr deleted the ag/fix-tx-validation branch March 25, 2026 14:02
@AztecBot
Copy link
Copy Markdown
Collaborator

❌ Failed to cherry-pick to v4 due to conflicts. (🤖) View backport run.

AztecBot pushed a commit that referenced this pull request Mar 25, 2026
…1988)

Cherry-pick of 8407f66 with conflicts in:
- yarn-project/p2p/src/client/factory.ts
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>
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>
github-merge-queue bot pushed a commit that referenced this pull request Mar 27, 2026
BEGIN_COMMIT_OVERRIDE
fix: only clear provenBlockNumber when it exceeds prune point (#21946)
chore: (A-779) load all accounts before calling
LogService.#getSecretsForSenders (#21923)
fix: align staging-public mana target with testnet/mainnet (#21983)
chore: (A-777) add warn logs for regressive path in block synchronizer
(#21925)
fix: fully validate txs retrieved from tx file store (#21988)
refactor: extract checkpoint proposal handling to ProposalHandler
(#21999)
fix: unbounded memory in calldataRetriever (#22004)
fix(p2p): check peer rate limit before global to prevent quota
starvation (#21997)
fix(p2p): evict expired failed-auth-handshake entries on heartbeat
(#21992)
chore: defensively handle skipPushProposedBlocksToArchiver (#22017)
chore: bump testnet prover resource profile to prod-hi-tps (#22019)
chore: (A-835) remove unused serializer (#22037)
fix(p2p): remove disconnected peers from scoring maps (#22009)
fix(e2e): set anvilSlotsInAnEpoch in slashing tests (#21869)
fix(ethereum): Audit fixes A-810, A-812 (nonce race, isEscapeHatchOpen
logging) (#21948)
chore: remove old TxPool implementation (#22028)
fix: Fix blob encoding when uploaded from proposals (#22045)
chore: Adds /cycle and /fix skills. Also configures linear mcp server
(#22043)
chore: remove validatorReexecute config option (#22024)
fix(sequencer): use last L1 slot of L2 slot as eth_simulateV1 timestamp
(#22023)
docs(simulator): clarify teardown gas billing is intentional (#22057)
chore: revert account loading optimization in log service (#22062)
fix: use DateProvider in PeerScoring (#22070)
fix(aztec.js): preserve extraHashedArgs in DeployMethod.with() (#22053)
fix(p2p): replace process.exit() with graceful shutdown in worker
cleanup (#22046)
chore: merge next (#22089)
fix(stdlib): correct NoteDao size (#22068)
feat: improve blob download from filestores (#22096)
fix: remove stale tx_pool v1 benchmark reference (#22104)
END_COMMIT_OVERRIDE
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.

3 participants