* Use AsRef
(cherry picked from commit 9993d2c6236987ec02f70e40b047b52ce1867e83)
* Create a random `-keypair.json` file alongside the program deploy artifact for easy upgrades
(cherry picked from commit 636a455790f43c66a6d1719132336127d6cbf5bf)
* 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 de9ac43ebffec502472c690ba519bba852176c86)
Co-authored-by: Ryo Onodera <ryoqun@gmail.com>
* runtime: Factor out `DurableNoncePartial` finishing logic and add tests
(cherry picked from commit 8df2a4bac0954b004556c2fc2e5c6bb7b86d1028)
* accounts: Don't assume fee-payer is the first account
(cherry picked from commit 47af5933caea0e03930e2ed03d18160903a832a7)
* accounts: Replace nonce_rollback unreachable block with descriptive panic
(cherry picked from commit be7760caa1725020290a25023046772c7b5dc733)
* sdk: Check owner when verifying nonce accounts
(cherry picked from commit 274312ebb59ffeac4a8a40f42375c2c6eedb03e7)
* runtime: Replace `HashAgeKind` with `NonceRollbackInfo`
(cherry picked from commit 404fc1570d722709344876dc91799edd576056bf)
* Make `Accounts::is_non_loader_key()` a method on `Message`
(cherry picked from commit 17defbff13fab30210c0b454adb5296f44bd4243)
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>