Skip to content

SIMD-0266: Efficient Token program (replace program account contents)#7680

Closed
febo wants to merge 8 commits into
anza-xyz:masterfrom
febo:p-token-swap
Closed

SIMD-0266: Efficient Token program (replace program account contents)#7680
febo wants to merge 8 commits into
anza-xyz:masterfrom
febo:p-token-swap

Conversation

@febo
Copy link
Copy Markdown

@febo febo commented Aug 22, 2025

Problem

SIMD-0266 proposes to replace the current verion of SPL Token with p-token.

Summary of Changes

This PR includes the following changes:

  • Add an upgrade path for a Loader v2 program to update the contents of its account.
  • Add a feature to agave-feature-set and its activation on bank.rs, which uses the upgrade_loader_v2_owned_program to replace the SPL Token program data.

This PR provides a different approach than #7125 since it replace the contents of the program account, instead of migrating the account to a Loader v3 account. The advantage of this approach is that the program is immediately available; when the program is migrated to a Loader v3 account, it stays in a "delay visibility" mode for 1 slot.

The feature activation was also tested using a "p-token migration simulator" tool.

Before the upgrade of SPL Token program:
image

After the feature is activated and the program upgraded:
image

@febo febo requested a review from buffalojoec August 22, 2025 12:59
@febo febo marked this pull request as ready for review August 31, 2025 00:58
@febo febo marked this pull request as draft September 4, 2025 09:15
@febo
Copy link
Copy Markdown
Author

febo commented Sep 9, 2025

Closed in favour of #7125

@febo febo closed this Sep 9, 2025
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.

1 participant