Governance: Remove legacy CreateGovernance instructions #6335
Add this suggestion to a batch that can be applied as a single commit.
This suggestion is invalid because no changes were made to the code.
Suggestions cannot be applied while the pull request is closed.
Suggestions cannot be applied while viewing a subset of changes.
Only one suggestion per line can be applied in a batch.
Add this suggestion to a batch that can be applied as a single commit.
Applying suggestions on deleted lines is not supported.
You must change the existing code in this line in order to create a valid suggestion.
Outdated suggestions cannot be applied.
This suggestion has been applied or marked resolved.
Suggestions cannot be applied from pending reviews.
Suggestions cannot be applied on multi-line comments.
Suggestions cannot be applied while the pull request is queued to merge.
Suggestion cannot be applied right now. Please check back later.
Summary
Remove legacy instructions to create asset specific governances:
CreateProgramGovernance
,CreateTokenGovernance
andCreateMintGovernance
. The instructions are leftovers from thespl-governance
inception time when the governance accounts were top level accounts andRealm
account didn't exist. The asset specific accounts are no longer required because the genericGovernance
account can handle all the use cases.Backward compatibility
The change is backward compatible from the state point of view and all the asset specific
Governance
accounts created in previous versions are still supported.Any program or client using the assets specific instructions to create
Governance
accounts must switch toCreateGovernance
instruction and explicitly transfer the relevant authorities to the newGovernance
.Further work
There is no concept of
governed_account
any longer and in a follow up PR the field onGovernance
account will be renamed togovernance_seed
to indicate its actual meaning.