From bbeca163b2fd254a9a3baea2f8d3790afbfaba30 Mon Sep 17 00:00:00 2001 From: norwnd <112318969+norwnd@users.noreply.github.com> Date: Mon, 11 Dec 2023 11:57:19 +0000 Subject: [PATCH] docs: write-buffer clarifications (#34366) * docs: write-buffer clarifications * clarifying adjustments (review-based) --------- Co-authored-by: norwnd --- docs/src/cli/deploy-a-program.md | 16 +++++++++++++--- 1 file changed, 13 insertions(+), 3 deletions(-) diff --git a/docs/src/cli/deploy-a-program.md b/docs/src/cli/deploy-a-program.md index 3b2c89bf45..333d07946f 100644 --- a/docs/src/cli/deploy-a-program.md +++ b/docs/src/cli/deploy-a-program.md @@ -282,14 +282,24 @@ intermediary buffer contents and then vote to allow an upgrade using it. solana program write-buffer ``` -Buffer accounts support authorities like program accounts: +Buffer accounts are managed by an authority. To create a buffer and specify a different +authority than the default: + +```bash +solana program write-buffer --buffer-authority +``` + +Only the buffer authority may write to the buffer, so the `--buffer-authority` above must be a +**signer**, and not an address. This requirement limits usage with offline signers. +To use an offline address as a buffer authority, the buffer account must be initialized and +written with an online keypair, and then the buffer authority must be assigned using +`solana program set-buffer-authority`: ```bash solana program set-buffer-authority --new-buffer-authority ``` -One exception is that buffer accounts cannot be marked immutable like program -accounts can, so they don't support `--final`. +Unlike program accounts buffer accounts cannot be marked immutable, so they don't support the `--final` option. The buffer account, once entirely written, can be passed to `deploy` to deploy the program: