feat!: proofless tx lookup in getTxByHash and getTxsByHash#23827
Merged
spalladino merged 9 commits intoJun 4, 2026
Conversation
18f42bd to
1034f8a
Compare
PhilWindle
approved these changes
Jun 4, 2026
1034f8a to
3bd6a06
Compare
9ef51dc to
b82384a
Compare
AztecNode.getTxByHash and getTxsByHash take an optional GetTxByHashOptions argument with an includeProof flag, matching GetTxReceiptOptions semantics: proofs are stripped unless includeProof is true, cutting ~35-52KB per tx over the wire. The tx pool now stores proofs in a separate map from the tx data, so a proofless lookup never loads the proof from the DB at all. The p2p store schema version is bumped to 3 to drop old single-blob pools. Fix A-1113
… them The pending-tx iterators on the p2p client take an includeProof option. Block building in the checkpoint proposal job skips proofs unless publishTxsWithProposals attaches the same tx objects to broadcasted proposals, automine always skips them since it publishes straight to L1, and getMaxPriorityFees only reads gas settings off the first pending tx.
Use the p2p client's getTxsByHashFromPool instead of issuing one getTxByHash call per hash.
…ce test Review feedback: a missing tx_proofs entry breaks the blob/proof invariant (addTx always writes one, even for empty proofs), so flag it with a structured warning instead of silently returning a proofless tx. Also pin that NodeRpcTxSource requests proofs explicitly, since collected txs feed block validation and proving.
…omBuffers Replace the parse-then-rebuild pattern (Tx.fromBuffer followed by withProof creating a second Tx) with a Tx.fromBuffers factory that takes the separately-stored tx and proof buffers and constructs the tx once. Removes the now-unused Tx.withProof helper.
Review feedback: getPendingTxs was the remaining bulk endpoint still loading and returning proofs for every pending tx. It now takes the same GetTxByHashOptions argument as the other tx getters on both the node and p2p RPC APIs, with proofs opt-in via includeProof.
The GetTxReceiptOptions API does not exist on the v5 train.
3bd6a06 to
f0e7e80
Compare
The v5 base bumped the noir submodule to v1.0.0-beta.22 without regenerating the lockfile, leaving the noir-* portal deps pinned at beta.21. This fails 'yarn install --immutable' in CI.
|
Review the following changes in direct dependencies. Learn more about Socket for GitHub.
|
This was referenced Jun 4, 2026
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.
Motivation
AztecNode.getTxByHash,getTxsByHashandgetPendingTxsalways shipped the full chonk proof (~35-52KB per tx), which most callers (explorers, wallets polling pending txs) never use. This change makes proofs opt-in to cut wire transfer. Supersedes #23634, which stripped the proof only after loading the full tx from the DB.Approach
The tx pool stores proofs in a separate KV map from the tx data, so a proofless lookup never loads the proof from storage at all (the previous attempt loaded and discarded it). The node API getters take an optional
GetTxByHashOptionswith anincludeProofflag that defaults to false and is threaded down through the p2p client to the pool; pool-internal callers default to full txs since reqresp serving and tx collection need proofs. Internal reads that never need proofs (block-building iterators, fee queries) explicitly skip them. The p2p store schema version is bumped to 3 to drop old single-blob pools (the mempool repopulates via gossip).Changes
GetTxByHashOptionstype + schema ongetTxByHash/getTxsByHash/getPendingTxs(node and p2p APIs), aTx.withoutProofhelper, and aTx.fromBuffersfactory that deserializes a tx and its separately-stored proof in one pass.TxPoolV2Implsplits tx data and proof into separate maps (txs/tx_proofs), written and deleted in lockstep;getTxByHash/getTxsByHashtakeincludeProof(pool default: include); a missing proof entry logs a structured warning since it breaks the blob/proof invariant; soft-delete resurrection reattaches the proof before rewriting; store schema version bumped to 3.includeProof: truesince collected txs feed block validation and proving.publishTxsWithProposalsattaches the same tx objects to gossiped proposals) and always in automine. Block-building validators exclude the proof validator, so this is safe.getTxsByHashuses the batched pool lookup;getMaxPriorityFeesreads proofless; thegetTxReceiptpending path passes the flag to the pool instead of loading the full tx and stripping after the fact.Tx.fromBuffersround-trip.Fixes A-1113