Commit Graph

54 Commits

Author SHA1 Message Date
mergify[bot] 3e7563cdad
v2.0: RPC: rewards, return error if epoch_boundary_block is a lie (backport of #2758) (#2767)
RPC: rewards, return error if epoch_boundary_block is a lie (#2758)

* Return error if epoch_boundary_block is not actually the epoch boundary block

* Update rpc-client-api/src/custom_error.rs

Co-authored-by: Trent Nelson <490004+t-nelson@users.noreply.github.com>

---------

Co-authored-by: Trent Nelson <490004+t-nelson@users.noreply.github.com>
(cherry picked from commit 9a4b094ded)

Co-authored-by: Tyera <tyera@anza.xyz>
2024-08-30 12:47:29 -06:00
mergify[bot] f4d5731b25
v2.0: Refactor match and add test cases (backport of #2357) (#2359)
Refactor match and add test cases (#2357)

(cherry picked from commit 9c0a927058)

Co-authored-by: Tyera <tyera@anza.xyz>
2024-07-30 23:55:37 -06:00
mergify[bot] b5bc3b2381
v2.0: Remove deprecated Memcmp filter symbols (backport of #2050) (#2069)
Remove deprecated Memcmp filter symbols (#2050)

* Add test to demonstrate serialization and acceptable json inputs

* Remove custom serialization

* Unpub deprecated fields

* Remove deprecated, unused field

* Remove deprecated MemcmpEncodedBytes variant

* Remove deprecated error variants

* Add back custom deserialization to support missing 'encoding' field

* Update tests to demonstrate consistency and changes

* Add helper fns to use in rpc spl-token filter checks

* Update base64 syntax and remove allow-deprecated

(cherry picked from commit 3b3ffbb6c9)

Co-authored-by: Tyera <tyera@anza.xyz>
2024-07-10 07:20:45 +00:00
mergify[bot] 8c20f0b280
v2.0: Remove rpc- and pubsub-client version querying (backport of #2045) (#2052)
Remove rpc- and pubsub-client version querying (#2045)

* Remove filter mapping

* Remove unused internal module

* Remove unused pubsub-client stuff

* Remove unused RpcClient encoding maping, node_version

(cherry picked from commit 69d2eb8da8)

Co-authored-by: Tyera <tyera@anza.xyz>
2024-07-10 03:07:07 +00:00
mergify[bot] f653d86e23
v2.0: Remove get_stake_activation methods from RpcClient (backport of #2036) (#2044)
Remove get_stake_activation methods from RpcClient (#2036)

* Remove dangling JsonRpcRequestProcessor method

* Remove get_stake_activation methods from RpcClient

* Remove getStakeActivation from mock_sender

* Remove unused rpc response type

(cherry picked from commit 30791818e0)

Co-authored-by: Tyera <tyera@anza.xyz>
2024-07-08 18:14:36 -06:00
mergify[bot] e24b410429
v2.0: Clean up disable_fees_sysvar feature (backport of #2003) (#2043)
Clean up disable_fees_sysvar feature (#2003)

* Clean up disable_fees_sysvar

* Remove bank fees test

* Remove unused rpc response types

* Fixup sysvar_cache tests

* Remove fees-sysvar from bootstrap_validator_stake_lamports; no longer included

* Update account counts, since fees no longer touched

* Update bank hashes in test, since fees sysvar is not populated

* Remove test case passing fees sysvar as account

(cherry picked from commit 1c34908d03)

Co-authored-by: Tyera <tyera@anza.xyz>
2024-07-08 18:14:05 -06:00
mergify[bot] 0b2e904852
v2.0: Deprecate RpcRequest::GetStakeActivation (backport of #2005) (#2013)
Deprecate RpcRequest::GetStakeActivation (#2005)

* Correct deprecation note

* Deprecate rpc-client-api request

(cherry picked from commit 0deb6fb3f2)

Co-authored-by: Tyera <tyera@anza.xyz>
2024-07-08 10:36:06 -06:00
mergify[bot] 9fd1572e61
v2.0: Remove deprecated_config module (backport of #1951) (#1957)
Remove deprecated_config module (#1951)

(cherry picked from commit 00ee0acba3)

Co-authored-by: Tyera <tyera@anza.xyz>
2024-07-01 23:59:29 -06:00
mergify[bot] c14fab08c8
v2.0: Remove deprecated RpcClient methods (backport of #1899) (#1922)
Remove deprecated RpcClient methods (#1899)

* Remove deprecated RpcClient methods corresponding to #1809

* Remove internal handling for pre-v1.9.0 servers

* Remove unused import of deprecated_config module

* Remove request mapping (pre-v1.7.0)

* Remove dangling allow-deprecated tag

* Add line to changelog

* Remove deprecated RpcRequest variants

* Remove reprecated rpc-client-nonce-utils methods

* Remove deprecated TestValidator method

* Remove deprecated solana fees command

(cherry picked from commit 51af772e63)

Co-authored-by: Tyera <tyera@anza.xyz>
2024-07-01 10:55:39 -06:00
mergify[bot] 5a46b490c7
v2.0: Add since field to deprecation note (backport of #1905) (#1910)
Add since field to deprecation note (#1905)

Add  to deprecation note

(cherry picked from commit 70254b175e)

Co-authored-by: Tyera <tyera@anza.xyz>
2024-06-28 16:26:19 +00:00
mergify[bot] d40aa491a5
v2.0: Use num_partitions to find specific stake rewards in partitions (backport of #1677) (#1881)
Use num_partitions to find specific stake rewards in partitions (#1677)

* Add helper to find and filter rewards from a slot

* Check feature enabled for desired epoch

* Refactor existing rewards code to support vote-rewards after activation

* Append stake rewards from partitions

* Remove feature deactivation from TestValidator

* Improve comments

* Add comment about retaining feature activation slot logic

* Add custom error and use in getInflationReward

* Review nit

(cherry picked from commit 0496b06f89)

Co-authored-by: Tyera <tyera@anza.xyz>
2024-06-26 19:54:52 -06:00
Kirill Fomichev dbea20b12a
rpc: add more services to getClusterNodes (#1637)
* rpc: add tpu_forwards/tpu_forwards_quic to getClusterNodes

* add tvu

* order

* add tpu_vote

* add serve_repair

* fix tests

* fix name in tests

* remove tvu / repair quic
2024-06-14 12:19:15 -06:00
galactus a6b2283142
ScanConfig defaults no longer sort results (#1539) 2024-06-14 08:27:33 -04:00
galactus 10a09cd30d
Adding a variable sort_results to Rpc config while doing getProgramAccounts (#629) 2024-05-28 08:59:12 -04:00
Jon C 4f6dd3d91a
rpc-client: Print transaction logs in preflight error (#1387)
* rpc-client: Print transaction logs in preflight error

* Address feedback

* Update expected error message in program deploy test

* Use a semicolon before the data
2024-05-17 00:20:41 +00:00
Maxim 118cb0f146
Extend HTTP client to use reqwest with middleware (#1123) 2024-05-06 12:29:56 -06:00
Kevin Heavey 61a6f367ba
remove token-2022 dep from rpc-client-api (#941)
* move RpcFilterType::allows to solana-rpc as `filter_allows`

* update imports

* restore and deprecate allows() method

* use Account::valid_account_data from solana_inline_spl

* remove old import

* fix: use inline token_2022

* fix inline_spl import

* fix: another place where inline token_2022 is needed
2024-05-01 17:22:01 +00:00
Sammy Harris c207274e11
feat: include replaced blockhash in RPC simulation response (#380)
* feat: include replaced blockhash in RPC simulation response

* rename blockhash field to `replacement_blockhash`

* add tests to ensure replacement_blockhash is returning correctly

* fixed tests

* fixed tests again for real this time?
2024-04-06 17:27:10 +08:00
Tyera 9e9aa05b33
Rpc: add support for minimum context slot to `getBlocks(WithLimit)` endpoints (#191)
* Support min_context_slot field in getBlocksWithLimit input

* Use min_context_slot in get_blocks_with_limit

* Support min_context_slot field in getBlocks input

* Use min_context_slot in get_blocks
2024-03-11 23:59:18 -06:00
Joe C 171c58c5c0
RPC: Add inner instructions to simulate transaction response (#34313)
* rpc: add optional `innerInstructions: bool` arg to `simulateTransaction`

* bank: enable cpi recording in simulate

* sdk: move `InnerInstructions` into SDK from accounts DB

* bank: return inner instructions from simulate tx

* rpc: return inner instructions from simulate tx

* rpc: simulate tx: add `jsonParsed` support for inner instructions

* accounts db: add deprecated attribute to re-exported inner instructions

* rpc: de-dupe inner instruction mapping

* update deprecated comment

Co-authored-by: Tyera <teulberg@gmail.com>

---------

Co-authored-by: Tyera <teulberg@gmail.com>
2023-12-16 12:49:22 +00:00
Alexander Meißner 9e703f85de
Upgrades Rust to 1.72.0 & nightly-2023-08-25 (#32961)
* allow pedantic invalid cast lint

* allow lint with false-positive triggered by `test-case` crate

* nightly `fmt` correction

* adapt to rust layout changes

* remove dubious test

* Use transmute instead of pointer cast and de/ref when check_aligned is false.

* Renames clippy::integer_arithmetic to clippy::arithmetic_side_effects.

* bump rust nightly to 2023-08-25

* Upgrades Rust to 1.72.0

---------

Co-authored-by: Trent Nelson <trent@solana.com>
2023-09-01 07:26:13 +00:00
behzad nouri 33bde55bbd
adds tpu_quic field to RpcContactInfo (#31310) 2023-04-22 20:18:58 +00:00
Yihau Chen df3ef111f7
chore: workspace inheritance (#29893)
* introduce workspace.package

* introduce workspace.dependencies

* read version from root cargo.toml

* pass check when version = { workspace = true }

* don't bump version when version = { workspace = true }

* including workspace Cargo.toml when bump version

* programs/sbf use workspace inheritance

* fix increasing cargo version ignore program/sbf/Cargo.toml
2023-02-23 22:01:54 +08:00
Michael Vines 5136ed3448
Update homepage value for all crates (#30444) 2023-02-23 02:20:18 +00:00
Brooks febaf36e6d
Apply clippy fixes for future rust upgrade (#30363) 2023-02-16 16:12:51 +00:00
Athar Mohammad 78f9d8b66d
Fix camelCase response for RpcPrioritizationFee (#30162) 2023-02-07 13:42:58 -07:00
dependabot[bot] 232e252014
Bump serde from 1.0.144 to 1.0.152 (#29696)
Signed-off-by: dependabot[bot] <support@github.com>
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: Tyera <tyera@solana.com>
2023-02-01 16:27:17 -07:00
Steven Luscher a2cf25153f
Fuck this whole web3.js thing (#30062) 2023-02-01 14:34:23 -08:00
Will Hickey 04a6a631bc
Bump version to v1.16 (#30028) 2023-01-31 17:48:33 -06:00
joeaba a12bf8c003
Update maintainers references (#29997)
* update maintainers references

* chore: update maintainers reference
2023-01-31 08:07:13 -05:00
Tyera e39153df51
Add Memcmp filter constructor and deprecate fields (#29923)
* Deprecate Memcmp inner fields

* Add Memcmp::new

* Replace some literal construction

* Add convert_to_raw_bytes method and use

* Make convert_to_raw_bytes fallible

* Allow literal matches for complex cases
2023-01-26 14:50:15 -07:00
Yihau Chen 9193b4221d
Revert "chore: workspace inheritance (#29509)" (#29892)
This reverts commit a67d239dde.
2023-01-25 15:50:41 +08:00
Yihau Chen a67d239dde
chore: workspace inheritance (#29509)
* introduce workspace.package

* introduce workspace.dependencies

* read version from root cargo.toml

* pass check when version = { workspace = true }

* don't bump version when version = { workspace = true }

* including workspace Cargo.toml when bump version

* programs/sbf use workspace inheritance

* fix increasing cargo version ignore program/sbf/Cargo.toml
2023-01-25 13:59:59 +08:00
Illia Bobyr 6e4ecc6758
RPC getPerformanceSamples: Add `numNonVoteTransaction` (#29388)
Allow interested parties to see both total and non-vote transaction
counts in each performance sample.

Fixes https://github.com/solana-labs/solana/issues/29159
2023-01-18 00:22:47 -08:00
dependabot[bot] fadf027851
Bump semver from 1.0.14 to 1.0.16 (#29645)
* Bump semver from 1.0.14 to 1.0.16

Bumps [semver](https://github.com/dtolnay/semver) from 1.0.14 to 1.0.16.
- [Release notes](https://github.com/dtolnay/semver/releases)
- [Commits](https://github.com/dtolnay/semver/compare/1.0.14...1.0.16)

---
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

Signed-off-by: dependabot[bot] <support@github.com>
Co-authored-by: dependabot[bot] <49699333+dependabot[bot]@users.noreply.github.com>
Co-authored-by: dependabot-buildkite <dependabot-buildkite@noreply.solana.com>
2023-01-11 10:07:58 -07:00
Pires 8db1f53fe7
Add pubsub address to RpcContactInfo (#29165)
* rpc: add pubsub address to RpcContactInfo

* cli: add pubsub endpoint to gossip node info

* dashboard: add pubsub endpoint

* add missing pubsub info test_rpc_get_cluster_nodes
2023-01-08 22:25:56 -07:00
Tyera e0d2a40d85
Add rust client support for getRecentPrioritizationFees (#29558) 2023-01-06 23:04:34 -07:00
Tyera c479a6409a
Fix TransactionPrecompileVerification RPC error (#29490) 2023-01-04 12:46:13 -07:00
behzad nouri 9524c9dbff patches errors from clippy::uninlined_format_args
https://rust-lang.github.io/rust-clippy/master/index.html#uninlined_format_args
2022-12-06 19:32:15 +00:00
hanako mumei 015784ad07 update to spl-token-2022 0.5.0
* support CpiGuard and PermanentDelegate extensions in transaction-status and account-decoder
* update transaction-status and account-decoder to new ConfidentialTransfer interfaces
2022-11-28 11:30:41 -08:00
K-anon e8c8235474
Get Index Key Size RPC Support (#28383)
Co-authored-by: K-anon <IntokuSatori@users.noreply.github.com>
2022-11-16 20:39:11 -07:00
Tyera Eulberg b18ef88c40
Fix client get_program_accounts_with_config calls with context (#28772)
* Move OptionalContext to solana-rpc-client-api

* Add helper function

* Add failing test

* Support OptionalContext in RpcClient::get_program_accounts_with_config
2022-11-16 14:35:35 -07:00
Tyera Eulberg 7be8af5f40
Fix RpcClient MemCmp filter version mapping (#28499)
* Add VersionReq struct to handle multiple version checks

* Use VersionReq to fix MemCmp filter breakage

* Simplify if case
2022-10-20 19:41:28 -06:00
Justin Starry db37d6b2ec
RPC: Improve unsupported transaction error message (#28249) 2022-10-06 17:12:56 +08:00
Michael Vines df5f9f698f Surface the getVoteAccounts.epochCredits max-length constant in rpc-client-api 2022-09-26 21:58:19 -07:00
dependabot[bot] 2f24a357b6
chore: bump reqwest from 0.11.11 to 0.11.12 (#28003)
* chore: bump reqwest from 0.11.11 to 0.11.12

Bumps [reqwest](https://github.com/seanmonstar/reqwest) from 0.11.11 to 0.11.12.
- [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.11...v0.11.12)

---
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

Signed-off-by: dependabot[bot] <support@github.com>
Co-authored-by: dependabot[bot] <49699333+dependabot[bot]@users.noreply.github.com>
Co-authored-by: dependabot-buildkite <dependabot-buildkite@noreply.solana.com>
2022-09-23 10:09:27 -06:00
dependabot[bot] 9ba9d057cd
chore: bump semver from 1.0.13 to 1.0.14 (#27971)
* chore: bump semver from 1.0.13 to 1.0.14

Bumps [semver](https://github.com/dtolnay/semver) from 1.0.13 to 1.0.14.
- [Release notes](https://github.com/dtolnay/semver/releases)
- [Commits](https://github.com/dtolnay/semver/compare/1.0.13...1.0.14)

---
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

Signed-off-by: dependabot[bot] <support@github.com>
Co-authored-by: dependabot[bot] <49699333+dependabot[bot]@users.noreply.github.com>
Co-authored-by: dependabot-buildkite <dependabot-buildkite@noreply.solana.com>
2022-09-22 18:15:25 -06:00
behzad nouri 9a57c64f21
patches clippy errors from new rust nightly release (#27996) 2022-09-22 22:23:03 +00:00
steviez 0a0d31e5fb
Add missing rootSlot documentation (#27709) 2022-09-22 14:59:31 -05:00
Will Hickey c0e4379f43
Whickey/version v1.15 (#27739)
* Bump version to v1.13.0
* Bump version to v1.14.0
* Bump version to v1.15.0
2022-09-13 09:06:15 -05:00