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
Michael Vines
02b81dd05d
Update to reqwest 0.11.2
2021-03-18 11:59:41 -07: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
Michael Vines
a2eb655322
=1.7.0
2021-03-16 07:51:07 +00:00
Michael Vines
0c9ca5522c
Bump version to v1.7.0
2021-03-13 09:01:21 +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
Trent Nelson
24d18b3cf2
docs: add docs links for crates published to crates.io
2021-03-11 08:38:18 +00: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
Ryo Onodera
c69027e5aa
chore: bump serde from 1.0.118 to 1.0.122 ( #15126 )
...
* chore: bump serde from 1.0.118 to 1.0.122
* Update programs/bpf/Cargo.lock
2021-02-05 19:23:24 +09: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
dependabot[bot]
1df93fa2be
chore: bump serde from 1.0.112 to 1.0.118 ( #14828 )
...
* chore: bump serde from 1.0.112 to 1.0.122
Bumps [serde](https://github.com/serde-rs/serde ) from 1.0.112 to 1.0.122.
- [Release notes](https://github.com/serde-rs/serde/releases )
- [Commits](https://github.com/serde-rs/serde/compare/v1.0.112...v1.0.122 )
Signed-off-by: dependabot[bot] <support@github.com>
* [auto-commit] Update all Cargo lock files
* Update frozen_abi digest following serde update
* Revert "chore: bump serde from 1.0.112 to 1.0.122"
This reverts commit a3ef4442a4c985144ae2bd7ceaf8899a7ab8d7c0.
* Revert "[auto-commit] Update all Cargo lock files"
This reverts commit c41c3b005fb1ccade55155302c52cd5736c4b55f.
* chore: bump serde from 1.0.112 to 1.0.118
Bumps [serde](https://github.com/serde-rs/serde ) from 1.0.112 to 1.0.118.
- [Release notes](https://github.com/serde-rs/serde/releases )
- [Commits](https://github.com/serde-rs/serde/compare/v1.0.112...v1.0.118 )
Signed-off-by: dependabot[bot] <support@github.com>
* [auto-commit] Update all Cargo lock files
* Remove serum-dex pinning
* blind commit!
Co-authored-by: dependabot[bot] <49699333+dependabot[bot]@users.noreply.github.com>
Co-authored-by: dependabot-buildkite <dependabot-buildkite@noreply.solana.com>
Co-authored-by: Ryo Onodera <ryoqun@gmail.com>
2021-02-02 23:28:16 +09:00
Michael Vines
ff22091a98
Add StakeInstruction::Merge logging
2021-01-26 11:52:39 -08:00