Skip to main content
Technical proposal SIMD-0418 Review

Enable Loader v2 to v3 Program Migrations

  1. Idea
  2. Draft
  3. Review
  4. Accept
  5. Implement
  6. Active

Decision brief

Why this proposal matters

This proposal introduces a feature-gated mechanism for runtime-level migration of Loader v2 programs to Loader v3.

Source-backed reading aid · source language: EN

Proposal at a glance

What changes

  • Create the program data account: A program data account is derived from the program ID. This account must not already exist, with one exception: if an account with the derived address exists, holds lamports, and is owned by the System Program, it may be reused. In that case, any excess lamports are burned.…
  • Rewrite the program account: The existing Loader v2 program account is replaced with a Loader v3 program account that references the newly created program data account. Because Loader v2 programs are not upgradable, they do not have an upgrade authority, and None is assigned during migration.
  • Close the buffer account: Once both program and program data accounts have been created and populated, the buffer account is closed and any remaining lamports are burned.

Stakeholder map

Who is affected

Builders & client teams Medium impact

This change introduces a feature-gated, consensus-driven mechanism that allows the community to approve targeted upgrades for specific programs that would otherwise be non-upgradeable.

Action requirement unknown
Validators & operators Medium impact

This change introduces a feature-gated, consensus-driven mechanism that allows the community to approve targeted upgrades for specific programs that would otherwise be non-upgradeable.

Action requirement unknown
Users & stakers Impact unknown

No proposal-specific evidence was found for this group.

Action requirement unknown
Governance & ecosystem Medium impact

This proposal itself does not directly introduce any breaking changes. The code introduced to migrate Loader v2 programs to Loader v3 programs will exist off of the runtime's "hot path" until it's actually used for a migration.

Action may be required

Exact source revision

Full proposal document

Source-language document. Technical identifiers and evidence remain unchanged. 0616093b2952

Summary

This proposal introduces a feature-gated mechanism for runtime-level migration of Loader v2 programs to Loader v3.

Motivation

Loader v2 programs are immutable by design, as the loader does not support program upgrades. However, several essential Loader v2 programs would benefit from a feature-gated, consensus-driven mechanism that allows the community to approve targeted upgrades to specific programs (e.g., SPL Token).

Alternatives Considered

Previously, the runtime could "upgrade" Loader v2 programs by directly modifying their account data. This approach is no longer recommended due to the introduction of the global program cache, since it can cause inconsistencies if account data is modified in-place. The global program cache does not support upgrades of Loader v2 programs because in Loader v2 there is no upgrade path and thus also no last upgrade slot metainfo. Without this metainfo, the global program cache cannot distinguish the old and new version across forks. When migrating to Loader v3 this would not be a problem because the owner is a distinguishing feature and Loader v3 does have the last upgrade slot metainfo for further future changes.

New Terminology

N/A

Detailed Design

The migration from Loader v2 program to Loader v3 is only performed by the runtime and activated via a feature gate. This SIMD describes the procedure to follow to execute the migration. Each individual program upgrade will reference the procedure described in this SIMD when proposing a migration and specify its corresponding feature gate.

Migrating a Loader v2 program to Loader v3 involves creating a buffer account owned by the Loader v3 (BPF Upgradable Loader) that contains the ELF bytes of the program's implementation to be migrated. This buffer is deployed before initiating the migration, and a portion of its lamports is later used to fund the new program and program data accounts. Any remaining lamports in the buffer are burned as part of the migration process.

The migration proceeds in the following steps:

  • Create the program data account: A program data account is derived from the program ID. This account must not already exist, with one exception: if an account with the derived address exists, holds lamports, and is owned by the System Program, it may be reused. In that case, any excess lamports are burned. The ELF bytes from the buffer account are then copied into this program data account.

  • Rewrite the program account: The existing Loader v2 program account is replaced with a Loader v3 program account that references the newly created program data account. Because Loader v2 programs are not upgradable, they do not have an upgrade authority, and None is assigned during migration.

  • Close the buffer account: Once both program and program data accounts have been created and populated, the buffer account is closed and any remaining lamports are burned.

In the slot immediately following the feature activation, the program will not be invocable. This status will last one slot, then the program will be fully operational. The program ID does not change by this migration process.

Each individual program migration should be controlled by its own feature gate, which triggers the migration process when activated.

Impact

This change introduces a feature-gated, consensus-driven mechanism that allows the community to approve targeted upgrades for specific programs that would otherwise be non-upgradeable.

Security Considerations

Migrating Loader v2 programs have serious security implications surrounding the replacement of essential programs with the contents of another account. This is an extremely sensitive process that must be handled with maximum caution.

Backwards Compatibility

This proposal itself does not directly introduce any breaking changes. The code introduced to migrate Loader v2 programs to Loader v3 programs will exist off of the runtime's "hot path" until it's actually used for a migration.

When a migration is conducted, the Loader v3 version of a program is expected to be backwards compatible functionally — its Loader v3 version must provide the exact same results as the Loader v2 program it aims to replace.

Evidence graph

Related proposals and rollout

One or more sources are unavailable.

Upstream review record

Upstream discussion & review

GitHub review is editorial context, not evidence of on-chain support, voting, or outcome.

PR #418 · merged SIMD-0418: Enable Loader v2 to v3 Program Migrations 39 comments and reviews · May 18, 2026
@bw-solana

this would imply each step of the process described above happens at a different epoch boundary. but technically we can enable multiple feature gates at once.. are clients expected to make this work?

GitHub ↗
@febo

this would imply each step of the process described above happens at a different epoch boundary. Not necessarily, they could all happen in the same epoch boundary. but technically we can enable multiple feature gates at once.. are clients expected to make this work? Each program migration is independent of each other, in the sense that each will call up the migration procedure described in the SIMD.

GitHub ↗
@bw-solana

ah, bad parsing on my end. All of the steps Create/Rewrite/Close happen at epoch boundary under one feature gate. But each relocation will use a separate feature gate to drive these steps. I get it now 🫡

GitHub ↗
@bw-solana

do we need to mention any details around which hashes these account data changes should impact?

GitHub ↗
@febo

The account changes will be captured as any other account update and reflected on bank's accounts lattice hash and bank hash.

GitHub ↗
@simd-botbot

✅ All approvals received! @febo, you can now merge this by commenting /merge. ✅ Status: Ready to merge

GitHub ↗
@simd-botbot

✅ Merge successful! febo(https://github.com/febo)'s PR has been merged.

GitHub ↗

simd.watch community discussion · SIMD-0418

Powered by Giscus · Sign in with GitHub to comment

Community comments load when this section approaches the viewport.

Provenance

Evidence & technical details

Rollout or chain data, source revisions, freshness and integrity.
2

SIMD

Deployment Status

Document lifecycleReview
CategoryCore protocol

Feature Gate not yet created

Exact source revision

Sources & integrity

  • Proposal document pinned_commit_blob
    0616093b2952ed6de52c4a27d66aadd11d48d4f9
  • simd-document document · stale · Sep 9, 2026
    0616093b2952ed6de52c4a27d66aadd11d48d4f9

One or more sources are unavailable.