* rpc-client: Print transaction logs in preflight error
* Address feedback
* Update expected error message in program deploy test
* Use a semicolon before the data
`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.
```
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)]`
```
* 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>
* 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>
* 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>
* cli: program set-upgrade-authority
Add --sign-only flag
* Apply suggestions from code review
This fixes nits.
It modifies tests: it will sign offline with `newAuthority` keypair instead of fee payer. Then it reuses the signature in the next command.
Co-authored-by: Jon C <me@jonc.dev>
* cli/tests/program: fix tests
* cli/src/program: delete unsed import
* fix to pass ci cargo-clippy-nightly
---------
Co-authored-by: Jon C <me@jonc.dev>
* cli: Deploy the appropriate length program
* Extend the extend-program test for new default
* Add CHANGELOG entry
* Update docs, and include `extend`
* Update CHANGELOG.md
Co-authored-by: Tyera <teulberg@gmail.com>
---------
Co-authored-by: Tyera <teulberg@gmail.com>
* use PROGRAM_OWNER + program data for account executable
mock account data with executable_meta in precompiled program and update
test_bank_hash_consistency test
pr: return const slice and add comments
pr: use ReadableAccount
use const to get rid of magic number
add featuregate disable_bpf_loader_instructions to disable bpf loader management instructions, and deprecate_executable_meta_update_in_bpf_loader to deprecate executable flag update in bpf loader
deprecate usage of executable in Account
fix a test
fix sbp bench
fix sbf program tests
add feature gate to account and borrowed account apis
fix tests
more test fixes
* restore bpf_loader v2 tests
---------
Co-authored-by: HaoranYi <haoran.yi@solana.com>
* cli: program upgrade with offline signing (--sign-only mode)
* ditch universal NullSigner approach as overly complex
* rearrange some code to make it more coherent, fix typos
* apply clippy suggestions to simplify code
* review pass
* adjust brokens (due to rebase onto refactored structures) doc links
* fix linter complaint in doc formatting
* remove rebase artifacts
---------
Co-authored-by: norwnd <norwnd>
* Add feature gate
* Add helper fn
* Require split destination to be rent-exempt if it is active
* Update cli to prefund split accounts
* cli: require rent param with sign-only
* Update tokens to prefund split accounts
* Update split tests with sysvar accounts
* Fix test_split_to_account_with_rent_exempt_reserve
* Fix test_staked_split_destination_minimum_balance
* Fix test_split_more_than_staked
* Fix test_split_minimum_stake_delegation and remove misleading StakeState::Initialized case
* Fix test_split_from_larger_sized_account
* Add test for pre-/post-activation behavior splitting some or all of stake account
* Assert active stake
* Fix runtime test
* Ignore stake-pool downstream
* Review comments
* Feature gate sysvar reads
* 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>
* cli: use `getVoteAccounts` for delegate-stake current voter check
* cli: skip delegate-stake current voter check for unstaked voters
* cli: refactor delegate-stake current voter check
* Relax authority signer check for lookup table creation
* cli: support creating lookup tables without authority signer
* add another create lookup table ix function
* improve help message
* add compute-unit-price trait to insert compute_budget instruction to set priorization fee
* add clap arg for compute-unit-price
* add compute-unit-price arg to commands that send transactions
* add and update tests