-
Notifications
You must be signed in to change notification settings - Fork 5.4k
CLI: dynamic signing reboot #8384
CLI: dynamic signing reboot #8384
Conversation
what to do about write_keypair outstanding
75d4948 to
6161f1e
Compare
garious
left a comment
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
I approve for this to go into the master branch and 1.0.0, but due to the size of this PR and the timing, need @mvines to approve whether it can go into v0.23.
t-nelson
left a comment
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
LGTM!
|
Can you wait to backport until after SLP2 boots on Monday please. We'll then have some soak time before 0.23 is used to boot mainnet-beta. |
Certainly. There's a companion PR that I hope to get into master later today; will plan to cherry-pick them both together after SLP2 boot on Monday. |
Codecov Report
@@ Coverage Diff @@
## master #8384 +/- ##
========================================
- Coverage 80.3% 80.3% -0.1%
========================================
Files 254 254
Lines 55683 55544 -139
========================================
- Hits 44765 44628 -137
+ Misses 10918 10916 -2 |
* Add keypair_util_from_path helper * Cli: impl config.keypair as a trait object * SDK: Add Debug and PartialEq for dyn Signer * ClapUtils: Arg parsing from pubkey+signers to Presigner * Impl Signers for &dyn Signer collections * CLI: Add helper for getting signers from args * CLI: Replace SigningAuthority with Signer trait-objs * CLI: Drop disused signers command field * CLI: Drop redundant tests * Add clap validator that handles all current signer types * clap_utils: Factor Presigner resolution to helper * SDK: `From` for boxing Signer implementors to trait objects * SDK: Derive `Clone` for `Presigner` * Remove panic * Cli: dedup signers in transfer for remote-wallet ergonomics * Update docs vis-a-vis ASK changes * Cli: update transaction types to use new dynamic-signer methods * CLI: Fix tests No. 1 what to do about write_keypair outstanding * Work around `CliConfig`'s signer not necessarily being a `Keypair` * CLI: Fix tests No. 2 * Remove unused arg * Remove unused methods * Move offline arg constants upstream * Make cli signing fallible Co-authored-by: Trent Nelson <trent.a.b.nelson@gmail.com>
…#8487) * CLI: dynamic signing reboot (#8384) * Add keypair_util_from_path helper * Cli: impl config.keypair as a trait object * SDK: Add Debug and PartialEq for dyn Signer * ClapUtils: Arg parsing from pubkey+signers to Presigner * Impl Signers for &dyn Signer collections * CLI: Add helper for getting signers from args * CLI: Replace SigningAuthority with Signer trait-objs * CLI: Drop disused signers command field * CLI: Drop redundant tests * Add clap validator that handles all current signer types * clap_utils: Factor Presigner resolution to helper * SDK: `From` for boxing Signer implementors to trait objects * SDK: Derive `Clone` for `Presigner` * Remove panic * Cli: dedup signers in transfer for remote-wallet ergonomics * Update docs vis-a-vis ASK changes * Cli: update transaction types to use new dynamic-signer methods * CLI: Fix tests No. 1 what to do about write_keypair outstanding * Work around `CliConfig`'s signer not necessarily being a `Keypair` * CLI: Fix tests No. 2 * Remove unused arg * Remove unused methods * Move offline arg constants upstream * Make cli signing fallible Co-authored-by: Trent Nelson <trent.a.b.nelson@gmail.com> * Reinstate `create-stale-account` w/ seed test (#8401) automerge * CLI: collect and deduplicate signers (#8398) * Rename (keypair util is not a thing) * Add method to generate_unique_signers * Cli: refactor signer handling and remote-wallet init * Fixup unit tests * Fixup intergation tests * Update keypair path print statement * Remove &None * Use deterministic key in test * Retain storage-account as index * Make signer index-handling less brittle * Cache pubkey on RemoteKeypair::new * Make signer_of consistent + return pubkey * Remove &matches double references * Nonce authorities need special handling * Make solana root key accessible on Ledger (#8421) * Use 44/501 key as ledger id * Add error codes * Ledger key path rework (#8453) automerge * Ledger hardware wallet docs (#8472) * Update protocol documentation * Correct app-version command const * Rough initial Ledger docs * Add more docs * Cleanup * Add remote-wallet to docs TOC Co-authored-by: Greg Fitzgerald <greg@solana.com> * Add flag to confirm key on device Co-authored-by: Trent Nelson <trent.a.b.nelson@gmail.com> Co-authored-by: Greg Fitzgerald <greg@solana.com>
Problem
Our signer interfaces are too restrictive to accommodate a rich signing experience. It is impossible to mix signer types (which is a common use-case in offline/paper-wallet workflow), and remote wallets (like Ledger) are not supported at all.
Summary of Changes
Co-conspirator: @t-nelson
A follow-up PR will streamline signer handling in the CLI, collecting and deduplicating signers before any processing occurs (and thus eliminating all of the
Option<Box<dyn Signer>>s in this PR).