Commit Graph

50 Commits

Author SHA1 Message Date
Michael Vines 0a9ff1dc9d Initial solana-test-validator command-line program 2020-12-11 04:17:38 +00:00
Michael Vines 43b82b31e5 More TestValidator cleanup 2020-11-26 08:56:25 +00:00
Michael Vines b5f7e39be8 TestValidator public interface cleanup 2020-11-25 17:04:37 -08:00
Tyera Eulberg ef99689592
Improve TestValidator instantiation (#13627)
* Add TestValidator::new_with_fees constructor, and warning for low bootstrap_validator_lamports

* Add logging to solana-tokens integration test to help catch low bootstrap_validator_lamports in the future

* Reasonable TestValidator mint_lamports
2020-11-16 23:27:36 -07:00
Trent Nelson 7cab638297 Factor the rest of CLI offline module out to clap-utils and cli-output crates 2020-09-23 15:58:44 -06:00
Trent Nelson 325a7e9f86 Move CLI cli_output module to its own crate 2020-09-23 15:58:44 -06:00
Trent Nelson ba353c2b1d Move CLI blockhash_query module into client crate 2020-09-23 15:58:44 -06:00
Trent Nelson a6533c3a21 Move CLI nonce account helpers in client 2020-09-23 15:58:44 -06:00
Michael Vines 208dd1de3a Move TestValidator into its own module 2020-09-19 08:35:26 -07:00
Trent Nelson 14ac233d01 CLI: Fix explicitly plumb vote_account through create-vote-account 2020-07-14 07:29:53 -06:00
Tyera Eulberg 7a741bb79a
Move commitment to CliConfig to enable faster integration tests (#10627)
* Add commitment config to CliConfig

* Use config.commitment in cluster_query

* Use config.commitment in vote

* Add method with spinner + commitment

* Add send-transaction config to CliConfig

* Remove superfluous nonce check

* Add with_commitment helper fns

* Update src to use commitment

* Fix pay and transfer integration tests

* Fix nonce int tests

* Fix deploy int test

* Fix vote int test

* Fix stake int tests

* Nightly clippy

* Review comments
2020-06-17 12:18:48 -06:00
Kristofer Peterson 58ef02f02b
9951 clippy errors in the test suite (#10030)
automerge
2020-05-15 09:35:43 -07:00
Tyera Eulberg ed53a70b5c
Cli: transfer ALL; check spend+fee in client (#10012)
* lamports->SOL in user-facing error msg

* Check for sufficient balance for spend and fee

* Add ALL option to solana transfer

* Rework TransferAmount to check for sign_only in parse

* Refactor TransferAmount & fee-check handling to be more general

* Add addl checks mechanism

* Move checks out of cli.rs

* Rename to SpendAmount to be more general & move

* Impl ALL/spend helpers for create-nonce-account

* Impl spend helpers for create-vote-account

* Impl ALL/spend helpers for create-stake-account

* Impl spend helpers for ping

* Impl ALL/spend helpers for pay

* Impl spend helpers for validator-info

* Remove unused fns

* Remove retry_get_balance

* Add a couple unit tests

* Rework send_util fn signatures
2020-05-14 12:24:14 -06:00
VadimGrznk f6e26f6c8c
Add using OutputFormat enum to --sign-only transactions (#9650)
* Add using OutputFormat enum to --sign-only commands

* Renaming

* Code formating

* Appease clippy

* Add returning json string to pay command for tests

* Code refactoring

* Appease clippy

* Rebase and dedupe signature prints

Co-authored-by: Tyera Eulberg <teulberg@gmail.com>
Co-authored-by: Tyera Eulberg <tyera@solana.com>
2020-05-06 22:21:48 -06:00
Greg Fitzgerald 71f7a7243b
Add custodian option to withdraw-stake command (#9662)
automerge
2020-04-22 15:00:18 -07:00
sakridge 900933bbcc
Reduce rpc test code (#9413)
automerge
2020-04-09 18:05:56 -07:00
Tyera Eulberg 96c23110ae
Make TestValidator mint_lamports configurable (#9337)
automerge
2020-04-06 16:20:55 -07:00
Trent Nelson 2592894958
CLI: Support setting both stake authorities at once (#8976)
automerge
2020-03-21 18:56:17 -07:00
Jack May e28368ff1b
Move address creation with seed into pubkey (#8991) 2020-03-20 15:20:48 -07:00
Michael Vines f78a90bce2
Vote InitializeAccount and UpdateNode instructions now need a signature from the validator identity (#8947)
automerge
2020-03-19 01:58:52 -07:00
Trent Nelson 98228c392e
CLI: Add multi-session signing support (#8927)
* SDK: Add `NullSigner` implementation

* SDK: Split `Transaction::verify()` to gain access to results

* CLI: Minor refactor of --sign_only result parsing

* CLI: Enable paritial signing

Signers specified by pubkey, but without a matching --signer arg
supplied fall back to a `NullSigner` when --sign-only is in effect.
This allows their pubkey to be used for TX construction as usual,
but leaves their `sign_message()` a NOP. As such, with --sign-only
in effect, signing and verification must be done separately, with
the latter's per-signature results considered

* CLI: Surface/report missing/bad signers to user

* CLI: Suppress --sign-only JSON output

* nits

* Docs for multi-session offline signing
2020-03-18 20:49:38 -07:00
Trent Nelson 0422af2aae
CLI: Plumb nonce-stored fees (#8750)
automerge
2020-03-11 11:14:15 -07:00
Trent Nelson 261732f140
CLI Nonce account access dereplicode (#8743)
* Spruce up CliNonceError

* Add nonce account access helpers

* Use helpers throughout
2020-03-10 13:00:15 -06:00
Trent Nelson 1cc7131bb7
Consolidate Nonce state under one struct (#8624)
automerge
2020-03-04 08:51:48 -08:00
Trent Nelson 1cb6101c6a
SDK: Add versioning to nonce state (#8607) 2020-03-03 19:39:09 -07:00
Trent Nelson be0cc0273f
SDK: Re-org nonce state module to facilitate versioning (#8603)
automerge
2020-03-03 17:00:39 -08:00
Tyera Eulberg 8dc4724340
Allow stake lockup fields to be updated independently (#8568)
* Make Lockup fields optional for SetLockup instruction

* Use LockupArgs in cli

* Include lockup timestamp in stake-account print
2020-03-02 12:28:43 -08:00
Justin Starry 8839dbfe5b
Use runtime executor to send pubsub notifications (#8353)
automerge
2020-02-25 20:23:54 -08:00
Tyera Eulberg 12a9b5f35e
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
2020-02-24 17:03:30 -07:00
Trent Nelson 9dcb965959
Reinstate `create-stale-account` w/ seed test (#8401)
automerge
2020-02-22 08:54:29 -08:00
Tyera Eulberg 4ddbf8d509
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>
2020-02-21 14:55:53 -07:00
Tyera Eulberg ab361a8073
Rename KeypairUtil to Signer (#8360)
automerge
2020-02-20 13:28:55 -08:00
Trent Nelson cb7117beac
CLI: Offline-ify remaining stake ops (#8257)
automerge
2020-02-12 22:00:28 -08:00
Tyera Eulberg 6309c97697
Add CliCommand::StakeSetLockup (#8248)
automerge
2020-02-12 15:36:29 -08:00
Trent Nelson 1528959327
CLI: Add fee-payer parame to stake-split subcommand (#8201)
automerge
2020-02-10 23:23:54 -08:00
Trent Nelson fc15f74c3c
CLI: Harden offline signing and tests (#8052)
* CLI: Don't sanity-check stake account when offline

* Add test helper returning vote pubkey with validator

* Delegate to the BSL. No need to force

* Be sure our offline ops are truly offline

* Specify our authorities correctly

* checks
2020-02-10 18:59:05 -07:00
Trent Nelson 5b070ad014
CLI: Support offline fee payers (#8009)
* CLI: Support offline fee-payer

* Add some knobs to test genesis/validator helpers

* Add tests
2020-02-07 09:14:26 -07:00
Trent Nelson 79249360f7
CLI: Expose sign-only reply parsing helper (#8107)
automerge
2020-02-03 18:22:36 -08:00
Trent Nelson 966d077431
CLI: Disallow blockhash/fee-calc lookups when offline (#7981)
* CLI: Add BlockhashSpec to tighten control over --blockhash

* Use BlockhashSpec

* Add a matches-free constructor

* More descriptive naming
2020-01-30 09:21:32 -07:00
Trent Nelson 4a074133f7
CLI: Fix tests. sign_only requires a blockhash (#8005)
This is enforced by argument parsing and will be better enforced wholly
with #7981
2020-01-28 18:02:20 -07:00
Jack May c95e5346a4
Boot the mut (#7926) 2020-01-22 17:54:06 -08:00
Trent Nelson d854e90c23
CLI: Support offline authorities (#7905) 2020-01-22 10:10:22 -07:00
Trent Nelson 0de35fdd1f
CLI: Support offline and nonced stake subcommands (#7831)
* Support durable nonce for staker-authorize-*

* CLI: Factor out sign-only reply parsing to helper

* Support offline signing for staker-authorize-*
2020-01-17 10:30:56 -07:00
Trent Nelson 8ffccfbaff CLI: Plumb stake authorities throughout (#7822)
automerge
2020-01-15 13:32:06 -08:00
Rob Walker 6775e83420
Add create with seed to cli (#7713)
* Add create with seed to cli

* nonce and vote, too
2020-01-09 15:22:48 -08:00
Trent Nelson db52cc6749 CLI: Fix default nonce authority resolution (#7657)
automerge
2020-01-02 17:05:08 -08:00
Justin Starry 44e45aa090
Support nonced transactions in the CLI (#7624)
* Support nonced transactions in the CLI

* Update nonce.rs
2019-12-27 14:35:49 -06:00
Rob Walker 3f405d8908
Add unix_timestap to stake lockups (#7569) 2019-12-19 14:37:47 -08:00
Tyera Eulberg 3513f4ee84
Rename drone to faucet (#7508) 2019-12-16 14:05:17 -07:00
Jack May 19ecce1e32
Fix offline stakes payer (#7385) 2019-12-09 23:11:04 -08:00