Commit Graph

105 Commits

Author SHA1 Message Date
Greg Fitzgerald
aca739b800 Boot fees from TransactionBuilder 2019-03-15 14:46:44 -06:00
Greg Fitzgerald
48d86683e2 Abuse KeypairUtil 2019-03-15 09:06:54 -06:00
Greg Fitzgerald
6a68df3ebd Don't resign airdrop requests with the keypair asking for an airdrop
The correct thing to do here is retry until you get a
BlockhashNotFound error, and then send another request
to the drone for a new signed transaction.

Also, this test is an integration test masquerading as a unit-test..
2019-03-15 09:06:54 -06:00
Greg Fitzgerald
4d53be8350 Make it unappealing to build and sign transactions at the same time
Use a client to sign transactions. It'll need that keypair anyway
to resign new blockhashes on retries.
2019-03-15 09:06:54 -06:00
Greg Fitzgerald
f8bf9ca218 Make safe transaction signing the default 2019-03-15 09:06:54 -06:00
Greg Fitzgerald
c1eec0290e Rename userdata to data (#3282)
* Rename userdata to data

Instead of saying "userdata", which is ambiguous and imprecise,
say "instruction data" or "account data".

Also, add `ProgramError::InvalidInstructionData`

Fixes #2761
2019-03-14 10:48:27 -06:00
Michael Vines
7d593e6c61 Exit gracefully when no subcommand is specified 2019-03-14 00:35:34 -05:00
Michael Vines
bb420cb995 Use crate_description and crate_name Clap macros 2019-03-14 00:35:34 -05:00
Tyera Eulberg
12fde77ecd Update crate references 2019-03-12 22:05:38 -06:00
Rob Walker
195a880576 pass Pubkeys as refs, copy only where values needed (#3213)
* pass Pubkeys as refs, copy only where values needed

* Pubkey is pervasive

* fixup
2019-03-09 19:28:43 -08:00
Tyera Eulberg
639cb49356 Fix wallet integration tests 2019-03-07 19:18:53 -07:00
Tyera Eulberg
4625aed3a5 Make hypen/underscore consistent 2019-03-07 16:51:25 -08:00
Tyera Eulberg
0badc90058 Wallet new tests 2019-03-06 20:46:18 -08:00
Tyera Eulberg
a4a3995a84 Add staking commands to wallet 2019-03-06 17:50:15 -08:00
Michael Vines
0604bbb473 Rename tokens to lamports in wallet/ 2019-03-05 17:56:44 -08:00
Tyera Eulberg
2fdfa98d55 Fix process_pay SystemTransaction type 2019-03-05 09:33:27 -07:00
Greg Fitzgerald
e6486b2824 Move Budget out of the SDK 2019-03-02 16:44:36 -08:00
Michael Vines
a94880574b block_hash => blockhash 2019-03-02 12:13:30 -07:00
Michael Vines
0f1582c196 cargo fmt 2019-03-02 12:13:30 -07:00
Michael Vines
85159a0eb4 Rename JSON RPC getLastId to getRecentBlockHash 2019-03-02 12:13:30 -07:00
Michael Vines
258cf21416 Purge remaining last_id (now called block_hash) 2019-03-02 12:13:30 -07:00
Michael Vines
ce1b72809a Rename get_last_id() to get_recent_block_hash() 2019-03-02 12:13:30 -07:00
Michael Vines
176d5e0d37 Rename Transaction last_id field to recent_block_hash 2019-03-02 12:13:30 -07:00
Michael Vines
fdc31e99df Clean up type casts 2019-03-01 13:38:17 -08:00
Michael Vines
05646d72b8 Remove unnecessary fetching of a new last_id 2019-02-27 22:58:59 -08:00
Michael Vines
cd976a8082 s/tx/transaction/ for function names 2019-02-27 17:00:10 -08:00
Michael Vines
163ed40efb Send program write transactions concurrently 2019-02-27 17:00:10 -08:00
Michael Vines
b5d714eec7 Derive retry timeout from slot duration 2019-02-27 11:13:29 -08:00
Greg Fitzgerald
e9b0e3cb9d Move RpcSignatureStatus into its own module
And fixup some imports from previous commits.
2019-02-17 12:20:05 -07:00
Greg Fitzgerald
4e4a1643c4 Boot SystemInstruction::Spawn 2019-02-14 13:26:46 -07:00
Stephen Akridge
1e58c585d3 Add retry_get_balance function
clients don't need to know about json
2019-02-10 09:08:16 -08:00
Stephen Akridge
ed4e9febe0 Refactor wallet processing
Yuge functions
2019-02-10 09:08:16 -08:00
Greg Fitzgerald
dad0bfe447 Replace transaction traits with structs
Also:
* SystemTransaction::new -> new_account
* SystemTransaction::new_create -> new_program_account
2019-02-01 11:38:25 -08:00
Michael Vines
bfaf5634a1 .unwrap() in tests instead of assert!()ing .is_ok() for a better failure message 2019-01-28 16:10:32 -08:00
Michael Vines
9a7082d0d5 Report stuck last_id in error message 2019-01-23 00:02:30 -08:00
Tyera Eulberg
2698b7614b Add wallet deploy unit tests, incl program test fixture 2019-01-17 12:38:04 -08:00
Michael Vines
a84b6bc7e4 Overhaul wallet rpc/drone command-line arguments 2019-01-17 08:36:05 -08:00
Tyera Eulberg
0d7b1a84cb Remove unused timeout wallet arg and config field 2019-01-16 09:20:45 -08:00
Michael Vines
3282cb85ae Refactor request_and_confirm_airdrop() to use send_and_confirm_tx() 2019-01-15 19:29:59 -08:00
Michael Vines
9354e797b6 Cleanly handle balance underflows 2019-01-15 19:29:59 -08:00
Michael Vines
3f9c2bc33b Resend transactions a couple times before giving up 2019-01-15 16:07:32 -08:00
Michael Vines
b1e57e2a30 Retry rpc requests on connection failures
Applied a blanket default retry count of 5, which seems like enough but
not excessive retries.
2019-01-15 15:30:10 -08:00
Michael Vines
4d9489aeb1 Use RPC endpoint of the provided network entrypoint rather than searching for the leader 2019-01-15 15:13:57 -08:00
Tyera Eulberg
8af61f561b Improve Wallet coverage (#2385)
* Add trait for RpcRequestHandler trait for RpcClient and add MockRpcClient for unit tests

* Add request_airdrop integration test

* Add timestamp_tx, witness_tx, and cancel_tx to wallet integration tests; add wallet integration tests to test-stable

* Add test cases

* Ignore plentiful sleeps in unit tests
2019-01-14 00:10:03 -07:00
Pankaj Garg
d7594b19fc Implemented a trait for vote signer service (#2386)
* Implemented a trait for vote signer service

* removes need for RPC in unit tests for vote signing

* fix build errors

* address some review comments
2019-01-11 12:58:31 -08:00
Stephen Akridge
44b7684d56 Fix some instances of ledger to db_ledger 2019-01-09 16:33:37 -08:00
Pankaj Garg
91bd38504e Use vote signer service in fullnode (#2009)
* Use vote signer service in fullnode

* Use native types for signature and pubkey, and address other review comments

* Start local vote signer if a remote service address is not provided

* Rebased to master

* Fixes after rebase
2019-01-05 12:57:52 -08:00
Michael Vines
1f6346d880 De-dup ledgers - db_ledger is now the only ledger written to disk 2019-01-04 16:37:00 -08:00
Michael Vines
0a7e199c82 Don't follow the leader: assume drone runs on the network entrypoint 2019-01-04 15:58:42 -08:00
Michael Vines
fd562cb9e2 Rust 2018 cleanup 2018-12-14 21:57:15 -08:00