Add offline and fee-payer utilities to CLI vote module (backport #21579) (#21648)

* Add offline and fee-payer utilities to CLI vote module (#21579)

* create-vote-account: add offline, nonce, fee_payer capabilities

* vote-authorize: add offline, nonce, fee-payer

* vote-update-things: add offline, nonce, fee-payer

* withdraw-vote: add offline, nonce, fee-payer

* close-vote-acct: add fee-payer

* Allow WithdrawVoteAccount to empty account, since offline operations cannot perform account state queries as in CloseVoteAccount

* Fix lint

* Update offline-signing docs

* Add some parse unit tests

* Add offline integration test

(cherry picked from commit 873fe81bc0)

# Conflicts:
#	cli/src/cli.rs
#	cli/src/vote.rs
#	cli/tests/vote.rs

* Fix conflicts

Co-authored-by: Tyera Eulberg <teulberg@gmail.com>
Co-authored-by: Tyera Eulberg <tyera@solana.com>
This commit is contained in:
mergify[bot]
2021-12-07 02:07:26 +00:00
committed by GitHub
parent 9959ede9ce
commit 1ab8c01ab7
5 changed files with 1270 additions and 151 deletions

View File

@@ -19,14 +19,26 @@ transaction.
At present, the following commands support offline signing:
- [`create-stake-account`](cli/usage.md#solana-create-stake-account)
- [`create-stake-account-checked`](cli/usage.md#solana-create-stake-account-checked)
- [`deactivate-stake`](cli/usage.md#solana-deactivate-stake)
- [`delegate-stake`](cli/usage.md#solana-delegate-stake)
- [`split-stake`](cli/usage.md#solana-split-stake)
- [`stake-authorize`](cli/usage.md#solana-stake-authorize)
- [`stake-authorize-checked`](cli/usage.md#solana-stake-authorize-checked)
- [`stake-set-lockup`](cli/usage.md#solana-stake-set-lockup)
- [`stake-set-lockup-checked`](cli/usage.md#solana-stake-set-lockup-checked)
- [`transfer`](cli/usage.md#solana-transfer)
- [`withdraw-stake`](cli/usage.md#solana-withdraw-stake)
- [`create-vote-account`](cli/usage.md#solana-create-vote-account)
- [`vote-authorize-voter`](cli/usage.md#solana-vote-authorize-voter)
- [`vote-authorize-voter-checked`](cli/usage.md#solana-vote-authorize-voter-checked)
- [`vote-authorize-withdrawer`](cli/usage.md#solana-vote-authorize-withdrawer)
- [`vote-authorize-withdrawer-checked`](cli/usage.md#solana-vote-authorize-withdrawer-checked)
- [`vote-update-commission`](cli/usage.md#solana-vote-update-commission)
- [`vote-update-validator`](cli/usage.md#solana-vote-update-validator)
- [`withdraw-from-vote-account`](cli/usage.md#solana-withdraw-from-vote-account)
## Signing Transactions Offline
To sign a transaction offline, pass the following arguments on the command line