What EIP-1967 defines
A proxy contract holds the state and forwards every call to an implementation contract with delegatecall. EIP-1967 fixes the storage slots where the proxy keeps the implementation address and the admin address, so tools can find them and the slots do not collide with the implementation's variables.
delegatecall runs the implementation's code against the proxy's storage.How upgrades work on Solana
A Solana program's address points to a program data account that stores the code and the upgrade authority. An upgrade writes new code into that account. Callers keep using the same program ID, and state is unaffected because it lives in separate accounts.
delegatecall adds gas to every call.Upgrade, transfer, or lock a program
The upgrade authority signs each of these commands. Removing the authority with --final cannot be undone.
# Deploy a new build to the same program ID
solana program deploy ./target/deploy/my_program.so --program-id <PROGRAM_ID>
# Hand the upgrade authority to another keypair
solana program set-upgrade-authority <PROGRAM_ID> --new-upgrade-authority <NEW_AUTHORITY_KEYPAIR>
# Make the program immutable
solana program set-upgrade-authority <PROGRAM_ID> --final--skip-new-upgrade-authority-signer-check. After that, upgrade by writing the new build to a buffer account and approving the upgrade through the multisig. Publish a verified build so users can confirm that the deployed code matches your source.Migrate account data
An upgrade changes the code, and existing accounts keep their old layout. Plan the data change the way you would plan a storage layout change behind a proxy.
Side by side
| Question | EIP-1967 proxy | Solana |
|---|---|---|
| What stays constant? | The proxy address | The program ID |
| Who can upgrade? | The proxy admin | The upgrade authority |
| How do you make it immutable? | Renounce the admin or deploy without a proxy | Set the upgrade authority to none |
| Where does state live? | In the proxy's storage | In data accounts the program owns |
| How do users verify the code? | Verified source for the implementation | A verified build of the program |