Skip to content

chore: bring main changes back to next#3052

Merged
mmagician merged 2 commits into
nextfrom
partylikeits1983-claude/backport-tx-script-allowlist-next
Jun 9, 2026
Merged

chore: bring main changes back to next#3052
mmagician merged 2 commits into
nextfrom
partylikeits1983-claude/backport-tx-script-allowlist-next

Conversation

@partylikeits1983

@partylikeits1983 partylikeits1983 commented Jun 5, 2026

Copy link
Copy Markdown
Contributor

Brings next to parity with main by backporting the only two commits that were not already on next: the network-account tx-script allowlist (#3028) and its note-allowlist API rename follow-up (#3049).

Every other commit from main's v0.15.x line had already been independently backported to next (Clone for TransactionContextBuilder #2979, duplicate-GER rejection #2983, MASM style-guide removal #2994, same-scheme attachment docs #2992, unique BURN note id #2987, assertion-macro arms #2897, circular note-dependency rejection #2993, and B2AGG NoteType::Public enforcement #2988 / #3005). A full git merge main into next re-introduced all of those as duplicate commits, which is what the earlier version of this PR did.

This version instead cherry-picks only #3028 and #3049 on top of the current next, so the diff contains exactly those two changes and nothing else. The v0.15.1 / v0.15.2 release bumps are intentionally excluded because next is on 0.16.0.

After this merges, next contains all of main's functional changes with no duplicated history.

@mmagician

Copy link
Copy Markdown
Collaborator

Why not actually bring all the changes on main that are not on next?

@partylikeits1983 partylikeits1983 force-pushed the partylikeits1983-claude/backport-tx-script-allowlist-next branch from 040ba17 to 3fd17fd Compare June 5, 2026 20:50
@partylikeits1983 partylikeits1983 changed the title feat: backport network-account tx-script allowlist to next (#3028, #3049) chore: merge main into next Jun 5, 2026
@partylikeits1983 partylikeits1983 marked this pull request as ready for review June 5, 2026 20:54
@mmagician

Copy link
Copy Markdown
Collaborator

@partylikeits1983 are you sure the list of commits is correct? E.g. I see #2994 which was already merged into next.

partylikeits1983 and others added 2 commits June 8, 2026 23:26
feat: allow root-allowlisted tx scripts on network accounts (#3028)

AuthNetworkAccount previously banned every transaction script outright. This generalizes that ban into a tx-script-root allowlist that mirrors the existing note-script allowlist: a transaction that runs no tx script is allowed, and any tx script that does run must have its MAST root in an allowlist fixed at account creation. This lets network accounts run owner-approved scripts (e.g. setting the expiration delta, needed by the ntx-builder) while preserving the invariant that only root-pinned, pre-approved code can run against a signature-less account.

Changes:
- Add `TransactionScriptRoot` newtype mirroring `NoteScriptRoot`; `TransactionScript::root()` now returns it.
- Add `tx_script_allowlist.masm` (`assert_tx_script_allowed`) and switch the network auth component to it; remove the now-unused `assert_no_tx_script`.
- Add `NetworkAccountTxScriptAllowlist` storage (`allowed_tx_scripts` slot); an empty allowlist permits no tx scripts (the prior behavior).
- Wire through `AuthNetworkAccount::with_allowed_tx_scripts` and `AuthMethod::NetworkAccount.allowed_tx_script_roots`.

A root pins a script's code but not its `TX_SCRIPT_ARGS`/advice inputs, which an arbitrary submitter controls, so only scripts whose behavior is fixed regardless of those inputs should be allowlisted.

Breaking: the component gains a second storage slot (existing network accounts must be recreated), and `TransactionScript::root()` returns `TransactionScriptRoot` instead of `Word`.

Closes #3027.

Co-authored-by: Philipp Gackstatter <PhilippGackstatter@users.noreply.github.com>
* refactor: rename network-account note allowlist API
@partylikeits1983 partylikeits1983 force-pushed the partylikeits1983-claude/backport-tx-script-allowlist-next branch from 3fd17fd to 6f0a922 Compare June 9, 2026 03:47
@partylikeits1983

Copy link
Copy Markdown
Contributor Author

Heads up: I force-pushed this branch to rewrite its history.

The previous version did a full git merge main into next. Because all of main's v0.15.x line except #3028 and #3049 had already been independently backported to next, that merge re-introduced 8 PRs (#2979, #2983, #2987, #2992, #2993, #2994, #2897, #2988/#3005) as duplicate commits.

The branch is now a clean cherry-pick of just the two genuinely-missing commits, #3028 and #3049, rebased on the current next. The diff is exactly those two changes; the v0.15.x version bumps are excluded since next is on 0.16.0. make format and make test pass locally.

Re-requesting review since the prior approval was on the old merge head.

@partylikeits1983 partylikeits1983 changed the title chore: merge main into next feat: backport network-account tx-script allowlist (#3028, #3049) to next Jun 9, 2026
@mmagician mmagician changed the title feat: backport network-account tx-script allowlist (#3028, #3049) to next chore: bring main changes back to next Jun 9, 2026
@mmagician mmagician merged commit 21022f8 into next Jun 9, 2026
20 checks passed
@mmagician mmagician deleted the partylikeits1983-claude/backport-tx-script-allowlist-next branch June 9, 2026 07:50
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.

3 participants