Skip to content

fix(tx): reject txs with invalid setup when unprotecting#21224

Merged
spalladino merged 3 commits intomerge-train/spartanfrom
palla/reject-invalid-setup-in-unprotect
Mar 12, 2026
Merged

fix(tx): reject txs with invalid setup when unprotecting#21224
spalladino merged 3 commits intomerge-train/spartanfrom
palla/reject-invalid-setup-in-unprotect

Conversation

@spalladino
Copy link
Contributor

When unprotecting txs, we were not running the check for allowed public setup functions, which was skipped in the reqresp entrypoint.

This commit now tracks whether public setup is allowed or not for a tx in the tx metadata, and uses it to drop the tx when it becomes unprotected.

An alternative approach would have been to store the entire public setup calls in the tx metadata, but this means a smaller memory footprint.

@spalladino spalladino changed the base branch from next to merge-train/spartan March 6, 2026 20:03
@spalladino spalladino added ci-no-fail-fast Sets NO_FAIL_FAST in the CI so the run is not aborted on the first failure backport-to-v4 labels Mar 6, 2026
Copy link
Collaborator

@PhilWindle PhilWindle left a comment

Choose a reason for hiding this comment

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

Looks good. Just a couple of things.

  1. Could you add a test to tx_pool_v2.test please? I try and keep that test suite pretty exhaustive.
  2. Do we need to update the README for validations?

@spalladino
Copy link
Contributor Author

Do we need to update the README for validations?

I originally had this commit as part of a bigger one and had updated the README there. Let me bring that change here.

@spalladino spalladino force-pushed the palla/reject-invalid-setup-in-unprotect branch from b605576 to cd0c80b Compare March 10, 2026 15:00
When unprotecting txs, we were not running the check for allowed public
setup functions, which was skipped in the reqresp entrypoint.

This commit now tracks whether public setup is allowed or not for a tx
in the tx metadata, and uses it to drop the tx when it becomes
unprotected.

An alternative approach would have been to store the entire public setup
calls in the tx metadata, but this means a smaller memory footprint.
@spalladino spalladino force-pushed the palla/reject-invalid-setup-in-unprotect branch from cd0c80b to 3c1e07b Compare March 10, 2026 21:01
@spalladino spalladino marked this pull request as draft March 11, 2026 01:03
@spalladino spalladino force-pushed the palla/reject-invalid-setup-in-unprotect branch from 3c1e07b to 03eed16 Compare March 11, 2026 21:37
@spalladino spalladino marked this pull request as ready for review March 11, 2026 21:38
@spalladino spalladino enabled auto-merge (squash) March 11, 2026 21:38
@spalladino spalladino force-pushed the palla/reject-invalid-setup-in-unprotect branch from 03eed16 to e393a46 Compare March 12, 2026 12:28
@spalladino spalladino force-pushed the palla/reject-invalid-setup-in-unprotect branch from c517b03 to 856cb1a Compare March 12, 2026 20:08
@spalladino spalladino merged commit 55e0b86 into merge-train/spartan Mar 12, 2026
10 checks passed
@spalladino spalladino deleted the palla/reject-invalid-setup-in-unprotect branch March 12, 2026 20:26
AztecBot pushed a commit that referenced this pull request Mar 12, 2026
When unprotecting txs, we were not running the check for allowed public setup functions, which was skipped in the reqresp entrypoint.

This commit now tracks whether public setup is allowed or not for a tx in the tx metadata, and uses it to drop the tx when it becomes unprotected.

An alternative approach would have been to store the entire public setup calls in the tx metadata, but this means a smaller memory footprint.
@AztecBot
Copy link
Collaborator

✅ Successfully backported to backport-to-v4-next-staging #21453.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

backport-to-v4-next ci-no-fail-fast Sets NO_FAIL_FAST in the CI so the run is not aborted on the first failure

Projects

None yet

Development

Successfully merging this pull request may close these issues.

3 participants