feat(p2p): enforce minimum tx pool age for block building#20384
Merged
PhilWindle merged 9 commits intomerge-train/spartanfrom Feb 11, 2026
Merged
feat(p2p): enforce minimum tx pool age for block building#20384PhilWindle merged 9 commits intomerge-train/spartanfrom
PhilWindle merged 9 commits intomerge-train/spartanfrom
Conversation
ea0e163 to
f993d79
Compare
Co-Authored-By: Claude Opus 4.6 <noreply@anthropic.com>
Co-Authored-By: Claude Opus 4.6 <noreply@anthropic.com>
PhilWindle
commented
Feb 11, 2026
| const sortedHashes = [...hashesAtFee].sort(hashCompareFn); | ||
| for (const hash of sortedHashes) { | ||
| const meta = this.#metadata.get(hash); | ||
| if (meta && meta.receivedAt <= maxReceivedAt) { |
Collaborator
Author
There was a problem hiding this comment.
Remove duplicate code from above
alexghr
approved these changes
Feb 11, 2026
Contributor
alexghr
left a comment
There was a problem hiding this comment.
looks good, just a note on a iteratePendingByLifetime sharing code with the prior iterate fn
github-merge-queue bot
pushed a commit
that referenced
this pull request
Feb 12, 2026
BEGIN_COMMIT_OVERRIDE chore: Should fix proving benchmarks by reducing committee lag (#20381) chore: standalone forge broadcast wrapper with retry, timeout, and anvil detection (#19824) chore: benchmark tx val (#20227) fix: cloudflare terraform API (#20387) fix: HA e2e test order & retries (#20383) fix: incorporate forge broadcast review feedback (#20390) refactor(p2p): rewrite FileStoreTxCollection with retry, backoff, and shared worker pool (#20317) chore(ci): run ci job on draft PRs (#20395) feat(bot): allow anchoring txs to proposed chain (#20392) feat(p2p): slot-based soft deletion for TxPoolV2 (#20388) chore: add setup-container script (#20309) feat: build aztec-prover-agent with baked-in CRS (#20391) fix!: change protocol contracts deployer to be the contract address (#20396) feat(p2p): enforce minimum tx pool age for block building (#20384) refactor(sentinel): update validator statuses to checkpoint-based naming (#20372) chore: log tx hash (#20413) chore: update l1 fee analysis to measure blob count in L1 blocks (#20414) chore: set up tx file store in next-net (#20418) chore(ci): gate draft PRs from CI, allow override with ci-draft label (#20426) fix: stabilize writing_an_account_contract.test.ts (#20420) END_COMMIT_OVERRIDE
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
Summary
receivedAttimestamp toTxMetaDataso the pool knows when each tx was first receivedgetEligiblePendingTxHashes(maxReceivedAt)to the pool interface, filtering out txs that are too newiterateEligiblePendingTxs()to the P2P client, which computes the cutoff fromminTxPoolAgeMsconfig (default 2000ms, envP2P_MIN_TX_POOL_AGE_MS)CheckpointProposalJobto useiterateEligiblePendingTxs()instead ofiteratePendingTxs()iteratePendingTxsis unchanged — still used byAztecNode.getMaxPriorityFees()which should see all pending txsThis gives the network time to propagate transactions before a proposer includes them in a block. Hydrated txs get
receivedAt: 0so they're always eligible immediately on restart.Test plan
yarn buildpassesyarn workspace @aztec/p2p test src/mem_pools/tx_pool_v2/tx_pool_v2.test.ts— 164 tests passyarn workspace @aztec/sequencer-client test src/sequencer/checkpoint_proposal_job.test.ts— 26 tests pass🤖 Generated with Claude Code