Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

lang: IDL authority should use the program upgrade authority #444

Open
armaniferrante opened this issue Jun 30, 2021 · 4 comments · May be fixed by #3423
Open

lang: IDL authority should use the program upgrade authority #444

armaniferrante opened this issue Jun 30, 2021 · 4 comments · May be fixed by #3423
Assignees
Labels

Comments

@armaniferrante
Copy link
Member

Instead of there being a separate idl authority, the existing upgrade authority account should be used.

@paul-schaaf
Copy link
Contributor

Some more context from @armaniferrante

IDL authority should default to the program upgrade authority. Currently, the IDL accounts live at deterministic addresses associated with the program ID. However, anyone can upload the first IDL, which sets the authority--which must be used for subsequent updates. Instead, this should just be the program upgrade authority.

I'll get to work on this one

@paul-schaaf
Copy link
Contributor

@armaniferrante u said it should "default" to the program upgrade authority, implying that there can be other authorities but I wonder whether this is necessary. If there is a program upgrade authority, I think it would be fine to be opinionated and not allow a different authority which would also simplify key management for the user. If there is no program upgrade authority, I dont see a reason why anyone should be able to update the IDL.

If there is a reason to have two distinct authorities, I would still suggest forcing that the program upgrade authority is the signer on the idl init instruction which sets the idl authority

@armaniferrante
Copy link
Member Author

Having a single authority for both the IDL and program upgrade sounds great.

@Henry-E Henry-E added the good first issue Good for newcomers label Jan 5, 2023
@Henry-E
Copy link

Henry-E commented Jan 5, 2023

Anchor never really added much support (i think) for loading up program metadata accounts. If it did have native support for those account types then it should be as simple as adding the deprecated pub program_meta: ProgramAccount<'info, ProgramMetadata> and accessing the program_meta.upgrade_authority.

We'd have to add support for deserializing into the upgradeable loader state and accessing just the authority_address.

Not hugely complicated if anyone reading this wanted to look into it.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
Projects
None yet
3 participants