Skip to content

fix(p2p): validate BLOCK_TXS in BatchTxRequester#23371

Open
fcarreiro wants to merge 1 commit into
merge-train/spartanfrom
fc/batch-tx-validation
Open

fix(p2p): validate BLOCK_TXS in BatchTxRequester#23371
fcarreiro wants to merge 1 commit into
merge-train/spartanfrom
fc/batch-tx-validation

Conversation

@fcarreiro
Copy link
Copy Markdown
Contributor

@fcarreiro fcarreiro commented May 18, 2026

This PR modifies and clarifies what is validated where:

  • sendRequestToPeer (from reqresp) is considered a low level method. It does not validate transactions and does only very minimal checks on the request and response objects. It does penalize peers under some circumstances.
  • The concept of subprotocol validator is removed from reqresp.
  • BatchTxRequester now (1) validates the req and response objects; (2) validates the TXs when the response is valid.
  • Unused validateRequestedTx is dropped in this PR.

Closes https://linear.app/aztec-labs/issue/A-1014/block-txs-reqresp-validator-validaterequestedblocktxs-is-never-invoked .

Copy link
Copy Markdown
Contributor Author

fcarreiro commented May 18, 2026

}
}

/**
Copy link
Copy Markdown
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Unused.

@fcarreiro fcarreiro force-pushed the fc/batch-tx-validation branch from 0138e81 to 4210082 Compare May 18, 2026 13:55
return;
}

await this.handleSuccessResponseFromPeer(peerId, blockResponse);
Copy link
Copy Markdown
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

The TXs themselves are validated inside here.

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.

1 participant