* Align host addresses
* support new program abi
* update epoch rollout
* Enforce aligned pointers in cross-program invocations
(cherry picked from commit 9290e561e1)
# Conflicts:
# programs/bpf_loader/src/lib.rs
Co-authored-by: Jack May <jack@solana.com>
* sdk: Make PubKey::create_program_address available in program unit tests (#11745)
* sdk: Make PubKey::create_program_address available in program unit tests
This finishes the work started in #11604 to have
`create_program_address` available when `target_arch` is not `bpf` and
`program` is enabled. Otherwise, there is an undefined reference error
to `sol_create_program_address`, which is only defined in `bpf`.
A small test to simply call the function has been added in order to catch
the problem in the future.
The default dependency to `solana-sdk/default` doesn't cause a problem with
existing programs since `build.sh` always specifies
`--no-default-features`, and programs in `solana-program-library` all
use it too.
* Add `default-features = false` for inter-program dependencies
Fix the build error found during CI. The `--no-default-features` flag
only applies to the top-level package, and not to dependencies. A program that
depends on another program, i.e. `128bit` which depends on `128bit_dep`,
must specify `default-features = false` when including that package,
otherwise the `bpf` build will try to pull in default packages, which
includes `std`.
(cherry picked from commit 9a366281d3)
# Conflicts:
# programs/bpf/rust/128bit/Cargo.toml
# programs/bpf/rust/invoke/Cargo.toml
# programs/bpf/rust/many_args/Cargo.toml
# programs/bpf/rust/param_passing/Cargo.toml
* Fix merge conflicts
Co-authored-by: Jon Cinque <jon.cinque@gmail.com>
* Add failing test for decoding ShortU16 alias values
(cherry picked from commit 338f66f9aa)
* Factor out ShortU16 deser vistor logic to helper
(cherry picked from commit 6222fbcc66)
* Reimplement decode_len() with ShortU16 vistor helper
(cherry picked from commit 30dbe257cf)
Co-authored-by: Trent Nelson <trent@solana.com>
* Fix bad rent in Bank::deposit as if since epoch 0 (#10468)
* Fix bad rent in Bank::deposit as if since epoch 0
* Remove redundant predicate
* Rename
* Start to add tests with some cleanup
* Forgot to add refactor code...
* Enchance test
* Really fix rent timing in deposit with robust test
* Simplify new behavior by disabling rent altogether
(cherry picked from commit 6c242f3fec)
# Conflicts:
# runtime/src/accounts.rs
# runtime/src/rent_collector.rs
* Fix conflict
* Fix clippy
Co-authored-by: Ryo Onodera <ryoqun@gmail.com>
* Force program address off the curve (#11323)
(cherry picked from commit 03263c850a)
* nudge
* trailing whitespace
Co-authored-by: Jack May <jack@solana.com>
Co-authored-by: Trent Nelson <trent@solana.com>
* Add failing test for unsane tx in RPC preflight
(cherry picked from commit e25846e1ad)
* Add From for SanitizeError > TransactionError
(cherry picked from commit 3f73affb2e)
* Sanitize transactions during RPC preflight test
(cherry picked from commit 29b3265dc7)
* Harden RPC preflight test inputs
(cherry picked from commit 14339dec0a)
Co-authored-by: Trent Nelson <trent@solana.com>
* Allow inspection of signature verification failures
(cherry picked from commit 251f974b50)
* Test that off-curve pubkeys fail signature verify
(cherry picked from commit c421d7f1b8)
Co-authored-by: Trent Nelson <trent@solana.com>