Commit Graph

1062 Commits

Author SHA1 Message Date
mergify[bot] eaa3a811a3
v2.0: Deprecate RpcClient::get_stake_activation (backport of #1895) (#1925)
Deprecate RpcClient::get_stake_activation (#1895)

* Deprecate RpcClient::get_stake_activation

* Fixup redelegation test

(cherry picked from commit 114041c46a)

Co-authored-by: Tyera <tyera@anza.xyz>
2024-07-01 10:56:06 -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
Lucas Ste 437a6b1c92
Verify elf locally for write buffer cli command (#1794)
Verify elf locally for write buffer command
2024-06-21 15:31:32 -03:00
Lucas Ste 8b8ddcbb84
Verify elf with active feature set before attempting deployment (#1654)
Co-authored-by: Jon C <me@jonc.dev>
2024-06-17 18:25:25 -03:00
galactus a6b2283142
ScanConfig defaults no longer sort results (#1539) 2024-06-14 08:27:33 -04:00
ryleung-solana ed500b5afc
Solana ping tpu client (#923)
Add support for using the TPU client in solana-ping to better isolate the effect of the transport layer on ping performance.
2024-06-05 03:55:08 +00:00
Joe C 62eb4cc068
Add Compute Budget Crate (#1121) 2024-06-01 01:38:19 -05:00
Yihau Chen f2f1a22ccc
chore: remove unused clippy attributes, unnecessary_wraps (#1514)
remove clippy unnecessary_wraps
2024-05-29 11:09:29 +00:00
Yihau Chen a5fa713a59
chore: remove unused clippy attributes, redundant_closure (#1513)
remove clippy redundant_closure
2024-05-29 11:07:47 +00: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
Yihau Chen ec9bd79849
clippy: fix legacy_numeric_constants (#1314)
clippy: legacy_numeric_constants
2024-05-15 11:29:19 +08:00
Illia Bobyr ca6fc5135e
cli::cluster_query: Remove `allow(clippy::arithmetic_side_effects)` (#1167) 2024-05-10 13:04:33 -07:00
Justin Starry d8dd61d0fc
refactor: split cli fn `do_process_program_write_and_deploy` into two functions (#1249) 2024-05-09 09:31:28 +08:00
Justin Starry bfd16fa36b
refactor: remove unused partial init from cli deploy (#1149)
* refactor: remove unused partial init from cli deploy

* feedback
2024-05-08 18:44:37 +08:00
Illia Bobyr 8f694bacd2
cli::program: Remove `allow(clippy::arithmetic_side_effects)` (#1168) 2024-05-07 13:02:51 -07:00
Illia Bobyr c5aea86b10
cli: program: Extract `auto_extend` logic into a function (#1164)
`do_process_program_upgrade()` is already huge.  It is better to put
sufficiently self-contained chunks of logic into individual functions.

Also, restructured the "staircase" pattern using early exits.  It seems
to be more readable this way.
2024-05-06 21:34:08 -07:00
Emil Kuban fa55053e7a
Fix: solana stakes <pubkey> clean handling (#797)
* Fix: solana stakes <pubkey> clean handling

* multiple rpc call to single call

* multiple rpc call to single call

* review fixes

* review fixes
2024-05-06 20:31:43 +00:00
Illia Bobyr 18221c0e29
cli::tests: program: Clarify all `unwrap_err()`. (#1166)
`unwrap_err()` does not contain a descriptive message for the case when
it succeeds.  It may help someone debugging the test, in particular they
will see a short explanation without looking at the failed test.

Also, in a number of cases, `unwrap_err()` result was not checked,
creating a possibility for false positives.  As the generated error
might be different from the one expected by the test author.
2024-05-03 14:55:41 -07:00
Illia Bobyr 448d0ab00b
cli/tests: program_extend_program: Check for a specific error (#1165)
There are many errors that could be generated, creating a possibility for false
positives.  We actually observed it in this test.
2024-05-03 10:39:08 -07:00
Brooks fbbae8a59a
clippy: clone_from() (#1177)
```
error: assigning the result of `Clone::clone()` may be inefficient
   --> bucket_map/src/bucket.rs:979:17
    |
979 |                 hashed = hashed_raw.clone();
    |                 ^^^^^^^^^^^^^^^^^^^^^^^^^^^ help: use `clone_from()`: `hashed.clone_from(&hashed_raw)`
    |
    = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#assigning_clones
    = note: `-D clippy::assigning-clones` implied by `-D warnings`
    = help: to override `-D warnings` add `#[allow(clippy::assigning_clones)]`
```
2024-05-03 15:21:10 +00:00
Illia Bobyr 7daa369344
cli::feature: Remove `allow(clippy::arithmetic_side_effects)` (#1040) 2024-05-02 22:42:58 -07:00
sakridge e2f361e9ec
Add get-recent-prioritization-fees command to cli (#805) 2024-04-30 17:56:08 +02:00
Tyera f255b31bdc
Cli: flip no_extend to auto_extend internally (#1119)
* Flip no_extend to auto_extend

* Apply suggestions from code review

Co-authored-by: Joe C <joecaulfield29@yahoo.com>

---------

Co-authored-by: Joe C <joecaulfield29@yahoo.com>
2024-04-30 07:06:34 +00:00
Tyera 680946c77a
Fix test_cli_program_extend_program (#1115)
* Unignore test

* Don't extend program accounts by default on test that expects them not to
2024-04-29 19:27:30 -06:00
Tyera 170f8ff08e
Ignore test_cli_program_extend_program (#1113) 2024-04-29 16:59:32 -06:00
Nagaprasad V R 23905c08b8
CLI: Auto-extend program accounts by default (#791)
* add checks for program data account overflow during upgrade and add --auto-extend-program flag to solana program deploy command

* remove logs

* cleanup tests

* automatically extend program data account and add a --no-auto-extend-program falg

* change comments in do_process_program_upgrade

* simplify  comments in do_process_program_upgrade

* resolve comments

* cleanup

* change error messages

* resolve comments

* Fix after rebase

* Fix after rebase

* fix cargo clippy

* cli: add tests for auto-extend

---------

Co-authored-by: Joe Caulfield <joe.caulfield@anza.xyz>
2024-04-24 06:51:23 +00:00
Illia Bobyr 115a269a49
cli::program_v4: Remove `allow(clippy::arithmetic_side_effects)` (#986) 2024-04-23 20:55:00 -07:00
Jon C 550f8060bd
cli: Use --use-rpc flag correctly during program deployments (#1008)
cli: Use --use-rpc flag correctly
2024-04-24 00:54:47 +02:00
Jon C c164d6fa0f
cli: Update help text for deploy's `--use-rpc` (#1001) 2024-04-23 23:03:49 +02:00
Illia Bobyr b8cc66e878
cli::test_utils: `wait_n_slots` should wait `n` slots (#987) 2024-04-23 11:07:40 -07:00
Jon C 6d740b3675
cli: Add `--use-rpc` flag to program deploy and write-buffer (#928)
* cli: Add `--use-rpc` flag to program deploy and write-buffer

* Fix deploy command in transaction-dos

* Add CHANGELOG message
2024-04-23 13:27:47 +02:00
Illia Bobyr af4759e95d
cli::stake: Remove `allow(clippy::arithmetic_side_effects)` (#934) 2024-04-22 15:52:48 -07:00
Emil Kuban 06dc262de0
cli: Warn on sizes above 10MB during `solana rent` (#922)
* CliError

* review fix
2024-04-22 15:41:34 +02:00
Illia Bobyr ff79531201
cli::spend_utils: Remove `allow(clippy::arithmetic_side_effects)` (#937) 2024-04-20 18:13:15 -07:00
Illia Bobyr 6aacbf369e
cli::test_utils: Remove `allow(clippy::arithmetic_side_effects)` (#933) 2024-04-19 16:41:08 -07:00
Illia Bobyr 201a7395a3
cli::validator_info: Remove `allow(clippy::arithmetic_side_effects)` (#932) 2024-04-19 16:14:39 -07:00
Illia Bobyr e1deff5eb3
cli::vote: Remove `allow(clippy::arithmetic_side_effects)` (#910) 2024-04-19 11:16:48 -07:00
Justin Starry 0056c5481f
cli: add additional buffer validation checks for deploys (#877)
cli: add additional buffer validation checks
2024-04-19 21:34:43 +08:00
Justin Starry ad316fdbf7
refactor: cli deploy always uses upgradeable loader (#793) 2024-04-18 11:26:15 +08:00
Illia Bobyr 22f80c93a1
cli::checks: Remove `allow(clippy::arithmetic_side_effects)` (#834)
Just a single missing case, and `arithmetic_side_effects` can now be re-enabled for this module again.
2024-04-17 19:23:10 -07:00
sakridge 37fbd3349c
Remove duplicated code with a CliCommandInfo constructor (#806)
Setting no signers is the most common case to construct a
CliCommandInfo struct, make a constructor function to do that
and reduce code.
2024-04-17 19:34:17 +02:00
Jon C 97c56ac0e2
cli: Introduce `WithComputeUnitConfig` for specifying more than compute unit price (#850)
cli: Introduce `ComputeUnitConfig` for specifying more than price
2024-04-17 12:40:07 +02:00
Jon C 3bb7ab7360
cli: Update `simulate_and_update_compute_unit_limit` to take `Message` (#839)
Update `simulate_and_update_compute_unit_limit` to take `Message`
2024-04-17 12:36:58 +02:00
Max Kaplan 6b52ca29c1
cli: adding prio fee support to validator-info (#582) 2024-04-17 12:36:25 +02:00
Jon C 3476775aaf
cli: Move all compute budget code into compute_budget.rs (#826)
* Refactor `simulate_and_update_compute_unit_limit`

* Move `WithComputeUnitPrice` to `compute_budget`

* Move `set_compute_budget_ixs_if_needed`
2024-04-16 18:25:58 +02:00
Illia Bobyr dabcc39819
cli: Move `allow(clippy::arithmetic_side_effects)` into modules (#758)
The rest of the codebase has `clippy::arithmetic_side_effects` enabled.
While CLI is not as critical as the rest of the validator code base, it
seems nice to be precise about the arithmetic operations, and clippy
helps with that if `arithmetic_side_effects` is enabled.

A blanket disable at the module level is suboptimal.  As we have a lot
of operations already written, that generate warnings under
`arithmetic_side_effects`, the first step is to move the lint control
into individual modules, that we can then inspect one by one.
2024-04-11 22:01:53 -07:00
Tyera 9706a64646
Fix typo (#745) 2024-04-10 22:52:51 -06:00
Joe C caa18a528f
cli tests: correct program data account test check (#660) 2024-04-08 14:52:52 -05:00
Jon C 2643ae85c3
cli: Customize max sign attempts for deploy and write-buffer (#526)
* cli: Customize max sign attempts for deploy and write-buffer

* Update changelog

* Improve help message

* Fixup line break
2024-04-02 15:29:38 +02:00
Justin Starry 2ee606da4f
Add `--with-compute-unit-price` to cli program deploy commands (#364)
* add set compute units arg for program deploy

* update master changes

* remove duplicates

* fixes and tests

* remove extra lines

* feedback

* Use simulation to determine compute units consumed

* feedback

---------

Co-authored-by: NagaprasadVr <nagaprasadvr246@gmail.com>
2024-03-22 16:48:52 +00:00