* Use AsRef
(cherry picked from commit 9993d2c623)
* Create a random `-keypair.json` file alongside the program deploy artifact for easy upgrades
(cherry picked from commit 636a455790)
* Update Cargo.toml
Co-authored-by: Michael Vines <mvines@gmail.com>
* Simpler cap by including sysvars and native programs
* Fix tests
* Add comment
* revert some unrelated code
* Update test_bank_update_sysvar_account for cap.
* Test cap. for add_native_program using new helper
* Improve the cap adjustment with new tests
* Fix typo...
* Adjust test for improved code coverage
* Rename simpler_capitalization => simple_capitalization
* More rename and bonus commenting
(cherry picked from commit de9ac43ebf)
Co-authored-by: Ryo Onodera <ryoqun@gmail.com>
* runtime: Factor out `DurableNoncePartial` finishing logic and add tests
(cherry picked from commit 8df2a4bac0)
* accounts: Don't assume fee-payer is the first account
(cherry picked from commit 47af5933ca)
* accounts: Replace nonce_rollback unreachable block with descriptive panic
(cherry picked from commit be7760caa1)
* sdk: Check owner when verifying nonce accounts
(cherry picked from commit 274312ebb5)
* runtime: Replace `HashAgeKind` with `NonceRollbackInfo`
(cherry picked from commit 404fc1570d)
* Make `Accounts::is_non_loader_key()` a method on `Message`
(cherry picked from commit 17defbff13)
Co-authored-by: Trent Nelson <trent@solana.com>
Gossip and other places repeatedly de-serialize vote-state stored in
vote accounts. Ideally the first de-serialization should cache the
result.
This commit adds new VoteAccount type which lazily de-serializes
VoteState from Account data and caches the result internally.
Serialize and Deserialize traits are manually implemented to match
existing code. So, despite changes to frozen_abi, this commit should be
backward compatible.
(cherry picked from commit e1793e5a13)
Co-authored-by: behzad nouri <behzadnouri@gmail.com>
* Test for different ancestors with mismatch bank hash
* Test cleanup
* Remove nondeterministic ancestor check
* Update timestamp bounding feature key
* Update design doc
* Filter recent_timestamps to nodes voting within the last epoch
Co-authored-by: Stephen Akridge <sakridge@gmail.com>
Co-authored-by: Stephen Akridge <sakridge@gmail.com>
Packet::from_data is ignoring serialization errors:
https://github.com/solana-labs/solana/blob/d08c3232e/sdk/src/packet.rs#L42-L48
This is likely never useful as the packet will be sent over the wire
taking bandwidth but at the receiving end will either fail to
deserialize or it will be invalid.
This commit will propagate the errors out of the function to the
call-site, allowing the call-site to handle the error.
(cherry picked from commit 73ac104df2)
Co-authored-by: behzad nouri <behzadnouri@gmail.com>
* Add failing tests
* Fix stake split
* Calculate split rent-exempt-reserve and use
* Add comment in rent.rs
* Add tests for edge cases when splitting to larger accounts, and reject overflow splits
* Reframe InsufficientFunds checks in terms of lamports var
* Test hardening review comments
(cherry picked from commit 4c5f345798)
Co-authored-by: Tyera Eulberg <teulberg@gmail.com>
The feature allows for tests to distinguish between `cargo test` and
`cargo test-bpf` primarily for the purpose of excluding CPI tests that
require the system program under `cargo test`, as the path to enabling
CPI in `cargo test`-based testing is unclear
(cherry picked from commit 1a70a2a25b)
Co-authored-by: Michael Vines <mvines@gmail.com>