Skip to content

fix: if upgradeable_v3 program missing program data, treat as Closed#311

Merged
Aursen merged 2 commits intoLiteSVM:masterfrom
MicaiahReid:fix/close-program-account
Mar 20, 2026
Merged

fix: if upgradeable_v3 program missing program data, treat as Closed#311
Aursen merged 2 commits intoLiteSVM:masterfrom
MicaiahReid:fix/close-program-account

Conversation

@MicaiahReid
Copy link
Copy Markdown
Contributor

@MicaiahReid MicaiahReid commented Mar 19, 2026

6aaf78c - test commit to demonstrate that invoking a close program leads to a panic
282be74 - potential fix: in load_program, if it's an upgradeable_v3 program with missing programdata account, return a ProgramCacheEntry with type ProgramCacheEntryType::Closed.

The inline rs-docs on that Closed variant says

Tombstone for programs that were either explicitly closed or never deployed.

So here I'm assuming it's safe to mark all missing programdata accounts as "Closed", even if they were never deployed.

I'm not sure if there's a footgun I'm missing here, please enlighten me if so.


Also, note the PR was co-authored with Codex

@MicaiahReid MicaiahReid changed the title Fix/close program account fix(litesvm): if upgradeable_v3 program missing program data, treat as Closed Mar 19, 2026
@MicaiahReid MicaiahReid changed the title fix(litesvm): if upgradeable_v3 program missing program data, treat as Closed fix: if upgradeable_v3 program missing program data, treat as Closed Mar 19, 2026
@Aursen Aursen force-pushed the fix/close-program-account branch from 282be74 to f1c7507 Compare March 20, 2026 07:25
@Aursen Aursen merged commit d348fd3 into LiteSVM:master Mar 20, 2026
23 checks passed
Aursen pushed a commit that referenced this pull request Mar 30, 2026
…311)

* test: close upgradeable program

* fix(litesvm): if upgradeable_v3 program missing program data, treat as Closed
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.

2 participants