Skip to content
This repository was archived by the owner on Jan 22, 2025. It is now read-only.

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

Merged
CriesofCarrots merged 10 commits intosolana-labs:masterfrom
CriesofCarrots:vote-offline
Dec 6, 2021
Merged

Add offline and fee-payer utilities to CLI vote module#21579
CriesofCarrots merged 10 commits intosolana-labs:masterfrom
CriesofCarrots:vote-offline

Conversation

@CriesofCarrots
Copy link
Copy Markdown
Contributor

@CriesofCarrots CriesofCarrots commented Dec 3, 2021

Problem

Validators would like to withdraw from their vote accounts without using their withdraw authorities on a networked machine, but the solana-cli doesn't support offline signing for solana withdraw-vote-account.

Summary of Changes

  • Add offline and nonce utilities to all vote-module commands, except solana close-vote-account (could be implemented for that command too, but would require the user to know the current account balance, so I decided to kick that can until there's demand)
  • Add fee-payer utilities to all vote-module commands, while I'm there. No reason why users should be forced to use the default signer for this purpose.

Todo:

  • Fix lint
  • integration tests of all the offline stuff
  • unit tests of instruction parsing
  • update offline docs

@CriesofCarrots CriesofCarrots marked this pull request as ready for review December 4, 2021 03:22
@codecov
Copy link
Copy Markdown

codecov Bot commented Dec 4, 2021

Codecov Report

Merging #21579 (0a7ec58) into master (0ef1b25) will increase coverage by 0.0%.
The diff coverage is 79.3%.

@@           Coverage Diff            @@
##           master   #21579    +/-   ##
========================================
  Coverage    81.6%    81.6%            
========================================
  Files         508      509     +1     
  Lines      142340   142932   +592     
========================================
+ Hits       116155   116682   +527     
- Misses      26185    26250    +65     

Copy link
Copy Markdown
Contributor

@t-nelson t-nelson left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

that must've been monotonous. lgtm!

@CriesofCarrots CriesofCarrots merged commit 873fe81 into solana-labs:master Dec 6, 2021
mergify Bot pushed a commit that referenced this pull request Dec 6, 2021
* 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 873fe81)

# Conflicts:
#	cli/src/cli.rs
#	cli/src/vote.rs
#	cli/tests/vote.rs
mergify Bot pushed a commit that referenced this pull request Dec 6, 2021
* 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 873fe81)
mergify Bot added a commit that referenced this pull request Dec 7, 2021
* 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 873fe81)

Co-authored-by: Tyera Eulberg <teulberg@gmail.com>
mergify Bot added a commit that referenced this pull request Dec 7, 2021
…) (#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 873fe81)

# 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>
t-nelson added a commit to t-nelson/solana that referenced this pull request Dec 13, 2021
tao-stones pushed a commit that referenced this pull request Dec 13, 2021
CriesofCarrots pushed a commit to CriesofCarrots/solana that referenced this pull request Dec 16, 2021
CriesofCarrots pushed a commit that referenced this pull request Dec 17, 2021
@brooksprumo brooksprumo mentioned this pull request Jan 5, 2022
Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants