When we are doing program deployment on Solana using Anchor cli, it will read the key pair generated at target/deploy/<program>-keypair.json
and use it to sign the instruction for initial deployment.
If I understand correctly, according to create_account
instruction:https://docs.rs/solana-program/latest/solana_program/system_instruction/fn.create_account.html
This program keypair is used to sign the program account to prove that you really are the owner of this program ID.
However, after initial deployment, it seems that all the operations afterwards like SetAuthority
Upgrade
Close
don't need the program keypair anymore, but only the keypair of UpgradeAuthority
.
So can I see the program keypair as a one-time usage keypair and can be tosses away after initial deployment? Or does it has any other purpose besides from initial program deployment?
Thanks!
There's currently no use for the program deploy keypair beyond initial deployment. However, it's still useful to keep it stored somewhere as you'll need it to deploy to any other clusters (e.g. Testnet) or SVM-based networks (e.g. Eclipse).