Skip to content

Omit the new authority account in SetAuthority when none is given - #31

Merged
joncinque merged 2 commits into
solana-program:mainfrom
Iamsohungrynow:fix/set-authority-omit-new-authority
Dec 1, 2026
Merged

joncinque merged 2 commits into
solana-program:mainfrom
Iamsohungrynow:fix/set-authority-omit-new-authority

Conversation

@Iamsohungrynow

Copy link
Copy Markdown
Contributor

calling setAuthority without a newAuthority to make a program immutable filled the slot with the loader id, so the upgrade authority became BPFLoaderUpgradeab1e11111111111111111111111 instead of none. the account is omitted now (via codama.mjs), with a litesvm test

@Iamsohungrynow
Iamsohungrynow force-pushed the fix/set-authority-omit-new-authority branch from 0c0e529 to 19a4395 Compare December 1, 2026 17:21
joncinque added a commit that referenced this pull request Dec 1, 2026
#### Problem

The IDL in the repo is an anchor IDL, which means we can't annotate the
IDL with more information. For example, #31 needs to use a visitor
rather than just changing the IDL.

#### Summary of changes

Convert the IDL to codama by running `pnpm codama convert`.
@Iamsohungrynow

Copy link
Copy Markdown
Contributor Author

rebased on main and switched the test to your sbpfv3_noop.so, no binary from my side now

@joncinque
joncinque force-pushed the fix/set-authority-omit-new-authority branch from 19a4395 to deab53f Compare December 1, 2026 17:24
@joncinque
joncinque requested a review from lorisleiva December 1, 2026 17:25
@joncinque

Copy link
Copy Markdown
Contributor

Thanks for the contribution! I've updated the IDL to be a codama IDL and explicitly set the missing account strategy to "omitted" rather than using a visitor

@lorisleiva lorisleiva left a comment

Copy link
Copy Markdown
Member

Choose a reason for hiding this comment

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

Perfect, thank you!

@joncinque
joncinque merged commit 4523028 into solana-program:main Dec 1, 2026
20 checks passed
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