Skip to content

SIMD-0432: Loader V3: Reclaim Closed Program#432

Open
buffalojoec wants to merge 6 commits intomainfrom
loader-v3-reclaim-closed
Open

SIMD-0432: Loader V3: Reclaim Closed Program#432
buffalojoec wants to merge 6 commits intomainfrom
loader-v3-reclaim-closed

Conversation

@buffalojoec
Copy link
Copy Markdown
Contributor

No description provided.

@simd-bot
Copy link
Copy Markdown

simd-bot bot commented Dec 18, 2025

Hello buffalojoec! Welcome to the SIMD process. By opening this PR you are affirming that your SIMD has been thoroughly discussed and vetted in the SIMD discussion section. The SIMD PR section should only be used to submit a final technical specification for review. If your design / idea still needs discussion, please close this PR and create a new discussion here.

This PR requires the following approvals before it can be merged:

Once all requirements are met, you can merge this PR by commenting /merge.

@buffalojoec buffalojoec force-pushed the loader-v3-reclaim-closed branch from cc1c7c8 to 5873149 Compare December 18, 2025 14:13
@buffalojoec buffalojoec changed the title SIMD-XXXX: Loader V3: Reclaim Closed Program SIMD-0432: Loader V3: Reclaim Closed Program Dec 18, 2025
@buffalojoec buffalojoec force-pushed the loader-v3-reclaim-closed branch from 5873149 to 1b9bd68 Compare December 18, 2025 14:18
@deanmlittle
Copy link
Copy Markdown
Contributor

lgtm!

deanmlittle
deanmlittle previously approved these changes Jan 2, 2026
topointon-jump
topointon-jump previously approved these changes Jan 23, 2026
Comment on lines +29 to +33
- Permanent account bloat: Tombstoned program accounts cannot be reclaimed and
accumulate indefinitely in the accounts database.
- RPC performance degradation: getProgramAccounts against the loader v3 program
must return all program accounts, including closed ones, increasing response
size and latency.
Copy link
Copy Markdown

Choose a reason for hiding this comment

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

Do we know how many tombstoned program accounts there are? Is this actually a performance issue? I'm not against this proposal but I think in general we should be clear about the motivations for proposals, and keep the motivations list small - only including the most impactful ones.

Copy link
Copy Markdown
Contributor Author

Choose a reason for hiding this comment

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

I just ran a scrape and found 49,210 Loader V3 program accounts on mb, 33,804 of which are tombstones.
If you want the script, lmk.

@simd-bot
Copy link
Copy Markdown

simd-bot bot commented Jan 23, 2026

Thanks, topointon-jump!

⚠️ Status: Cannot merge yet

Copy link
Copy Markdown

@topointon-jump topointon-jump left a comment

Choose a reason for hiding this comment

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

Is there a risk that a user will accidentally get their program address taken over by someone else? Say if the account is reclaimable, and they don't realise it, or an adversary claims it during the window where the original user is trying to reclaim it... are we concerned about this scenario?

@buffalojoec
Copy link
Copy Markdown
Contributor Author

Is there a risk that a user will accidentally get their program address taken over by someone else? Say if the account is reclaimable, and they don't realise it, or an adversary claims it during the window where the original user is trying to reclaim it... are we concerned about this scenario?

The only way someone could reclaim another person's tombstoned program is if they themselves held the program keypair. I did consider this scenario - since devs might have previously assumed this keypair was forever useless and thrown it out, or disregarded mistakes like accidentally committing it to GitHub - and I was apprehensive at first. However, we figured this would be an exceptionally rare case.

What do you think?

@buffalojoec buffalojoec requested a review from t-nelson February 5, 2026 02:32
@buffalojoec buffalojoec requested a review from bw-solana March 30, 2026 14:15
bw-solana
bw-solana previously approved these changes Mar 30, 2026
Copy link
Copy Markdown
Contributor

@bw-solana bw-solana left a comment

Choose a reason for hiding this comment

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

LGTM.

Left a couple minor nits


## Detailed Design

The `Close` instruction will be updated to include an optional boolean input. If
Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

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

nit: maybe mention again this is the Loader-v3 Close instruction here

Copy link
Copy Markdown
Contributor Author

Choose a reason for hiding this comment

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

+-----------+-----------+
| |
tombstone=false tombstone=true
| |
Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

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

should we add "program was deployed in the current slot" branches to this picture?

Copy link
Copy Markdown
Contributor Author

Choose a reason for hiding this comment

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

@simd-bot
Copy link
Copy Markdown

simd-bot bot commented Mar 30, 2026

✅ All approvals received! @buffalojoec, you can now merge this by commenting /merge.

Status: Ready to merge

@buffalojoec buffalojoec dismissed stale reviews from bw-solana and topointon-jump via 0877b2f March 31, 2026 01:06
@buffalojoec
Copy link
Copy Markdown
Contributor Author

/merge

@simd-bot
Copy link
Copy Markdown

simd-bot bot commented Mar 31, 2026

buffalojoec ⚠️ Status: Cannot merge yet

@buffalojoec
Copy link
Copy Markdown
Contributor Author

Ahh gud op sec

@simd-bot
Copy link
Copy Markdown

simd-bot bot commented Mar 31, 2026

Thanks, bw-solana!

⚠️ Status: Cannot merge yet

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.

6 participants