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

Solana Program Close Does Not Respect "--authority" #33171

Closed
sol-mocha opened this issue Sep 6, 2023 · 2 comments
Closed

Solana Program Close Does Not Respect "--authority" #33171

sol-mocha opened this issue Sep 6, 2023 · 2 comments
Labels
community Community contribution

Comments

@sol-mocha
Copy link

Problem

With Version solana-cli 1.16.10 (src:382b3f16; feat:3712769919, client:SolanaLabs

According to the solana program close --help, the --authority is a valid option.

--authority <AUTHORITY_SIGNER>     Upgrade or buffer authority [default: the default configured keypair]

The following command does not work as expected, and times out.
Command:

 solana program close --bypass-warning --authority ./upgrade-authority.json <Address>

Output:

Error: Close failed: unable to confirm transaction. This can happen in situations such as transaction expiration and insufficient fee-payer funds

Once that failed I set the upgrade-authority.json as my default keypair, after which the following command did work.

solana program close --bypass-warning <Address>

Proposed Solution

  • Display the publickey that is signing the transaction in the console output as confirmation to know that the correct key is being used
  • Respect the authority command that is shown in the --help docs of the solana program close command.
@sol-mocha sol-mocha added the community Community contribution label Sep 6, 2023
@joncinque
Copy link
Contributor

Sorry, I wasn't able to reproduce this. Against a local validator, I ran:

$ solana program deploy program.so
 # note the program id, which was HAUbf6xjvCZT8VZ6iwxJZNMKxiDB17UyxhKPoBvLPLjf,
$ solana-keygen new -o test.json
$ solana program set-upgrade-authority HAUbf6xjvCZT8VZ6iwxJZNMKxiDB17UyxhKPoBvLPLjf --new-upgrade-authority test.json
$ solana program close HAUbf6xjvCZT8VZ6iwxJZNMKxiDB17UyxhKPoBvLPLjf --bypass-warning --authority test.json
Closed Program Id HAUbf6xjvCZT8VZ6iwxJZNMKxiDB17UyxhKPoBvLPLjf, 7.21722072 SOL reclaimed

I tested this with 1.16.13 and master, and both worked. Perhaps this was broken in a previous release. Either way, I put in #33426 to surface the error immediately by performing preflight checks.

@CriesofCarrots
Copy link
Contributor

Since Jon wasn't able to reproduce this error, I'm closing the issue. Feel free to reopen if the bug recurs.

@CriesofCarrots CriesofCarrots closed this as not planned Won't fix, can't repro, duplicate, stale Dec 20, 2023
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
community Community contribution
Projects
None yet
Development

No branches or pull requests

3 participants