Tyera Eulberg
fc6b617477
Include tls feature ( #20360 )
2021-10-01 01:55:11 +00:00
Brian Anderson
082d5dc5b2
Add more docs for RpcClient ( #19771 )
...
* Add more docs for RpcClient
* Use custom mocks in rpc_client examples
* Move create_rpc_client_mocks into rpc_client module
Signed-off-by: Brian Anderson <andersrb@gmail.com>
* Update client/src/rpc_client.rs
Co-authored-by: Tyera Eulberg <teulberg@gmail.com>
* Update RpcClient docs per review feedback
* Consistently link 'commitment level' in RpcClient docs
Co-authored-by: Tyera Eulberg <teulberg@gmail.com>
2021-09-27 14:59:25 -06:00
Kirill Fomichev
ac79ae6848
Rpc: use rust convenient methods
2021-09-27 11:05:39 -07:00
Kirill Fomichev
9542bae56e
Rpc: remove not required clone
2021-09-26 09:17:21 -07:00
Jon Cinque
e9b066d497
client: Add retry logic on Pubsub 429s ( #19990 )
2021-09-18 12:40:43 +02:00
Pavel Strakhov
65227f44dc
Optimize RPC pubsub for multiple clients with the same subscription ( #18943 )
...
* reimplement rpc pubsub with a broadcast queue
* update tests for new pubsub implementation
* fix: fix review suggestions
* chore(rpc): add additional pubsub metrics
* integrate max subscriptions check into SubscriptionTracker to reduce locking
* separate subscription control from tracker
* limit memory usage of items in pubsub broadcast queue, improve error handling
* add more pubsub metrics
* add final count metrics to pubsub
* add metric for total number of subscriptions
* fix small review suggestions
* remove by_params from SubscriptionTracker and add node_progress_watchers map instead
* add subscription tracker tests
* add metrics for number of pubsub notifications as a counter
* ignore clippy lint in TokenCounter
* fix underflow in token counter
* reduce queue capacity in pubsub tests
* fix(rpc): fix test timeouts
* fix race in account subscription test
* Add RpcSubscriptions::new_for_tests
Co-authored-by: Pavel Strakhov <p.strakhov@iconic.vc>
Co-authored-by: Nikita Podoliako <n.podoliako@zubr.io>
Co-authored-by: Tyera Eulberg <tyera@solana.com>
2021-09-17 13:40:14 -06:00
sakridge
c8f76b8bd0
Fix tpu service fanout ( #19944 )
2021-09-17 01:01:56 +02:00
dependabot[bot]
68da1909de
chore: bump serde_json from 1.0.67 to 1.0.68 ( #19942 )
...
* chore: bump serde_json from 1.0.67 to 1.0.68
Bumps [serde_json](https://github.com/serde-rs/json ) from 1.0.67 to 1.0.68.
- [Release notes](https://github.com/serde-rs/json/releases )
- [Commits](https://github.com/serde-rs/json/compare/v1.0.67...v1.0.68 )
---
updated-dependencies:
- dependency-name: serde_json
dependency-type: direct:production
update-type: version-update:semver-patch
...
Signed-off-by: dependabot[bot] <support@github.com>
* [auto-commit] Update all Cargo lock files
Co-authored-by: dependabot[bot] <49699333+dependabot[bot]@users.noreply.github.com>
Co-authored-by: dependabot-buildkite <dependabot-buildkite@noreply.solana.com>
2021-09-16 20:23:25 +00:00
Giles Cope
c3a610374a
unused deps
2021-09-11 14:33:53 -07:00
Michael Vines
21f4606212
Add RpcClient::get_transport_stats()
2021-09-09 20:11:15 -07:00
Michael Vines
b83284c9f6
TpuClient now uses the processed slot to seed its leader schedule cache
2021-09-08 16:51:25 -05:00
Michael Vines
007fb3abe5
Improve comments, error handling, and retry delay handling
2021-09-08 10:51:55 -05:00
Michael Vines
ae43ca3bfb
Add RpcClient::get_multiple_accounts_with_config()
2021-09-03 22:41:38 +00:00
Brooks Prumo
38e1f7c4ba
Add backwards compatibility support to get_highest_snapshot_slot() ( #19591 )
...
Co-authored-by: Michael Vines <mvines@gmail.com>
2021-09-02 20:47:35 -05:00
Brooks Prumo
8ac94b2cf4
Add Incremental Snapshot support to RPC ( #19559 )
...
#### Problem
There's no way to get incremental snapshot information from RPC.
#### Summary of Changes
- Add new RPC method, `getHighestSnapshotSlot` that returns a `SnapshotSlotInfo`, which contains both the highest full snapshot slot, and the highest incremental snapshot slot _based on_ the full snapshot.
- Deprecate old RPC method, `getSnapshotSlot`
- Update API docs
Fixes #19579
2021-09-02 15:25:42 -05:00
dependabot[bot]
c21bf29ce7
chore: bump serde_json from 1.0.66 to 1.0.67 ( #19501 )
...
Bumps [serde_json](https://github.com/serde-rs/json ) from 1.0.66 to 1.0.67.
- [Release notes](https://github.com/serde-rs/json/releases )
- [Commits](https://github.com/serde-rs/json/compare/v1.0.66...v1.0.67 )
---
updated-dependencies:
- dependency-name: serde_json
dependency-type: direct:production
update-type: version-update:semver-patch
...
Signed-off-by: dependabot[bot] <support@github.com>
Co-authored-by: dependabot[bot] <49699333+dependabot[bot]@users.noreply.github.com>
2021-08-31 06:05:25 +00:00
dependabot[bot]
6a53ec28e0
chore: bump serde from 1.0.129 to 1.0.130 ( #19497 )
...
* chore: bump serde from 1.0.129 to 1.0.130
Bumps [serde](https://github.com/serde-rs/serde ) from 1.0.129 to 1.0.130.
- [Release notes](https://github.com/serde-rs/serde/releases )
- [Commits](https://github.com/serde-rs/serde/compare/v1.0.129...v1.0.130 )
---
updated-dependencies:
- dependency-name: serde
dependency-type: direct:production
update-type: version-update:semver-patch
...
Signed-off-by: dependabot[bot] <support@github.com>
* [auto-commit] Update all Cargo lock files
Co-authored-by: dependabot[bot] <49699333+dependabot[bot]@users.noreply.github.com>
Co-authored-by: dependabot-buildkite <you@example.com>
2021-08-30 18:19:34 +00:00
Jack May
f81bfc8462
Limit message encoding to base-64 ( #19468 )
2021-08-29 19:53:37 -07:00
Tyera Eulberg
7482861f4b
Add parameter to allow setting max-retries for SendTransaction rpc ( #19387 )
...
* Add parameter to cap rpc send retries for a tx
* Add parameter to docs
2021-08-24 22:44:13 -06:00
dependabot[bot]
46890ac197
chore: bump serde from 1.0.128 to 1.0.129 ( #19395 )
...
* chore: bump serde from 1.0.128 to 1.0.129
Bumps [serde](https://github.com/serde-rs/serde ) from 1.0.128 to 1.0.129.
- [Release notes](https://github.com/serde-rs/serde/releases )
- [Commits](https://github.com/serde-rs/serde/compare/v1.0.128...v1.0.129 )
---
updated-dependencies:
- dependency-name: serde
dependency-type: direct:production
update-type: version-update:semver-patch
...
Signed-off-by: dependabot[bot] <support@github.com>
* [auto-commit] Update all Cargo lock files
Co-authored-by: dependabot[bot] <49699333+dependabot[bot]@users.noreply.github.com>
Co-authored-by: dependabot-buildkite <you@example.com>
2021-08-24 12:32:30 -06:00
Brian Anderson
628ad58912
Document more RpcClient methods ( #19236 )
...
* Document more RpcClient methods
* Update client/src/rpc_client.rs
Co-authored-by: Tyera Eulberg <teulberg@gmail.com>
* Update RpcClient docs per feedback
* Address review feedback
Co-authored-by: Tyera Eulberg <teulberg@gmail.com>
2021-08-23 18:49:37 -06:00
Tyera Eulberg
cf3fc61821
Add backward compatibility for new RpcClient methods ( #19383 )
2021-08-24 00:09:00 +00:00
dependabot[bot]
aea9960c75
chore: bump serde from 1.0.127 to 1.0.128 ( #19370 )
...
* chore: bump serde from 1.0.127 to 1.0.128
Bumps [serde](https://github.com/serde-rs/serde ) from 1.0.127 to 1.0.128.
- [Release notes](https://github.com/serde-rs/serde/releases )
- [Commits](https://github.com/serde-rs/serde/compare/v1.0.127...v1.0.128 )
---
updated-dependencies:
- dependency-name: serde
dependency-type: direct:production
update-type: version-update:semver-patch
...
Signed-off-by: dependabot[bot] <support@github.com>
* [auto-commit] Update all Cargo lock files
Co-authored-by: dependabot[bot] <49699333+dependabot[bot]@users.noreply.github.com>
Co-authored-by: dependabot-buildkite <anatoly+githubjenkins@solana.io>
2021-08-23 09:33:34 -06:00
Justin Starry
c053df143f
RPC: add option to exclude accounts from get_supply ( #19270 )
2021-08-17 23:32:58 +00:00
dependabot[bot]
74cc2e5ffa
chore: bump tungstenite from 0.14.0 to 0.15.0 ( #19222 )
...
* chore: bump tungstenite from 0.14.0 to 0.15.0
Bumps [tungstenite](https://github.com/snapview/tungstenite-rs ) from 0.14.0 to 0.15.0.
- [Release notes](https://github.com/snapview/tungstenite-rs/releases )
- [Changelog](https://github.com/snapview/tungstenite-rs/blob/master/CHANGELOG.md )
- [Commits](https://github.com/snapview/tungstenite-rs/compare/v0.14.0...v0.15.0 )
---
updated-dependencies:
- dependency-name: tungstenite
dependency-type: direct:production
update-type: version-update:semver-minor
...
Signed-off-by: dependabot[bot] <support@github.com>
* [auto-commit] Update all Cargo lock files
* Update stream type
Co-authored-by: dependabot[bot] <49699333+dependabot[bot]@users.noreply.github.com>
Co-authored-by: dependabot-buildkite <anatoly+githubjenkins@solana.io>
Co-authored-by: Tyera Eulberg <tyera@solana.com>
2021-08-13 11:57:22 -06:00
Jack May
0b50bb2b20
Deprecate FeeCalculator returning APIs ( #19120 )
2021-08-13 09:08:20 -07:00
Tyera Eulberg
5970083b4d
Use last_valid_block_height in services and client apps ( #19163 )
...
* Add deprecated tag to Bank::get_blockhash_last_valid_slot
* Update SendTransactionService to use last_valid_block_height
* Update solana-tokens to use last_valid_block_height
* Remove dangling file
* Update solana program to use last_valid_block_height
* Update Banks crates to use last_valid_block_height
2021-08-11 01:04:00 -06:00
Brian Anderson
e4b66a5913
Fix deserialization of RPC errors in HttpSender ( #19110 )
...
Fixes #15576
2021-08-09 10:45:00 -07:00
Brian Anderson
b67ffab370
Add more API documentation for Rust RpcClient ( #19021 )
...
* Add doc links to Transaction API docs
* Add more RpcClient API docs
* Reflow some rpc_client docs
* Update client/src/rpc_client.rs
Co-authored-by: Tyera Eulberg <teulberg@gmail.com>
* Update client/src/rpc_client.rs
Co-authored-by: Tyera Eulberg <teulberg@gmail.com>
* Update client/src/rpc_client.rs
Co-authored-by: Tyera Eulberg <teulberg@gmail.com>
* Update sdk/src/transaction.rs
Co-authored-by: Tyera Eulberg <teulberg@gmail.com>
* Update RpcClient docs per review
Co-authored-by: Tyera Eulberg <teulberg@gmail.com>
2021-08-05 15:03:33 -06:00
dependabot[bot]
c16bf02448
chore: bump serde from 1.0.126 to 1.0.127 ( #19010 )
...
* chore: bump serde from 1.0.126 to 1.0.127
Bumps [serde](https://github.com/serde-rs/serde ) from 1.0.126 to 1.0.127.
- [Release notes](https://github.com/serde-rs/serde/releases )
- [Commits](https://github.com/serde-rs/serde/compare/v1.0.126...v1.0.127 )
---
updated-dependencies:
- dependency-name: serde
dependency-type: direct:production
update-type: version-update:semver-patch
...
Signed-off-by: dependabot[bot] <support@github.com>
* [auto-commit] Update all Cargo lock files
Co-authored-by: dependabot[bot] <49699333+dependabot[bot]@users.noreply.github.com>
Co-authored-by: dependabot-buildkite <you@example.com>
2021-08-02 21:16:34 +00:00
dependabot[bot]
5b2eada24b
chore: bump semver from 1.0.3 to 1.0.4 ( #19011 )
...
* chore: bump semver from 1.0.3 to 1.0.4
Bumps [semver](https://github.com/dtolnay/semver ) from 1.0.3 to 1.0.4.
- [Release notes](https://github.com/dtolnay/semver/releases )
- [Commits](https://github.com/dtolnay/semver/compare/1.0.3...1.0.4 )
---
updated-dependencies:
- dependency-name: semver
dependency-type: direct:production
update-type: version-update:semver-patch
...
Signed-off-by: dependabot[bot] <support@github.com>
* [auto-commit] Update all Cargo lock files
Co-authored-by: dependabot[bot] <49699333+dependabot[bot]@users.noreply.github.com>
Co-authored-by: dependabot-buildkite <dependabot-buildkite@noreply.solana.com>
2021-08-02 18:42:47 +00:00
Trent Nelson
21bc43ed58
nonce: Unify `NonceError` with `SystemError`
2021-07-30 14:47:14 -06:00
Brian Anderson
58f395257b
Fix serialization of parameters in RpcClient::get_block_production_with_config ( #18998 )
...
Params must be an array or null.
2021-07-30 20:20:33 +00:00
dependabot[bot]
fe1ee49807
chore: bump serde_json from 1.0.65 to 1.0.66 ( #18990 )
...
* chore: bump serde_json from 1.0.65 to 1.0.66
Bumps [serde_json](https://github.com/serde-rs/json ) from 1.0.65 to 1.0.66.
- [Release notes](https://github.com/serde-rs/json/releases )
- [Commits](https://github.com/serde-rs/json/compare/v1.0.65...v1.0.66 )
---
updated-dependencies:
- dependency-name: serde_json
dependency-type: direct:production
update-type: version-update:semver-patch
...
Signed-off-by: dependabot[bot] <support@github.com>
* [auto-commit] Update all Cargo lock files
Co-authored-by: dependabot[bot] <49699333+dependabot[bot]@users.noreply.github.com>
Co-authored-by: dependabot-buildkite <you@example.com>
2021-07-30 10:46:47 -06:00
dependabot[bot]
0cf52e2060
chore: bump serde_json from 1.0.64 to 1.0.65 ( #18968 )
...
* chore: bump serde_json from 1.0.64 to 1.0.65
Bumps [serde_json](https://github.com/serde-rs/json ) from 1.0.64 to 1.0.65.
- [Release notes](https://github.com/serde-rs/json/releases )
- [Commits](https://github.com/serde-rs/json/compare/v1.0.64...v1.0.65 )
---
updated-dependencies:
- dependency-name: serde_json
dependency-type: direct:production
update-type: version-update:semver-patch
...
Signed-off-by: dependabot[bot] <support@github.com>
* [auto-commit] Update all Cargo lock files
Co-authored-by: dependabot[bot] <49699333+dependabot[bot]@users.noreply.github.com>
Co-authored-by: dependabot-buildkite <dependabot-buildkite@noreply.solana.com>
2021-07-29 16:52:02 +00:00
Tyera Eulberg
8596db8f53
Bump jsonrpc crates and remove old tokio ( #18779 )
...
* Bump jsonrpc crates and replace old tokio
* Bump tokio
* getBlockTime
* getBlocks
* getBlocksWithLimit, getInflationReward
* getBlock
* getFirstAvailableBlock
* getTransaction
* getSignaturesForAddress
* getSignatureStatuses
* Remove superfluous runtime
2021-07-26 12:32:17 -06:00
Michael Vines
f264511585
RpcClient::send<T> now supports client-defined RPC methods via RpcRequest::Custom
2021-07-24 09:53:47 -07:00
Michael Vines
69f02af98e
Fix build
2021-07-20 12:02:10 -07:00
Brian Anderson
5dcfd7ce74
Add some docs for RpcClient and friends ( #18748 )
...
* Add some docs for RpcSender, HttpSender, MockSender
* Support SimulateTransaction in MockSender
* Add docs for RpcClient constructors
* Add some more RpcClient examples
* rustfmt
* Reflow docs in rpc_client and friends
2021-07-20 18:49:32 +00:00
Jack May
74539020b4
Transaction simulation includes cost ( #18715 )
2021-07-16 14:58:15 -07:00
Trent Nelson
bf90ea282a
rpc: more params for `GetVoteAccountsConfig`
2021-07-14 08:41:52 +00:00
Tyera Eulberg
8ad4ffdee5
Cli: expose last valid block height ( #18620 )
...
* Add Fees struct to client
* Add complete RpcClient::get_fees methods
* Switch cli to last_valid_block_height
2021-07-13 01:41:27 +00:00
Michael Vines
4098af3b5b
Record vote account commission with voting/staking rewards and surface in RPC
2021-07-12 15:09:44 -07:00
dependabot[bot]
4a5ec51007
chore: bump tungstenite from 0.13.0 to 0.14.0 ( #18602 )
...
* chore: bump tungstenite from 0.13.0 to 0.14.0
Bumps [tungstenite](https://github.com/snapview/tungstenite-rs ) from 0.13.0 to 0.14.0.
- [Release notes](https://github.com/snapview/tungstenite-rs/releases )
- [Changelog](https://github.com/snapview/tungstenite-rs/blob/master/CHANGELOG.md )
- [Commits](https://github.com/snapview/tungstenite-rs/compare/v0.13.0...v0.14.0 )
---
updated-dependencies:
- dependency-name: tungstenite
dependency-type: direct:production
update-type: version-update:semver-minor
...
Signed-off-by: dependabot[bot] <support@github.com>
* Update all Cargo.lock files
Co-authored-by: dependabot[bot] <49699333+dependabot[bot]@users.noreply.github.com>
Co-authored-by: Tyera Eulberg <tyera@solana.com>
2021-07-12 18:05:08 +00:00
hrls
70234dfdf4
refactor(rpc_client): const number of retries for send and confirm transaction ( #18390 )
...
* refactor(rpc_client): simplfy send and confirm transaction flow
* chore: configurable num of retries for send and confirm
2021-07-05 09:14:48 -07:00
Justin Starry
d5961e9d9f
Reject transactions with extra signatures ( #18306 )
...
* Reject transactions with extra signatures
* fix tests
* fix check
* fix check
* tx method
* fix checks
2021-07-01 18:06:59 +00:00
dependabot[bot]
05924423c2
chore: bump reqwest from 0.11.2 to 0.11.4 ( #18362 )
...
* chore: bump reqwest from 0.11.2 to 0.11.4
Bumps [reqwest](https://github.com/seanmonstar/reqwest ) from 0.11.2 to 0.11.4.
- [Release notes](https://github.com/seanmonstar/reqwest/releases )
- [Changelog](https://github.com/seanmonstar/reqwest/blob/master/CHANGELOG.md )
- [Commits](https://github.com/seanmonstar/reqwest/compare/v0.11.2...v0.11.4 )
---
updated-dependencies:
- dependency-name: reqwest
dependency-type: direct:production
update-type: version-update:semver-patch
...
Signed-off-by: dependabot[bot] <support@github.com>
* [auto-commit] Update all Cargo lock files
Co-authored-by: dependabot[bot] <49699333+dependabot[bot]@users.noreply.github.com>
Co-authored-by: dependabot-buildkite <you@example.com>
2021-07-01 09:59:30 -06:00
dependabot[bot]
644632fc8a
chore: bump assert_matches from 1.3.0 to 1.5.0 ( #18358 )
...
* chore: bump assert_matches from 1.3.0 to 1.5.0
Bumps [assert_matches](https://github.com/murarth/assert_matches ) from 1.3.0 to 1.5.0.
- [Release notes](https://github.com/murarth/assert_matches/releases )
- [Commits](https://github.com/murarth/assert_matches/commits )
---
updated-dependencies:
- dependency-name: assert_matches
dependency-type: direct:production
update-type: version-update:semver-minor
...
Signed-off-by: dependabot[bot] <support@github.com>
* [auto-commit] Update all Cargo lock files
Co-authored-by: dependabot[bot] <49699333+dependabot[bot]@users.noreply.github.com>
Co-authored-by: dependabot-buildkite <dependabot-buildkite@noreply.solana.com>
2021-07-01 09:59:01 -06:00
dependabot[bot]
78968d132f
chore: bump log from 0.4.11 to 0.4.14 ( #18323 )
...
* chore: bump log from 0.4.11 to 0.4.14
Bumps [log](https://github.com/rust-lang/log ) from 0.4.11 to 0.4.14.
- [Release notes](https://github.com/rust-lang/log/releases )
- [Changelog](https://github.com/rust-lang/log/blob/master/CHANGELOG.md )
- [Commits](https://github.com/rust-lang/log/compare/0.4.11...0.4.14 )
---
updated-dependencies:
- dependency-name: log
dependency-type: direct:production
update-type: version-update:semver-patch
...
Signed-off-by: dependabot[bot] <support@github.com>
* Make version consistent
Co-authored-by: dependabot[bot] <49699333+dependabot[bot]@users.noreply.github.com>
Co-authored-by: Tyera Eulberg <tyera@solana.com>
2021-06-30 18:32:01 +00:00
Tyera Eulberg
9d4428d3d8
Use timeout to allow RpcClient to retry initial transaction confirmation ( #18311 )
...
* Tidying: relocate function
* Use proper helper method for RpcClient commitment
* Add RpcClientConfig
* Add configurable confirm_transaction_initial_timeout
* Use default 5s timeout for initial tx confirmation
2021-06-30 01:08:45 +00:00