Skip to content

Disallow duplicate *mutable* accounts by default#3946

Merged
jacobcreech merged 46 commits intosolana-foundation:masterfrom
swaroop-osec:feat/issue-3825
Dec 9, 2025
Merged

Disallow duplicate *mutable* accounts by default#3946
jacobcreech merged 46 commits intosolana-foundation:masterfrom
swaroop-osec:feat/issue-3825

Conversation

@swaroop-osec
Copy link
Copy Markdown
Collaborator

Fixes #3825

@vercel
Copy link
Copy Markdown

vercel bot commented Sep 16, 2025

@swaroop-osec is attempting to deploy a commit to the Solana Foundation Team on Vercel.

A member of the Team first needs to authorize it.

@swaroop-osec swaroop-osec marked this pull request as ready for review September 16, 2025 07:15
@nutafrost nutafrost moved this to Security Review Required in Anchor 1.0 Sep 16, 2025
@vercel
Copy link
Copy Markdown

vercel bot commented Oct 27, 2025

The latest updates on your projects. Learn more about Vercel for GitHub.

1 Skipped Deployment
Project Deployment Preview Comments Updated (UTC)
anchor-docs Ignored Ignored Preview Dec 9, 2025 6:41am

@jacobcreech jacobcreech merged commit 48aba30 into solana-foundation:master Dec 9, 2025
59 checks passed
@github-project-automation github-project-automation bot moved this from Security Review Done to Done in Anchor 1.0 Dec 9, 2025
swaroop-osec added a commit to swaroop-osec/anchor that referenced this pull request Jan 28, 2026
swaroop-osec added a commit to swaroop-osec/anchor that referenced this pull request Feb 12, 2026
jamie-osec pushed a commit that referenced this pull request Feb 12, 2026
* lang: Update duplicate mutable account validation logic to include only types that serialize on exit (#3946)

* lang: Update documentation for `dup` constraint

* chore: Fix PR link
* lang: Update duplicate mutable account constraint to include `Migration` type
* lang: Allow duplicates in remaining accounts
* fix: use strict AnchorError assertion in nested duplicate test
* lang: Introduce `DuplicateMutableAccountKeys` trait for composite account validation
Otter-0x4ka5h pushed a commit to Otter-0x4ka5h/anchor that referenced this pull request Mar 25, 2026
…tion#3946)

* feat: Add duplicate mutable account constraint

* feat: tests for duplicate mutable accounts

* feat: add test for duplicate mutable accounts in workflow

* style(tests): prettier

* chore: update benchmarks

* feat: exclude UncheckedAccounts from duplicate mutable account checks

* feat(tests): add duplicate-mutable-accounts to test scripts

* feat: enhance duplicate mutable account checks for optional fields

* chore(bench): update

* fix: update program IDs

* feat: allow duplicate accounts in realloc2 ix

* chore(bench): update

* chore(bench): update

* feat(tests): allow duplicate accounts in misc tests

* fix(bench):update

* fix: update program ID for duplicate mutable accounts

* fix: update program ID

* fix(bench): update

* chore(docs): Updated docs and CHANGELOG.md

* refactor: ignore init accounts

* fix(bench): update

* chore: formating

* refactor: optimize duplicate mutable checks generation

* refactor: replace BTreeSet with HashSet

* (chore): Update benchmarks

* test(events): use confirmOptions for transaction handling

* chore: Update CHANGELOG.md

* feat(lang): Added checks for duplicate mutable accounts in `remaining_accounts` to prevent validation bypass.

* feat(tests): Add nested duplicate account test to prevent mutable account conflicts

* chore(bench): Update benchmarks

* fix(lang): Exclude Signer accounts from duplicate mutable checks in account validation

* feat(tests): Add test to initialize multiple accounts with the same payer

* chore(bench): Update

* fix: package.json

* refactor: remove unused confirmOptions from event tests

* chore: update benchmarks

* chore: update benchmarks

* Update benchmarks

* chore: Update benchmarks
Otter-0x4ka5h pushed a commit to Otter-0x4ka5h/anchor that referenced this pull request Mar 25, 2026
…ana-foundation#4202)

* lang: Update duplicate mutable account validation logic to include only types that serialize on exit (solana-foundation#3946)

* lang: Update documentation for `dup` constraint

* chore: Fix PR link
* lang: Update duplicate mutable account constraint to include `Migration` type
* lang: Allow duplicates in remaining accounts
* fix: use strict AnchorError assertion in nested duplicate test
* lang: Introduce `DuplicateMutableAccountKeys` trait for composite account validation
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Projects

Status: Done

Development

Successfully merging this pull request may close these issues.

lang: Disallow duplicate *mutable* accounts by default

4 participants