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 write-buffer does not respect --buffer-authority #29451

Closed
ruuda opened this issue Jan 2, 2023 · 1 comment · Fixed by #29476
Closed

solana program write-buffer does not respect --buffer-authority #29451

ruuda opened this issue Jan 2, 2023 · 1 comment · Fixed by #29476
Labels
community Community contribution

Comments

@ruuda
Copy link
Contributor

ruuda commented Jan 2, 2023

See #17890, which was automatically closed despite not being resolved.

@ruuda ruuda added the community Community contribution label Jan 2, 2023
@CriesofCarrots
Copy link
Contributor

CriesofCarrots commented Jan 2, 2023

Looks like the issue is that solana program write-buffer expects --buffer-authority to be a signer, not a pubkey:

$ solana program write-buffer -h
...
--buffer-authority <BUFFER_AUTHORITY_SIGNER>    Buffer authority [default: the default configured keypair]

The command doesn't error on a pubkey string input for the parameter because that can potentially be a signer, if accompanied by an offline signing pair.

But I'm not sure that --buffer-authority needs to be a signer in the first place. As you noted in the original issue, solana program set-buffer-authority just accepts a pubkey for the --new-buffer-authority. I'll take a look.

(edit) Oh, I see. --buffer-authority always needs to be a signer to perform the Write transactions. So I think the best way to fix is to return an error if a Pubkey is supplied, since the command doesn't support offline signing.

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
2 participants