Commit Graph

156 Commits

Author SHA1 Message Date
Jeff Washington (jwash) 541aa5ad85
tests: lamports -> lamports() (#16982) 2021-05-03 10:45:54 -05:00
Jeff Washington (jwash) 763c04adf3
lamports = -> .set_lamports() (#16980) 2021-04-30 21:17:05 +00:00
Jeff Washington (jwash) 5e74cede4e
lamports -> lamports() (#16979) 2021-04-30 21:03:08 +00:00
Jeff Washington (jwash) 6f88aeac56
tests: .lamports= -> .set_lamports() (#16977)
* .lamports= -> .set_lamports()

* another

* fix

* another
2021-04-30 18:44:15 +00:00
Jeff Washington (jwash) 0af84bb91e
lamports= -> .set_lamports() (#16978) 2021-04-30 18:20:54 +00:00
Jeff Washington (jwash) c9c94a7ef2
checked_sub_lamports (#16923) 2021-04-29 12:38:21 -05:00
Jeff Washington (jwash) ca7b36ad8f
lamports -> lamports() (#16920) 2021-04-29 10:44:46 -05:00
Jeff Washington (jwash) a7070a5ca7
set_lamports() (#16921) 2021-04-28 21:30:06 +00:00
Jeff Washington (jwash) 4e7e675c07
lamports += -> checked_add_lamports (#16791) 2021-04-27 09:11:35 -05:00
Jeff Washington (jwash) fb0b76c1f3
account.owner = X -> account.set_owner(X) (#16754) 2021-04-23 12:34:22 -05:00
Alexander Meißner 9dfcb921cf
Refactoring: Move KeyedAccounts to InvokeContext (#15410)
Collects all parametric occurrences and the construction of keyed_accounts and puts them into InvokeContext.
2021-04-19 18:48:48 +02:00
Michael Vines a911ae00ba clippy 2021-04-18 20:55:02 -07:00
Ryo Onodera 6d5c6c17c5
Simplify account.rent_epoch handling for sysvar rent (#16049)
* Add some code for special local testing

* Add comment to store_account_and_update_capitalization

* Simplify account.rent_epoch handling for sysvar rent

* Introduce *_for_test functions

* Add deprecation messages to existing api
2021-03-25 15:23:20 +09:00
Michael Vines a2eb655322 =1.7.0 2021-03-16 07:51:07 +00:00
Michael Vines 0c9ca5522c Bump version to v1.7.0 2021-03-13 09:01:21 +00:00
Jeff Washington (jwash) 952c3bcbb7
AccountSharedData construction (#15790) 2021-03-11 18:09:04 -06:00
Trent Nelson 24d18b3cf2 docs: add docs links for crates published to crates.io 2021-03-11 08:38:18 +00:00
Jeff Washington (jwash) 52e54e1100
account.data -> data() (#15778) 2021-03-09 22:31:33 +00:00
Jeff Washington (jwash) 8a3135d17b
Account->AccountSharedData (#15691) 2021-03-09 15:06:07 -06:00
Jack May b53cb8eb2d
Deprecate Instruction::new (#15695) 2021-03-04 05:46:48 +00:00
sakridge 8399851d11
check program owners (#15495)
* check program owners

* BankSlotDelta should change because InstructionError variant added

Co-authored-by: Tyera Eulberg <tyera@solana.com>
2021-02-26 22:21:34 +00:00
Jon Cinque ebd43938a7
docs: Update stake merging documentation (#15489)
* Update stake merging documentation

* Integrate review feedback

* Integrate review feedback in comment too
2021-02-25 17:24:39 +01:00
Trent Nelson 7f7370c306 Re-allow clippy::integer_arithmetic at crate-level 2021-02-17 13:55:08 -07:00
Jon Cinque 3ac7e09de6
docs: Remove references to "create_address_with_seed" (#15339) 2021-02-17 14:25:02 +01:00
Tyera Eulberg 51c27dcc1c
Clean & check stake (#15363)
* Add failing test

* Fix test

* Clean up redendant if case

* Demonstrate withdrawal boundaries

* Update test to fail on conditions that should be acceptable

* Fix test

* Add test for larger stake source

* Mirror changes for undelegated accounts

* Extra stake checks

* Split accounts must be the right size

Co-authored-by: Stephen Akridge <sakridge@gmail.com>
2021-02-17 03:42:46 +00:00
Tyera Eulberg 7e17a0d3bb Move fn to sdk 2021-02-16 19:25:00 -08:00
Trent Nelson ae82b5ebfd stake: add lamports overflow test for withdraw 2021-02-15 11:09:51 -07:00
sakridge 08f94a2bd2
Stake program update (#15307) 2021-02-12 17:24:43 -08:00
Ryo Onodera 4e99aa5fa6
More failure codepath tracing (#15246) 2021-02-12 15:24:23 +09:00
Michael Vines dc7041ba07
Require lockup authority to change withdraw authority on locked stake (#14861) 2021-02-05 22:40:07 -08:00
Ryo Onodera c69027e5aa
chore: bump serde from 1.0.118 to 1.0.122 (#15126)
* chore: bump serde from 1.0.118 to 1.0.122

* Update programs/bpf/Cargo.lock
2021-02-05 19:23:24 +09:00
dependabot[bot] 1df93fa2be
chore: bump serde from 1.0.112 to 1.0.118 (#14828)
* chore: bump serde from 1.0.112 to 1.0.122

Bumps [serde](https://github.com/serde-rs/serde) from 1.0.112 to 1.0.122.
- [Release notes](https://github.com/serde-rs/serde/releases)
- [Commits](https://github.com/serde-rs/serde/compare/v1.0.112...v1.0.122)

Signed-off-by: dependabot[bot] <support@github.com>

* [auto-commit] Update all Cargo lock files

* Update frozen_abi digest following serde update

* Revert "chore: bump serde from 1.0.112 to 1.0.122"

This reverts commit a3ef4442a4c985144ae2bd7ceaf8899a7ab8d7c0.

* Revert "[auto-commit] Update all Cargo lock files"

This reverts commit c41c3b005fb1ccade55155302c52cd5736c4b55f.

* chore: bump serde from 1.0.112 to 1.0.118

Bumps [serde](https://github.com/serde-rs/serde) from 1.0.112 to 1.0.118.
- [Release notes](https://github.com/serde-rs/serde/releases)
- [Commits](https://github.com/serde-rs/serde/compare/v1.0.112...v1.0.118)

Signed-off-by: dependabot[bot] <support@github.com>

* [auto-commit] Update all Cargo lock files

* Remove serum-dex pinning

* blind commit!

Co-authored-by: dependabot[bot] <49699333+dependabot[bot]@users.noreply.github.com>
Co-authored-by: dependabot-buildkite <dependabot-buildkite@noreply.solana.com>
Co-authored-by: Ryo Onodera <ryoqun@gmail.com>
2021-02-02 23:28:16 +09:00
Michael Vines ff22091a98 Add StakeInstruction::Merge logging 2021-01-26 11:52:39 -08:00
Michael Vines 119e2c75dd cli now supports a custodian for stake authorize operations 2021-01-26 11:48:28 -08:00
Michael Vines 8359f4f5ff Include Clock sysvar in AuthorizeWithSeed instruction 2021-01-25 19:38:10 -08:00
Michael Vines 2b50433099 Remove legacy_stake program 2021-01-25 19:34:40 -08:00
Trent Nelson 50710473a8 Deinitialize stake data upon zero balance 2020-12-22 19:37:26 -07:00
Trent Nelson 5b903318b2 vote: Add helper for creating current-versioned states 2020-12-22 19:37:26 -07:00
Tyera Eulberg 7042f11791
Feature-gate stake-program-v3 (#14232)
* Remove deprecated legacy stake program

* Add legacy stake program

* Strip out duplicative legacy code

* Feature-deploy stake-program-v3

* Add ownership check in stake processor
2020-12-22 11:20:38 -07:00
Michael Vines 1e977ac025 Bump version to v1.6.0 2020-12-15 18:28:04 +00:00
Michael Vines 7143aaa89b Clippy 2020-12-14 08:03:29 -08:00
dependabot[bot] 88d950e5a8
chore: bump log from 0.4.8 to 0.4.11 (#13691)
* chore: bump log from 0.4.8 to 0.4.11

Bumps [log](https://github.com/rust-lang/log) from 0.4.8 to 0.4.11.
- [Release notes](https://github.com/rust-lang/log/releases)
- [Changelog](https://github.com/rust-lang/log/blob/master/CHANGELOG.md)
- [Commits](https://github.com/rust-lang/log/compare/0.4.8...0.4.11)

Signed-off-by: dependabot[bot] <support@github.com>

* [auto-commit] Update all Cargo lock files

Co-authored-by: dependabot[bot] <49699333+dependabot[bot]@users.noreply.github.com>
Co-authored-by: dependabot-buildkite <dependabot-buildkite@noreply.solana.com>
2020-12-13 13:48:23 +09:00
Ryo Onodera e81c2c826c
Don't reset credits_observed due to stale voters (#13836)
* Don't reset credits_observed due to stale voters

* Add tests

* Fix comment
2020-11-30 22:47:34 +09:00
Ryo Onodera 6048342c57
Enhance ledger-tool for multi-epoch rewards (#13837)
* Support ledger-tool for multi-epoch rewards

* nits

* Ensure not to skip some records in csv
2020-11-27 04:20:47 +00:00
Ryo Onodera 42421e77a9
Add stake calculation tests with inflation/slashing (#13605)
* Add stake calculation tests with inflation/slashing

* Clean up the test
2020-11-25 12:49:35 +09:00
Tyera Eulberg e3a92d6905
Prevent splitting when either source or split stake will equal zero (#13775) 2020-11-24 02:48:56 +00:00
Trent Nelson 488ce982f0 stake: Disallow stakes merging with themselves 2020-11-23 14:32:02 -07:00
Trent Nelson 6b9a019c0a stake: Remove disused test helper function 2020-11-23 14:32:02 -07:00
Trent Nelson 8e73187990 stake: Allow compatible, fully-active stake accounts to be merged 2020-11-23 14:32:02 -07:00
Trent Nelson bb2772d068 stake: Cosmetic - rename variable 2020-11-23 14:32:02 -07:00