2

From the Solana docs on Program Accounts, when a new program is deployed, a Program Account and an associated Program Executable Data Account is created and the Program Account stores the address of an executable data account. This can be seen on a Solana explorer for most programs, such as the Token-2022 program. However, there are some programs like the Token Program that does not have an associated Program Executable Data Account. Why is that and how is that possible?

1 Answer 1

2

The SPL Token program (TokenkegQfeZyiNwAJbNbGKPFXCWuBvf9Ss623VQ5DA) is owned by the old BPF loader program (BPFLoader2111111111111111111111111111111111), which does not allow for upgrading. In that model, the program account contains the executable data.

Token-2022 is owned by the upgradeable loader (BPFLoaderUpgradeab1e11111111111111111111111), which uses a separate account for the executable data.

In the future, the next version of the loader LoaderV411111111111111111111111111111111111, will go back to the old model, in which there's only one account to hold the executable data and associated metadata.

2
  • Thanks for your answer! With the upgradeable loader, you can currently easily get the separate executable data account for a program and find its transactions (which there are relatively few of) to get the program deployment times. For example, this is the executable data account for the Token-2022 program: explorer.solana.com/address/…. Is it possible to easily find when programs were deployed with the old BPF loader program and with the next version of the loader? Commented Dec 3 at 15:33
  • 1
    With the old BPF loader, you'd have to go all the way back to the first transactions that involve the account. And you make a good point for loader-v4, it'll be good to have an easy way to find deployment transactions. Either way, the upgrade slot is always registered, so you can find the time of the most recent upgrade
    – Jon C
    Commented Dec 3 at 22:14

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service and acknowledge you have read our privacy policy.

Not the answer you're looking for? Browse other questions tagged or ask your own question.