* sdk: Add get_instance_packed_len for variable-size types
* Add comment for get_packed_len
* Add more tests
(cherry picked from commit 4b60b2863e)
Co-authored-by: Jon Cinque <jon.cinque@gmail.com>
* Allow SetUpgradeAuthority instruction in CPI calls (#16676)
* feat: allow SetAuthority in CLI calls
* chore: clippy match_like_matches_macro
* chore: clippy match_like_matches_macro
* chore: rename CLI to CPI
* chore: move check for cpi authorised instruction to syscalls
* chore: add set_upgrade_authority cpi test
* chore: assert upgrade authority was changed
* feat: gate set_upgrade_authority via cpi with a feature
* chore: move feature to the end of the list
* chore: remove white spaces
* chore: remove white spaces
* chore: update comment to rerun build
(cherry picked from commit 1a658c7f31)
# Conflicts:
# programs/bpf/Cargo.toml
# programs/bpf_loader/src/syscalls.rs
# sdk/src/feature_set.rs
* chore: fixe merge conflicts
Co-authored-by: Sebastian Bor <Sebastian_Bor@hotmail.com>
* SDK: More conversions for `Pubkey`
(cherry picked from commit 9b7120bf73)
* SDK: More conversion for `DerivationPath`
(cherry picked from commit 722de942ca)
* remote-wallet: Add helpers for locating remote wallets
(cherry picked from commit 64fcb792c2)
* remote-wallet: Plumb `Locator` into `RemoteWalletInfo`
(cherry picked from commit 3d12be29ec)
* remote-wallet: `derivation-path` crate doesn't like empty trailing child indexes
(cherry picked from commit 4ce4f04c58)
* remote-wallet: Move `Locator` to its own module
(cherry picked from commit cac666d035)
Co-authored-by: Trent Nelson <trent@solana.com>
* Return sysvars via syscalls (#16422)
(cherry picked from commit fa83f3bd73)
* bad merge
* Fix branch diffs
* nudge
Co-authored-by: Jack May <jack@solana.com>
* Drop write lock on sysvars
* adds env var for demoting sysvar write lock demotion
* moves demote logic to is_writable
* feature gates sysvar write lock demotion
* adds builtins to write lock demotion
* adds system program id to builtins
* adds Feature111...
* adds an abi-freeze test
* mvines set of builtin program keys
Co-authored-by: Michael Vines <mvines@gmail.com>
* update tests
* adds bpf loader keys
* Add test sysvar
* Plumb demote_sysvar to is_writable
* more plumbing of demote_sysvar_write_locks to is_writable
* patches test_program_bpf_instruction_introspection
* hard codes demote_sysvar_write_locks to false for serialization/encoding methods
* Revert "hard codes demote_sysvar_write_locks to false for serialization/encoding methods"
This reverts commit ae3e2d2e777437bddd753933097a210dcbc1b1fc.
* change the hardcoded ones to demote_sysvar_write_locks=true
* Use data_as_mut_slice
Co-authored-by: behzad nouri <behzadnouri@gmail.com>
Co-authored-by: Michael Vines <mvines@gmail.com>
(cherry picked from commit 54c68ea83f)
Co-authored-by: sakridge <sakridge@gmail.com>
* sdk: Add try_from_slice_unchecked for Borsh
* Add tests
* Rename + clarify comment
* Rename back to unchecked
(cherry picked from commit cffa851e0f)
Co-authored-by: Jon Cinque <jon.cinque@gmail.com>
* sdk: Add accessor for signer pubkeys of a tx message
(cherry picked from commit bf33ce8906)
* clap-utils: Add helper to `CliSignerInfo` for getting signers for a message
(cherry picked from commit 4e99f1e634)
Co-authored-by: Trent Nelson <trent@solana.com>
* Move to module-level clippy allowance
* Fix stake_weighted_timestamp math
* Fix genesis_config
* Fix shred_version
* Fix hard_forks
* Fix process_instruction
* Add ArithmeticOverflow ix error
* Fix nonce_keyed_account
* Update BankSlotDelta frozen abi due to new ix error