Commit Graph

510 Commits

Author SHA1 Message Date
Tyera Eulberg e9bc1c6b07
Add last valid block height to rpc Fees (#17506)
* Add last_valid_block_height to fees rpc

* Add getBlockHeight rpc

* Update docs
2021-05-26 07:26:19 +00:00
Justin Starry e14f3eb529 rename flag 2021-05-25 17:32:00 -07:00
Justin Starry 96cef5260c Add a flag to simulateTransaction to use most recent blockhash 2021-05-25 17:32:00 -07:00
Nikita d41266e4e9
rpc: add context toggle to getProgramAccounts (#17399)
* fix(rpc): return context in get_program_accounts

* doc(rpc): document withContext flag

* fix(rpc): fix comment

Co-authored-by: Michael Vines <mvines@gmail.com>

* fix(rpc): fix doc

Co-authored-by: Michael Vines <mvines@gmail.com>

Co-authored-by: Michael Vines <mvines@gmail.com>
2021-05-22 07:12:21 +00:00
Tao Zhu 0781fe1b4f
Upgrade Rust to 1.52.0 (#17096)
* Upgrade Rust to 1.52.0
update nightly_version to newly pushed docker image
fix clippy lint errors
1.52 comes with grcov 0.8.0, include this version to script

* upgrade to Rust 1.52.1

* disabling Serum from downstream projects until it is upgraded to Rust 1.52.1
2021-05-19 09:31:47 -05:00
Michael Vines 63b97729e6 get_program_accounts_with_config() now correctly defaults to RpcClient's commitment level 2021-05-18 19:57:40 +00:00
Trent Nelson 67e6a3106f rpc: plumb shred_version through RpcContactInfo 2021-05-14 08:36:08 +00:00
Tyera Eulberg 27004f1b76
Return error for excluded secondary-index keys (#17193)
* Add runtime helpers to check secondary indexes for key

* Add custom rpc error

* Check secondary-index key inclusion in rpc

* Clone complete AccountSecondaryIndexes into rpc to avoid bank query
2021-05-13 21:04:21 +00:00
Michael Vines 7d1637d89a RpcClient now respects the retry-after server response header when getting rate limited 2021-05-05 18:11:57 -07:00
Michael Vines 542d88929f Add getBlockProduction RPC method 2021-04-28 20:02:54 -07:00
Michael Vines f93565da6f Compress account data by default 2021-04-27 04:56:56 +00:00
Michael Vines 59fc33635a Add getVoteAccounts RPC method parameter to restrict results to a single vote account 2021-04-27 04:27:15 +00:00
Michael Vines c2becbc0a8 `solana leader-schedule -um` works again 2021-04-26 16:29:35 -07:00
Justin Starry 75b8434b76
Add TPU client for sending txs to the current leader tpu port (#16736)
* Add TPU client for sending txs to the current leader tpu port

* Update tpu_client.rs
2021-04-23 09:35:12 +08:00
Tyera Eulberg 636b5987af
Update getLeaderSchedule options (#16749) 2021-04-22 19:27:30 +00:00
Michael Vines 6004c0abf5 getLeaderSchedule now supports filtered results based on validator identity 2021-04-21 17:59:26 -07:00
Michael Vines a911ae00ba clippy 2021-04-18 20:55:02 -07:00
Tyera Eulberg 974e6dd2c1
Deprecate "confirmed" RpcClient methods (#16520)
* Remove obsolete client methods

* Deprecate GetConfirmed client methods

* Rename Confirmed config structs, with appropriate deprecation

* Fixup client apps

* Map RpcRequest to deprecated when targeting older nodes
2021-04-15 17:00:14 -06:00
Tyera Eulberg 7dfb51c0b4
Cli: move airdrop to rpc requests (#16557)
* Add recent_blockhash to requestAirdrop

* Move tx confirmation to separate method

* Add RpcClient airdrop methods

* Request cli airdrop via RpcClient

* Pass optional faucet_addr into TestValidator and fix tests

* Update client/src/rpc_client.rs

Co-authored-by: Michael Vines <mvines@gmail.com>

Co-authored-by: Michael Vines <mvines@gmail.com>
2021-04-15 06:25:23 +00:00
Tyera Eulberg ccb11a939f
Deprecate RpcClient methods, RpcRequest variants (#16516)
* Deprecate RpcClient methods, RpcRequest variants

* Update cli to getSupply
2021-04-13 14:05:42 -06:00
Michael Vines 5c6b38a83c Derive PartialEq for RpcStakeActivation 2021-04-13 12:34:22 -07:00
François Garillot b08cff9e77
Simplify some pattern-matches (#16402)
When those match an exact combinator on Option / Result.

Tool-aided by [comby-rust](https://github.com/huitseeker/comby-rust).
2021-04-08 12:40:37 -06:00
Tyera Eulberg bb9d2fd07a
Cli: use get_inflation_rewards and limit epochs queried (#16408)
* Fix block-with-limit when not finalized blocks found

* Enable confirmed commitment in getInflationReward

* Use get_inflation_rewards in cli

* Line up rewards output

* Add range validator

* Change cli epoch arg -> num epochs

* Add solana inflation rewards subcommand

* Consolidate epoch rewards meta
2021-04-08 10:57:33 -06:00
Josh e501fa5f0b
Rpc: introduce get_inflation_reward rpc call (#16278)
* feat: introduce get_inflation_reward rpc call

* fix: style suggestions

* fix: more style changes and match how other rpc functions are defined

* feat: get reward for a single epoch

* feat: default to the most recent epoch

* fix: don't factor out get_confirmed_block

* style: introduce from impl for RpcEncodingConfigWrapper

* style: bring commitment into variable

* feat: support multiple pubkeys for get_inflation_reward

* feat: add get_inflation_reward to rpc client

* feat: return rewards in order

* fix: rename pubkeys to addresses

* docs: introduce jsonrpc docs for get_inflation_reward

* style: early return in map (not sure which is more idiomatic)

* fix: call the rpc client function args addresses as well

* fix: style

* fix: filter out only addresses we care about

* style: make this more idiomatic

* fix: change rpc client epoch to optional and include some docs edits

* feat: filter out rent rewards in get_inflation_reward

* feat: add option epoch config param to get_inflation_reward

* feat: rpc client get_inflation_reward takes epoch instead of config and some filter staking and voting rewards
2021-04-06 18:10:53 -07:00
Tyera Eulberg 03d3ae1cb9
Faucet: repurpose cap and slice args to apply to single IPs (#16381)
* Single use stmt

* Log request IP

* Switch cap and slice to apply per IP

* Use SOL in logs, error msgs

* Use thiserror instead of overloading io::Error

* Return memo transaction for requests that exceed per-request-cap

* Handle faucet memos in cli

* Add some docs, esp about memo transaction

* Use SOL symbol & standardize memo

Co-authored-by: Michael Vines <mvines@gmail.com>

* Differentiate faucet tx-length errors

* Populate signature in cli airdrop memo case

Co-authored-by: Michael Vines <mvines@gmail.com>
2021-04-06 07:01:05 +00:00
Michael Vines a4f0d8636a RpcClient no longer panics in a tokio multi-threaded runtime 2021-04-05 16:50:03 -07:00
Tyera Eulberg da27acabcc
Rpc: enable getConfirmedSignaturesForAddress2 to return confirmed (not yet finalized) data (#16281)
* Update blockstore method to allow return of unfinalized signature

* Support confirmed sigs in getConfirmedSignaturesForAddress2

* Add deprecated comments

* Update docs

* Enable confirmed transaction-history in cli

* Return real confirmation_status; fill in not-yet-finalized block time if possible
2021-04-01 04:35:57 +00:00
Michael Vines 2a1639836a Add get_max_retransmit_slot/get_max_shred_insert_slot to RpcClient 2021-03-30 23:52:47 +00:00
Tyera Eulberg 3977ed5c82
Future-aware enum name 2021-03-29 14:58:05 -06:00
Tyera Eulberg 60ed8e2892
Rpc: enable getConfirmedBlocks and getConfirmedBlocksWithLimit to return confirmed (not yet finalized) data (#16161)
* Add commitment config capabilities

* Use rpc limit if no end_slot provided

* Limit to actually finalized blocks

* Support confirmed blocks in getConfirmedBlocks and getConfirmedBlocksWithLimit

* Update docs

* Add client plumbing

* Rename config enum
2021-03-29 12:41:31 -06:00
Michael Vines 4e7bd45d4c Derive PartialEq for StakeActivationState 2021-03-29 17:03:27 +00:00
Michael Vines 16e4ccca13 Switch to a single `use` 2021-03-26 22:33:12 -07:00
Michael Vines 5791b95b17 Add RpcClient::get_stake_activation() 2021-03-26 20:18:16 -07:00
Tyera Eulberg 433f1ead1c
Rpc: enable getConfirmedBlock and getConfirmedTransaction to return confirmed (not yet finalized) data (#16142)
* Add Blockstore block and tx apis that allow unrooted responses

* Add TransactionStatusMessage, and send on bank freeze; also refactor TransactionStatusSender

* Track highest slot with tx-status writes complete

* Rename and unpub fn

* Add commitment to GetConfirmed input configs

* Support confirmed blocks in getConfirmedBlock

* Support confirmed txs in getConfirmedTransaction

* Update sigs-for-addr2 comment

* Enable confirmed block in cli

* Enable confirmed transaction in cli

* Review comments

* Rename blockstore method
2021-03-26 16:47:35 -06:00
Justin Starry e7fd7d46cf
rpc: add getSlotLeaders method (#16057) 2021-03-23 17:48:54 +00:00
Tyera Eulberg aa54c468ea
rpc: Add config options limiting getConfirmedBlock response data (#15970)
* Add new confirmed block struct

* Add RpcConfirmedBlockConfig options

* Configure block response based on new options

* Add client api, use in cli fetch_epoch_rewards

* Update docs

* Apply review suggestions
2021-03-18 17:58:20 +00:00
Tyera Eulberg 3726358f51
Cli: better estimate of epoch time elapsed/remaining (#15893)
* Add rpc_client api for getRecentPerformanceSamples

* Prep fn for variable avg slot time

* Use recent-perf-samples to more-accurately estimate epoch completed times

* Spell out average
2021-03-16 08:35:27 +00:00
Tyera Eulberg 5b2da19c93
Rpc: support extended config for getConfirmedBlock (#15827)
* Add rpc confirmed-block config wrapper to support struct of extended config

* Update docs

* Make config wrapper generic and use in getConfirmedTransaction as well

* Update/clean confirmed-tx docs
2021-03-12 22:19:45 +00:00
Justin Starry 918d04e3f0
Add more slot update notifications (#15734)
* Add more slot update notifications

* fix merge

* Address feedback and add integration test

* switch to datapoint

* remove unused shred method

* fix clippy

* new thread for rpc completed slots

* remove extra constant

* fixes

* rely on channel closing

* fix check
2021-03-12 21:44:06 +08:00
Jeff Washington (jwash) 8a3135d17b
Account->AccountSharedData (#15691) 2021-03-09 15:06:07 -06:00
Michael Vines 24ab84936e Break up RPC API into three categories: minimal, full and admin 2021-03-04 16:39:44 -08:00
carllin ae96ba3459
Plumb slot update pubsub notifications (#15488) 2021-02-28 23:29:11 -08:00
sakridge 9b204febf3
Add accounts cluster bench (#14096)
* Add accounts cluster bench

* Transaction executor

* Re-allow clippy::integer_arithmetic

* Enable spl-token accounts and fixup transaction send/conf

* saturating_sub for debug builds

* Initialize RpcClients with confirmed commitment

Co-authored-by: Tyera Eulberg <tyera@solana.com>
2021-02-25 19:51:46 -08:00
Michael Vines 4b0114b991 Limit the number of getProgramAccounts filters 2021-02-23 18:43:22 +00:00
Michael Vines 65f1afe5e1 Limit getProgramAccounts memcpy filter string to 128 bytes 2021-02-23 18:43:22 +00:00
Trent Nelson 7f7370c306 Re-allow clippy::integer_arithmetic at crate-level 2021-02-17 13:55:08 -07:00
HowJMay 9c7b3dc1b5 style: Fix the typos 2021-02-13 12:34:21 -07:00
Josh 4013f91dbe
RPC: add caching to getLargestAccounts (#15154)
* introduce get largest accounts cache

* remove cache size and change hash key

* remove eq and hash derivation from commitment config

* add slot to the cache
2021-02-11 11:32:46 -08:00
Tyera Eulberg 98aa1fa4ea
Upgrade jsonrpc crates to v17.0.0 (#15018)
* Upgrade to jsonrpc 17.0.0

* Fix test

* tree

Co-authored-by: Michael Vines <mvines@gmail.com>
2021-02-02 19:53:08 -07:00
Michael Vines ff22091a98 Add StakeInstruction::Merge logging 2021-01-26 11:52:39 -08:00
Tyera Eulberg ffa5c7dcc8
Deprecate commitment variants (#14797)
* Deprecate commitment variants

* Add new CommitmentConfig builders

* Add helpers to avoid allowing deprecated variants

* Remove deprecated transaction-status code

* Include new commitment variants in runtime commitment; allow deprecated as long as old variants persist

* Remove deprecated banks code

* Remove deprecated variants in core; allow deprecated in rpc/rpc-subscriptions for now

* Heavier hand with rpc/rpc-subscription commitment

* Remove deprecated variants from local-cluster

* Remove deprecated variants from various tools

* Remove deprecated variants from validator

* Update docs

* Remove deprecated client code

* Add new variants to cli; remove deprecated variants as possible

* Don't send new commitment variants to old clusters

* Retain deprecated method in test_validator_saves_tower

* Fix clippy matches! suggestion for BPF solana-sdk legacy compile test

* Refactor node version check to handle commitment variants and transaction encoding

* Hide deprecated variants from cli help

* Add cli App comments
2021-01-26 19:23:07 +00:00
Michael Vines cbffab7850 Upgrade to Rust v1.49.0 2021-01-23 19:16:36 -08:00
Tyera Eulberg 71e9958e06
Rpc: Add custom error for BigTable data not found (#14762)
* Expose not-found bigtable error

* Add custom rpc error for bigtable data not found

* Return custom rpc error when bigtable block is not found

* Generalize long-term storage
2021-01-22 04:40:47 +00:00
Josh 1de6d28eaf
Add block_time to getConfirmedSignaturesForAddress2 and getConfirmedTransaction (#14572)
* add block_time to get_confirmed_signatures_for_address2 and protobuf implementation for tx_by_addr

* add tests for convert

* update cargo lock

* run cargo format after rebase

* introduce legacy TransactionByAddrInfo

* move LegacyTransactionByAddrInfo back to storage-bigtable
2021-01-20 22:10:35 -08:00
Tyera Eulberg 4964b0fe61
Cli: default to single gossip (#14673)
* Init cli RpcClient with chosen commitment; default to single_gossip

* Fill in missing client methods

* Cli tests: make RpcClient commitment specific

* Simply rpc_client calls, using configured commitment

* Check validator vote account with single-gossip commitment
2021-01-19 15:33:03 -07:00
Michael Vines 5d9dc609b1 Rename RpcNodeUnhealthy error to NodeUnhealthy, generalize `getHealth` RPC error object for the future 2021-01-18 19:57:25 -08:00
Michael Vines 4003f86f04 Add `getSnapshotSlot` RPC method 2021-01-16 19:31:21 +00:00
Michael Vines dacb95083d Add `getHealth` RPC method 2021-01-16 10:10:48 -08:00
Tyera Eulberg 9a89689ad3
Use optimistic confirmation in getSignatureStatuses, and various downstream client methods (#14430)
* Add optimistically_confirmed field to TransactionStatus

* Update docs

* Convert new field to confirmation_status

* Update docs to confirmationStatus

* Update variants

* Update docs

* Just Confirmed
2021-01-15 16:05:05 +00:00
Jeff Washington (jwash) 938d482135
consolidate constants related to time for future refactoring (#14440) 2021-01-07 09:49:24 -06:00
Michael Vines 6c167615ad Add --ignore-http-bad-gateway flag 2020-12-31 12:43:53 -08:00
Jack May 3316e7166c
Rework upgradeable loader cli (#14209) 2020-12-21 13:02:53 -08:00
Michael Vines efc091e28a Add transactionCount field to GetEpochInfo 2020-12-17 12:29:50 -08:00
Tyera Eulberg ac0d32bc7e
Add blockstore skipped api (#14145)
* Add blockstore api to determine if a slot was skipped

* Return custom rpc error if slot is skipped
2020-12-16 13:40:36 -07:00
Jack May 7abd8084b6
Add get_minimum_balance_for_rent_excemption to Client (#14048) 2020-12-10 16:39:28 -08:00
Jon Cinque 6203d1c94c Add `flatten` to logs_subscribe commitment
Currently, commitment for `logs_subscribe` must be specified using the
non-flattened form in JSON, ie `{"commitment":{"commitment":"max}}`.
This brings the commitment in line with documentation.
2020-11-30 08:40:32 -08:00
Michael Vines 43b82b31e5 More TestValidator cleanup 2020-11-26 08:56:25 +00:00
Michael Vines 4ef2da0ff0 Add `solana logs` command 2020-11-25 11:44:41 -08:00
Michael Vines 61ab2072bd Clean up default commitment handling for subscriptions 2020-11-23 22:54:47 -08:00
carllin 791fb17437
Prevent scans on unrooted slots from seeing partial clean (#13628)
Co-authored-by: Carl Lin <carl@solana.com>
2020-11-20 13:01:04 -08:00
Michael Vines f9acbd6e3f Document get_account() gotcha 2020-11-19 14:02:34 -08:00
Michael Vines c5299b60ed Add RpcClient::new_with_commitment() 2020-11-17 07:55:43 -08:00
Michael Vines c2f77a3473 Default preflight_commitment to confirmation commitment 2020-11-16 21:54:02 -08:00
sakridge 598e5f58d5
Add wait for max stake command (#13532) 2020-11-12 13:48:34 -08:00
Michael Vines b5ef319038 Refine transaction log count message 2020-11-04 05:30:52 +00:00
Michael Vines 6d9ca0ae15 Surface transaction logs in rpc client 2020-11-03 17:03:28 -08:00
Tyera Eulberg 16944e218f
Cli: deploy programs via TPU (#13090)
* Deploy: send write transactions to leader tpu

* Less apparent stalling during confirmation

* Add EpochInfo mock

* Only get cluster nodes once

* Send deploy writes to next leader
2020-10-23 10:03:29 -06:00
Michael Vines 7bc073defe Run `codemod --extensions rs Pubkey::new_rand solana_sdk::pubkey::new_rand` 2020-10-21 19:08:13 -07:00
Trent Nelson 86a982150c RPC: Don't send base64 TXs to old clusters 2020-10-21 08:33:28 +00:00
Michael Vines 14d793b22c Cleanly handle RPC servers that don't have --enable-rpc-transaction-history enabled 2020-10-13 10:05:44 -07:00
Michael Vines 247228ee61 Implementation-defined RPC server errors are now accessible to client/ users 2020-10-13 10:05:44 -07:00
Trent Nelson efbe37ba20 RpcClient: Encode TXs as base64 by default 2020-10-12 20:36:36 +00:00
Michael Vines b3c2752bb0 simulate_transaction_with_config() now passes full config to server 2020-10-11 21:45:00 -07:00
Trent Nelson 4feead323d clap-utils: Allow fine-tuning offline args 2020-10-07 23:14:39 +00:00
Trent Nelson e35889542b RPC: Support base64 encoded transactions
Defaults to base58
2020-10-06 22:41:06 -06:00
Michael Vines 9abaf6ec1d `solana stakes` now employs server-side filtering if only one vote account is provided 2020-10-02 17:53:07 -07:00
Tyera Eulberg 19f385db76
Improve solana deploy (#12621)
* Check program account before attempting to create it

* Use last_valid_slot to timeout status checks

* Include transaction history in RpcClient::get_signature_statuses requests

* Improve solana-deploy send-transactions

* Clippy

* Improve mock deploy test

* Review comments
2020-10-02 13:35:39 -06:00
Michael Vines 75b621160e Add GetConfirmedBlocksWithLimit RPC method 2020-10-01 22:56:17 -07:00
Tyera Eulberg 8f10e407ee
Add nonced-tx check to RpcClient (#12600) 2020-10-01 00:44:17 +00:00
Michael Vines 182552c2e7 Switch get_program_accounts to use base64 2020-09-29 11:44:10 -07:00
Trent Nelson 972619edb4 clap-utils: Allow nonce/offline args to be global 2020-09-29 10:42:49 -06:00
Michael Vines 35f5f9fc7b Add feature set identifier to gossiped version information 2020-09-25 11:40:36 -07:00
Josh 1d04c1db94
introduce RpcPerfSample and modify getPerformanceSamples output (#12434)
* introduce RpcPerfSample and modify getPerformanceSamples output

* camelCase test results
2020-09-24 14:22:22 -07:00
Justin Starry 731a943239
Remove transaction encoding from storage layer (#12404) 2020-09-24 13:10:29 +08: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
Trent Nelson dda48e2d06 Move `CliNonceError` into client crate 2020-09-23 15:58:44 -06:00
Michael Vines ff890c173c RpcClient::get_multiple_accounts() now works 2020-09-23 13:37:57 -07:00
Michael Vines 4fa443becf Simplify cli node version output, display semver only by default 2020-09-22 07:03:43 +00:00
Tyera Eulberg 28f2c15597
Add get_token_account methods (#12346) 2020-09-18 20:45:13 -06:00
Tyera Eulberg a79790dea6
Remove client resends (#12290)
* Remove resends from client send_tx methods

* Retry status queries until blockhash expires
2020-09-16 17:47:55 -06:00
Justin Starry 9940870c89
Fix RPC transaction method configs serialization (#12100) 2020-09-08 13:08:09 +08:00
Michael Vines 6677996369 Add first-available-block command 2020-09-06 12:45:32 -07:00
Tyera Eulberg 954b017f85
Bump getMultipleAccounts input limit (#12050) 2020-09-04 17:51:28 +00:00
Tyera Eulberg 39246f9dd7
Revert signature-notification format change (#12032)
* Use untagged RpcSignatureResult enum to avoid breaking downstream consumers of current signature subscriptions

* Clean up client duplication

* Clippy
2020-09-03 18:14:45 -06:00
Tyera Eulberg b22de369b7
Rpc: add getMultipleAccounts endpoint (#12005)
* Add rpc endpoint to return the state of multiple accounts from the same bank

* Add docs

* Review comments: Dedupe account code, default to base64, add max const

* Add get_multiple_accounts to rpc-client
2020-09-03 11:35:06 -06:00
carllin 1c1a3f979d
Detect and notify when deserializable shreds are available (#11816)
* Add logic to check for complete data ranges

* Add RPC signature notification

Co-authored-by: Carl <carl@solana.com>
2020-09-01 22:06:06 -07:00
Michael Vines b660704faa Allow the sendTransaction preflight commitment level to be configured 2020-08-22 08:19:50 -07:00
Michael Vines adc984a225 Rename Binary64 to Base64. Establish Base58 encoding 2020-08-17 17:26:29 -07:00
Michael Vines 757e147b3b Rework UiAccountData encode/decode such that it works from Rust 2020-08-17 17:26:29 -07:00
Tyera Eulberg 6c5b8f324a
Rpc: Add until parameter for getConfirmedSignaturesForAddress2 (#11644)
* Refactor bigtable apis to accept start and end keys

* Make helper fn to deserialize cell data

* Refactor get_confirmed_signatures_for_address to use get_row_data range

* Add until param to get_confirmed_signatures_for_address

* Add until param to blockstore api

* Plumb until through client/cli

* Simplify client params
2020-08-15 10:42:17 -06:00
Michael Vines 17645ee20c
Adapt RpcClient to recent token method changes (#11519)
* Avoid skip_serializing_if since that breaks deserialization

* Adapt RpcClient to recent token method changes
2020-08-11 10:14:17 -06:00
Tyera Eulberg 88ca04dbdb
Add config param to specify offset/length for single and program account info (#11515)
* Add config param to specify dataSlice for account info and program accounts

* Use match instead of if
2020-08-10 22:35:29 +00:00
sakridge 068d23f298
Add Binary64 option for account data (#11474)
* Add Binary64 option for account data

* Decode into binary64

* Reword docs
2020-08-08 22:40:13 -07:00
Tyera Eulberg b7c2681903
Token Accounts: return ui_amount, decimals with decoded account (#11407)
* Return ui_amount, decimals from token client methods

* Return ui_amount, decimals in RPC jsonParsed token accounts

* Fixup docs

* Return ui_amount, decimals in pubsub jsonParsed token accounts

* Remove unnecessary duplicate struct

* StringAmount rename
2020-08-07 11:37:39 -06:00
Michael Vines 02c0981ecf Rename startAfter to before 2020-08-05 14:33:14 -07:00
Michael Vines 1b2276520b Add getConfirmedSignaturesForAddress2 RPC method 2020-08-05 14:33:14 -07:00
Tyera Eulberg 86e3f96f16
Return token amounts as floats (#11370)
* Return token amounts as floats

* Floating-point equality

* Return float and raw token amounts

* Fix decimals and token rpcs for native-mint tokens

* Fixup docs and review comments
2020-08-05 06:48:09 +00:00
Michael Vines b5e03d6df2 get_token_accounts_by_owner now returns UiTokenAccounts 2020-08-04 22:45:00 +00:00
Tyera Eulberg d0144ce382
Fix token rpc-client methods (#11361)
* Convert None to error in parse_keyed_accounts

* Allow encoding configuration in getTokenAccounts methods
2020-08-04 11:11:30 -06:00
Tyera Eulberg d1b2e6cdf2
Add getTokenLargestAccounts endpoint (#11322) 2020-08-02 10:23:44 -06:00
Tyera Eulberg 9bcfc51df1
Add token rpc endpoints to rpc-client (#11315) 2020-07-31 20:53:49 +00:00
Tyera Eulberg b45ac5d4db
Add SPL Token-specific rpc endpoints (#11231)
* Simplify account-decoder program ids + spl_token helper

* Spl program namespace version

* Add getTokenAccountBalance endpoint

* Remove token program id from getTokenAccountBalance request

* Add getTokenSupply endpoint

* Remove token program id from getTokenSupply request

* Add getTokenAccountsByOwner/Delegate endpoints

* Remove token program id from getTokenAccountsByOwner/Delegate requests

* Named parameter
2020-07-28 23:00:48 -06:00
Trent Nelson bece8cfbc2 Add RpcClient constructor with timeout 2020-07-23 22:29:40 +00:00
Michael Vines aef6bf272e getConfirmedBlocks now has an upper limit on slot range 2020-07-10 12:18:31 -07:00
Tyera Eulberg 4de0713aa3
Rpc: Add getStakeActivation endpoint (#10902)
* Add getStakeActivation endpoint

* Add docs

* Update docs/src/apps/jsonrpc-api.md

Co-authored-by: Michael Vines <mvines@gmail.com>

* Rework return type

* Update docs

* Rebase

Co-authored-by: Michael Vines <mvines@gmail.com>
2020-07-06 13:28:40 -06:00
Tyera Eulberg 8d951776ab
Rpc: add filter to getProgramAccounts (#10888)
* Add RpcFilterType, and implement CompareBytes for getProgramAccounts

* Accept bytes in bs58

* Rename to memcmp

* Add Memcmp optional encoding field

* Add dataSize filter

* Update docs

* Clippy

* Simplify tests that don't need to test account contents; add multiple-filter tests
2020-07-03 07:46:29 +00:00
Tyera Eulberg 2669ccb864
Update struct prefixes to Ui (#10874)
* Update comments

* Use Ui prefix
2020-07-01 20:06:40 +00:00
Tyera Eulberg d97850f1d9
Add account-decoder utilities (#10846)
* Fix comment and make less pub

* Add account-decoder crate and use to decode vote and system (nonce) accounts

* Update docs

* Rename RpcAccount struct

* s/Rpc/Display

* Call it jsonParsed and update docs

* Revert "s/Rpc/Display"

This reverts commit 6e7149f503f560f1e9237981058ff05642bb7db5.

* s/Rpc/Ui

* Add tests

* Ui more things

* Comments
2020-07-01 04:55:11 +00:00
Greg Fitzgerald 7ade330b23
Rename Client methods to match proposed BanksClient (#10793) 2020-06-25 03:35:38 +00:00
Greg Fitzgerald 1c498369b5
Remove fee-payer guesswork from Message and Transaction (#10776)
* Make Message::new_with_payer the default constructor

* Remove Transaction::new_[un]signed_instructions

These guess the fee-payer instead of stating it explicitly
2020-06-24 14:52:38 -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
Greg Fitzgerald 4131eee94d
Expose last-valid-slot to BankClient and ThinClient users (#10478)
automerge
2020-06-09 17:07:32 -07:00
Michael Vines 8e2745c2a2 Clean up delinquency slot distance computation 2020-06-09 11:27:30 -07:00
Kristofer Peterson e23340d89e
Clippy cleanup for all targets and nighly rust (also support 1.44.0) (#10445)
* address warnings from 'rustup run beta cargo clippy --workspace'

minor refactoring in:
- cli/src/cli.rs
- cli/src/offline/blockhash_query.rs
- logger/src/lib.rs
- runtime/src/accounts_db.rs

expect some performance improvement AccountsDB::clean_accounts()

* address warnings from 'rustup run beta cargo clippy --workspace --tests'

* address warnings from 'rustup run nightly cargo clippy --workspace --all-targets'

* rustfmt

* fix warning stragglers

* properly fix clippy warnings test_vote_subscribe()
replace ref-to-arc with ref parameters where arc not cloned

* Remove lock around JsonRpcRequestProcessor (#10417)

automerge

* make ancestors parameter optional to avoid forcing construction of empty hash maps

Co-authored-by: Greg Fitzgerald <greg@solana.com>
2020-06-09 09:38:14 +09:00
Michael Vines 7e2651ca51
RPC simulateTransaction endpoint now returns program log output (#10432) 2020-06-06 10:18:28 -07:00
Michael Vines 6498cb4214 Remove some unused RpcClient and ThinClient methods 2020-06-02 07:44:30 -07:00
Michael Vines df216b0e98 Remove RpcClient::resign_transaction() 2020-06-02 07:44:30 -07:00
Michael Vines 202512d46b Adapt `solana deploy` 2020-06-01 17:51:04 -07:00
Michael Vines f1733ab125 Add send_transaction_with_config 2020-06-01 17:51:04 -07:00
Michael Vines 189aa7962e Add preflight checks to sendTransaction RPC method 2020-06-01 17:51:04 -07:00
Tyera Eulberg b563b49ed5
Improve Rpc inflation tooling (#10309)
automerge
2020-05-29 11:50:25 -07:00
Tyera Eulberg 3f0995d3b4
Add commitment parameter to getFeeCalculatorForBlockhash (#10255)
* Accept commitment parameter on getFeeCalculatorForBlockhash

* Update docs

* Add get_fee_calculator_for_blockhash_with_commitment to rpc client
2020-05-26 17:23:58 -06:00
Tyera Eulberg 4e431bc818
Add mechanism to get blockhash's last valid slot (#10239)
automerge
2020-05-26 12:06:21 -07:00
Michael Vines 4779858dd4
Clean up RPCClient retry handling: only retry on 429, after a little sleep (#10182) 2020-05-22 08:53:53 -07:00
Greg Fitzgerald 64cec764b9
Allow RpcClient users to inject custom "senders" (#10157)
automerge
2020-05-20 18:40:45 -07:00
sakridge ce17de7d25
Add option to wait for a specific epoch length to bench-tps (#10083) 2020-05-20 16:42:46 -07:00
Michael Vines 417f0e41fa
Add stake-o-matic (#10044)
automerge
2020-05-20 16:15:03 -07:00
Michael Vines 427c78d891
Add SimulateTransaction RPC endpoint (#10106)
automerge
2020-05-19 12:08:19 -07: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
Tyera Eulberg ee7f15eff1
Rpc: optionally filter getLargestAccounts by circulating/nonCirculating (#10007)
* Add circ/non-circ filter to getLargestAccounts

* Plumb largest accounts into client and cli

* Bump timeout toward CI flakiness

* Update docs
2020-05-12 21:05:05 -06:00
Justin Starry 5cc252d471
Remove hash field from account (#9915) 2020-05-12 23:39:46 +08:00
Michael Vines 84b6120983
getClusterNodes RPC API now includes the node software version (#9990) 2020-05-11 21:30:01 -07:00
Michael Vines 19722fceb3 Fixup supply_with_commitment 2020-05-10 11:50:15 -07:00
Tyera Eulberg dd78184f8f
Cli: Add solana supply command; hide total-supply (#9956)
* Add cli supply command; hide total-supply

* Use print-accounts arg instead of verbose
2020-05-10 12:05:14 -06:00
Michael Vines af6a8f5fac
Remove RpcClient code duplication (#9952) 2020-05-10 08:51:53 -07:00
Tyera Eulberg 3ee702a922
Rpc: Add getCirculatingSupply endpoint, redux (#9953)
* Add Bank.clock() helper

* Add non-circulating calculations

* Plumb getSupply rpc endpoint

* Add docs for getSupply, and remove getTotalSupply from docs

* Add pubkeys! procedural macro

* Use procedural macro in non_circulating_supply
2020-05-09 12:05:29 -06:00
Michael Vines cb50877bbf
send_and_confirm_transaction() no longer needs a keypair (#9950) 2020-05-09 09:06:32 -07:00
Tyera Eulberg f5b0d13f08
Rpc: add getLargestAccounts endpoint (#9869)
automerge
2020-05-04 16:46:10 -07:00
Jack May a8394317c7
Wait for at least one confirmation when uploading program data (#9850)
automerge
2020-05-02 20:11:50 -07:00
Tyera Eulberg 2f08b12753
Rpc Client: Prevent error out on get_num_blocks_since_signature_confirmation (#9792)
automerge
2020-04-29 13:12:38 -07:00
Trent Nelson 3d40ca86b0 Disable Move/Libra components 2020-04-28 21:02:47 -06:00
Michael Vines 914b022663
cli: Add transaction-history (#9614)
automerge
2020-04-20 22:01:09 -07:00
Michael Vines 7e7cbec8a1 Passing -v/--verbose to `solana confirm` now displays the full transaction 2020-04-16 08:19:30 -07:00
Tyera Eulberg 68b099c277
Print signature as part of progress spinner (#9484)
automerge
2020-04-13 22:04:20 -07:00
Tyera Eulberg 6b988155e1
RpcClient: include signature check in send_transaction, bump send retries in get_num_blocks_since_signature_confirmation (#9341)
* Bump rpc send retries

* Add signature check to send_transaction and update mocks to test
2020-04-06 19:27:37 -06:00
Tyera Eulberg acf64f8476
Update getSignatureStatuses to return historical statuses (#9314)
automerge
2020-04-06 03:04:54 -07:00
Justin Starry b584174d67
Deprecate `confirmTransaction`, `getSignatureStatus`, and `getSignatureConfirmation` (#9298)
* Deprecate `confirmTransaction`, `getSignatureStatus`, etc

* Rename get_signature_statuses to get_signature_statuses_with_commitment

Co-authored-by: Michael Vines <mvines@gmail.com>
2020-04-05 14:31:24 +08:00
Michael Vines ad0997e15f
RPC: add `err` field to TransactionStatus, alongside the now deprecated `status` field (#9296)
automerge
2020-04-04 16:13:26 -07:00
Justin Starry c7ba1994ac
Undo getSignatureStatus breaking change, add getSignatureStatuses (#9228)
automerge
2020-04-01 11:30:58 -07:00
Tyera Eulberg 56667e17c9
Fix panic (#9195)
automerge
2020-03-31 18:33:46 -07:00
Michael Vines 4a8b1d9b2c
RpcClient now returns Signatures instead of Strings (#9129) 2020-03-27 15:46:00 -07:00
Tyera Eulberg 4b97e58cba
Consolidate signature-status rpcs (#9069)
* getSignatureStatus: return confirmations for non-rooted transactions

* Remove getNumConfirmations.. rpc

* Remove getSignatureConfirmation

* Review comments

* More review comments
2020-03-26 19:21:01 -06:00
sakridge b7b4aa5d4d
move rpc types from client to client-types crate (#9039)
* Separate client types into own crate, so ledger does not need it

Removes about 50 crates of dependency from ledger

* Drop Rpc name from transaction-status types
2020-03-26 13:29:30 -07:00
Michael Vines 56dc958116
Add get_confirmed_block_with_encoding() (#9046)
automerge
2020-03-24 05:05:38 -07:00
Tyera Eulberg 1b8f9e75dd
Update getSignatureStatus: support multiple signatures, include slot in each response item (#9022)
* Rename enable-rpc-get-confirmed-block

* Rename RpcTransactionStatus -> RpcTransactionStatusMeta

* Return simplified RpcTransactionStatus; Add support for multiple transactions

* Update docs

* typo
2020-03-23 11:25:39 -06:00
Tyera Eulberg b84468ecd3
Cli: polish transaction progress bar (#8963)
automerge
2020-03-19 11:10:35 -07:00
Tyera Eulberg f0414711b7
Cli: add spinner progress bar when waiting for transaction confirmation (#8916)
* Add _with_spinner method

* Use _with_spinner method in cli
2020-03-17 17:58:02 -06:00
Trent Nelson fbf2dd1672
CLI: Error message cleanup (#8804)
automerge
2020-03-12 23:20:49 -07:00
Jack May 6eb4973780
Don't use move semantics if not needed (#8793) 2020-03-11 14:37:23 -07:00
Michael Vines 132a2a73af
Add total-supply command (#8722)
automerge
2020-03-09 01:28:44 -07:00
Trent Nelson 4db074a5aa
RPC: Add `getFeeCalculatorForBlockhash` method call (#8687)
Returns the `FeeCalculator` associated with the given blockhash, or
`null` if said blockhash has expired
2020-03-06 17:01:31 -07:00
Michael Vines 448b957a13
Add --bind-address and --rpc-bind-address validator arguments (#8628) 2020-03-04 22:46:43 -07:00
Grimes f89c22b5ee
`solana catchup` now detects when you try to catchup to yourself (#8635)
automerge
2020-03-04 14:44:21 -08:00
Michael Vines abf33b3b3b
Add commitment flag to `vote-account` and `validators` commands (#8597) 2020-03-03 17:53:30 -07:00
Trent Nelson 90bedd7e06
Split signature throughput tracking out of `FeeCalculator` (#8447)
* SDK: Split new `FeeRateGovernor` out of `FeeCalculator`

Leaving `FeeCalculator` to *only* calculate transaction fees

* Replace `FeeCalculator` with `FeeRateGovernor` as appropriate

* Expose recent `FeeRateGovernor` to clients

* Move `burn()` back into `FeeCalculator`

Appease BPF tests

* Revert "Move `burn()` back into `FeeCalculator`"

This reverts commit f3035624307196722b62ff8b74c12cfcc13b1941.

* Adjust BPF `Fee` sysvar test to reflect removal of `burn()` from `FeeCalculator`

* Make `FeeRateGovernor`'s `lamports_per_signature` private

* rebase artifacts

* fmt

* Drop 'Recent'

* Drop _with_commitment variant

* Use a more portable integer for `target_signatures_per_slot`

* Add docs for `getReeRateCalculator` JSON RPC method

* Don't return `lamports_per_signature` in `getFeeRateGovernor` JSONRPC reply
2020-02-28 13:27:01 -07:00
Tyera Eulberg 0b7e8d0162
Add handling for fallible signers (#8367)
automerge
2020-02-20 19:04:53 -08:00
Tyera Eulberg ab361a8073
Rename KeypairUtil to Signer (#8360)
automerge
2020-02-20 13:28:55 -08:00
Greg Fitzgerald e8124324ff
Support transaction signing by heterogenous lists of keypairs (#8342)
automerge
2020-02-20 12:13:23 -08:00
Greg Fitzgerald 127553ce4b
Wrap ed25519_dalek::Keypair (#8247) 2020-02-12 14:15:12 -07:00
Trent Nelson ed87229cec
CLI: Don't hide errors when fees are disabled (#8204)
automerge
2020-02-11 21:48:04 -08:00
Michael Vines 72b11081a4 Report validator rewards in getConfirmedBlock JSON RPC 2020-02-11 17:25:45 -07:00
Sunny Gleason a7fa92b372
feat: implementation of live-slots command (#8129) 2020-02-06 14:16:30 -05:00
Michael Vines 09256adbc3 Surface important error details 2020-01-31 12:09:41 -07:00
Michael Vines 8e3a7da596 Rewrite new() in terms of new_with_timeout() 2020-01-31 12:09:41 -07:00
Tyera Eulberg 65f5885bce
sendTransaction rpc: expect transaction as base58 string (#7913) 2020-01-21 22:16:07 -07:00
Michael Vines 93036bec01 Add minimumLedgerSlot RPC API 2020-01-21 14:05:26 -07:00
Tyera Eulberg da165d6943
Fix Rpc inconsistencies (#7826)
* Update rpc account format: remove byte arrays

* Base58-encode pubkeys in getStoragePubkeysForSlot

* Update docs
2020-01-15 15:33:53 -07:00
Tyera Eulberg 6d3b8b6d7d
Remove tuples from JSON RPC responses (#7806)
* Remove RpcConfirmedBlock tuple

* Remove getRecentBlockhash tuple

* Remove getProgramAccounts tuple

* Remove tuple from get_signature_confirmation_status

* Collect Rpc response types

* Camel-case epoch schedule for rpc response

* Remove getBlockCommitment tuple

* Remove getStorageTurn tuple

* Update json-rpc docs
2020-01-15 00:25:45 -07:00
Tyera Eulberg a17d5795fb getConfirmedBlock: add encoding optional parameter (#7756)
automerge
2020-01-12 21:34:30 -08:00
dependabot-preview[bot] 57858b8015 Bump reqwest from 0.9.24 to 0.10.0 (#7642)
* Bump reqwest from 0.9.24 to 0.10.0

Bumps [reqwest](https://github.com/seanmonstar/reqwest) from 0.9.24 to 0.10.0.
- [Release notes](https://github.com/seanmonstar/reqwest/releases)
- [Changelog](https://github.com/seanmonstar/reqwest/blob/master/CHANGELOG.md)
- [Commits](https://github.com/seanmonstar/reqwest/commits)

Signed-off-by: dependabot-preview[bot] <support@dependabot.com>

* Make reqwest::blocking specific

Co-authored-by: Tyera Eulberg <teulberg@gmail.com>
2020-01-08 13:31:43 -07: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
Michael Vines 05664d150b Add get_confirmed_block()/get_confirmed_blocks() 2019-12-18 23:34:01 -07:00
Michael Vines fcda972cec Add support for multiple params 2019-12-18 23:34:01 -07:00
Michael Vines bd22b641b3 Speed up getLeaderSchedule RPC call by reducing pubkey duplication 2019-12-18 15:59:55 -07:00
Tyera Eulberg 6aaf742dfe Extend getConfirmedBlock rpc to return account pre- and post-balances (#7543)
automerge
2019-12-18 09:56:29 -08:00
Michael Vines 434cde179f GetLeaderSchedule can now return a schedule for arbitrary epochs 2019-12-17 23:41:42 -07:00
Justin Starry dad5c62df5 Add uptime column to show-validators (#7441)
automerge
2019-12-11 22:04:54 -08:00
Tyera Eulberg 1d0ba0d1f2
Add special handling for snapshot root slot in get_confirmed_block (#7430)
* Add special handling for snapshot root slot

* Improve test
2019-12-11 15:06:54 -07:00
Tyera Eulberg ed9cf3566c Restore status check to bubble up TransactionError (#7383)
automerge
2019-12-09 19:35:34 -08:00
Michael Vines 1eaf71b5b4 Improve error handling when the user mixes up gossip (8001) and RPC (8899) ports (#7158)
automerge
2019-12-02 09:01:25 -08:00
Tyera Eulberg 58c144ee55
Add getBlockTime rpc api (#7130)
* Add getBlockTime rpc api

* Add getBlockTime to docs

* Fix duration rounding for common tick/slot durations; add slot duration calculation

* Expose slots_per_year

* Use genesis values instead of clock defaults to calculate block offset

* Add get-block-time cli subcommand

* Fix test_rent: decrease magic number usage
2019-11-26 00:40:36 -07:00
Tyera Eulberg 0f66e5e49b Add getConfirmedBlock test to rpc (#7120)
automerge
2019-11-25 11:08:03 -08:00
Michael Vines d5beb8a9e4
cli: Add --confirmed option to a couple commands, also add --no-header (#7112)
* Add --confirmed option to get-slot, get-epoch-info, get-transaction-count

* Add --no-header option
2019-11-24 17:34:18 -07:00
Tyera Eulberg ea656b1a3f
Add parent slot to getConfirmedBlock (#7038)
* Add parent slot to getConfirmedBlock

* Fix bad text-replace

* Use camelCase in getConfirmedBlock
2019-11-19 09:39:55 -07:00
Tyera Eulberg e0a2bb9d86
Legitimately map transactions to statuses in blocktree (#7011)
* Refactor rocksdb TransactionStatus to store/return struct; hook up map_transactions_to_statuses

* Cleanup use statements
2019-11-18 09:12:42 -07:00
Tyera Eulberg 3bc8d78801
Add ConfirmedBlock struct, and rework Blocktree apis to include block… (#7004)
* Add RpcConfirmedBlock struct, and rework Blocktree apis to include blockhash info and dummy tx statuses

* Remove unused lifetime
2019-11-17 20:17:15 -07:00
Michael Vines f116cdeed9
Add validator catchup command (#6922) 2019-11-13 15:58:14 -07:00
Sunny Gleason e2fb9ac829 feat: remove unwraps from client code, fixes #6915 (#6927) 2019-11-13 14:41:54 -07:00
Michael Vines fcc2874591
Remove/address some TODOs (#6923) 2019-11-13 09:43:15 -07:00
Michael Vines 86faa3f995
Properly type RpcClient::get_version() (#6919) 2019-11-12 22:01:04 -07:00
Ryo Onodera 3faeb7fa79 Rename solana-netutil to solana-net-utils for consistency (#6895)
* sed -i -e 's/netutil/net_utils/g' $(git grep --files-with-matches netutil :**.rs)

* sed -i -e 's/netutil/net-utils/g' $(git grep --files-with-matches netutil)

* git mv netutil/ net-utils

* Tweak a bit

* Fix rustfmt & clippy
2019-11-12 13:37:13 -07:00
Sunny Gleason 5903339c17
feat: return bank/block info with block-related results (#6716) 2019-11-12 14:49:41 -05:00
Justin Starry 9807f47d4e
Rename genesis block to genesis config (#6816) 2019-11-08 23:56:57 -05:00
Sunny Gleason a684984f8b
feat: add confirm_transaction, add rpc client test (#6778) 2019-11-06 22:08:03 -05:00
Tyera Eulberg b3a75a60a4
Use rooted bank by default in rpc bank selection (#6759)
* Name anonymous parameters for clarity

* Add CommitmentConfig to select bank for rpc

* Add commitment information to jsonrpc docs

* Update send_and_confirm retries as per commitment defaults

* Pass CommitmentConfig into client requests; also various 'use' cleanup

* Use _with_commitment methods to speed local_cluster tests

* Pass CommitmentConfig into Archiver in order to enable quick confirmations in local_cluster tests

* Restore solana ping speed

* Increase wallet-sanity timeout to account for longer confirmation time
2019-11-06 14:15:00 -07:00
Michael Vines 50a17fc00b Use Slot and Epoch type aliases instead of raw u64 (#6693)
automerge
2019-11-02 00:38:30 -07:00
Rob Walker b4119c454a
credit_only credits forwarding (#6509)
* credit_only_credits_forwarding

* whack transfer_now()

* fixup

* bench should retry the airdrop TX

* fixup

* try to make bench-exchange a bit more robust, informative
2019-10-23 22:01:22 -07:00
Sunny Gleason 0b2d4f32fa
feat: get epoch schedule rpc, update cli (#6500) 2019-10-22 16:41:18 -04:00
Rob Walker e2c316d2d0
system_instruction_processor updates (#6448)
* zero lamport account creation

* whack create_user_account, take 2

* target->to

* ..

* ..

* update chacha golden

* update chacha golden

* ..

* ..
2019-10-19 18:23:27 -07:00
Michael Vines 88bb55ffd2 Add get_vote_accounts() to RPC client 2019-10-14 20:38:51 -07:00
Greg Fitzgerald 322fcea6e5
More fullnode to validator renaming (#6337) 2019-10-11 13:30:52 -06:00
sakridge baf4e767e1
Increase number of transaction send retries. (#6273) 2019-10-08 13:04:27 -07:00
Michael Vines 13fc518268
Clippy work towards rust 1.38 (#6219) 2019-10-02 18:04:18 -07:00
Parth 2c8c2029d8
cli: enforce rent-exemption balance for stake, vote and program accounts in cli (#6118)
* require minimum balance for stake, vote and program accounts
2019-10-01 01:14:49 +05:30
Rob Walker 4f4618441c
split wallet staking commands (#6168)
* split wallet staking commands

* elide real home

* unit->UNIT for usage

* unit->UNIT, don't try to run SUBCOMMANDS: ;)

* more fixup

* fixups

* actually check

* shellcheck

* preserve #6158 after rebase

* fixup

* test

* too hard

* remove test
2019-09-29 21:18:15 -07:00
Michael Vines d50aef8404 Add get-epoch-info command (#6161)
automerge
2019-09-27 22:00:30 -07:00
Michael Vines 16e3ba86d5
get_new_blockhash() now retries longer (5s instead of 2s) (#6143) 2019-09-27 10:36:38 -07:00
Parth 67d07254c2
Add rent estimation rpc (#6109)
* server side new rpc endpoint

* client side rpc

* take data_len as usize

Co-Authored-By: Tyera Eulberg <teulberg@gmail.com>

* add test and documentation
2019-09-26 23:27:13 +05:30
Tyera Eulberg 3562774f8b
Reduce poll sleep (#6068)
* Reduce sleep in poll_for_signature_confirmations

* Unignore test_repairman_catchup
2019-09-24 17:01:18 -06:00
Tyera Eulberg 7babfd00c1
Revert back to reqwest, using rustls feature (#6041)
* Revert back to reqwest, using rustls feature

* Cargo.lock and crate-features

* Ignore test
2019-09-24 14:10:59 -06:00
Michael Vines 67d7375ab9 Add more descriptive error on a stuck blockhash (#6010)
automerge
2019-09-20 15:50:43 -07:00
Jack May e8d88f3237
Split SDK's timing.rs (#5823) 2019-09-06 14:30:56 -07:00
Michael Vines 1f9fde5f7b
ThinClient internal name grooming (#5800) 2019-09-06 09:07:40 -07:00
Tyera Eulberg b19d9a50d3
Transition to ureq http client (#5777)
* Transition to ureq http client

* Remove unwrap
2019-09-04 12:11:44 -07:00
Sunny Gleason 34ab25a88b
feat: getInflation() endpoint (#5681) 2019-08-27 18:17:03 -04:00
Michael Vines e2d6f01ad3
solana-validator now verifies its genesis blockhash against the cluster entrypoint (#5589) 2019-08-21 18:16:40 -07:00
Rob Walker 93ae98812b
change DEFAULT_NUM_TICKS_PER_SECOND to DEFAULT_TICKS_PER_SECOND (#5559) 2019-08-19 23:22:56 -07:00
Tyera Eulberg 8d105042ea
Update getEpochVoteAccounts to getVoteAccounts (#5543)
* Rework getEpochVoteAccounts into getVoteAccounts

* Update client apis

* Update docs

* Review comments
2019-08-16 17:02:19 -06:00