HaoranYi
2e9aeff8dd
Enable partitioned epoch reward by feature id ( #32174 )
...
enable partitioned epoch reward feature by feature id
update stake rewards tests with partitioned epoch rewards feature enable
Co-authored-by: HaoranYi <haoran.yi@solana.com>
2023-06-20 12:12:50 -05:00
Jeff Washington (jwash)
2572df7452
stake tests modification: next_epoch_and_n_slots ( #32052 )
...
stake tests modification: next_epoch_and_n_slots
2023-06-11 12:26:16 -07:00
Jeff Washington (jwash)
fed1bb7d54
use max alive root to determine ancient cutoff for clean stats ( #31545 )
...
* use max alive root to determine ancient cutoff for clean stats
* fix math and add tests
2023-05-10 08:05:31 -07:00
Tyera
9af7009bb4
Add new CreateVoteAccount instruction-set builders ( #31330 )
...
* Add failing test
* Add config struct for vote-account creation
* Add create-vote-account ix builders that use CreateVoteAccountConfig
* Test now passes; add case to demonstrate failure after activation
* Deprecate existing ix builders
* Use new builders in solana-cli
* Query feature status to use correct VoteState size in solana-cli
* Fix tests and clippy warnings
* Improve ugly conditional block
2023-04-27 11:14:39 -06:00
Brennan
8312141f87
Move bank tests to separate file ( #29912 )
2023-02-02 16:32:22 -08:00
Jeff Washington (jwash)
d41da2178c
test_bad_bank_hash uses write cache ( #29559 )
2023-01-09 08:10:28 -08:00
behzad nouri
5c9beef498
fixes errors from clippy::useless_conversion ( #29534 )
...
https://rust-lang.github.io/rust-clippy/master/index.html#useless_conversion
2023-01-05 18:05:32 +00:00
Jeff Washington (jwash)
62be54a75e
remove process_stale_slot_v1 and other fns ( #29244 )
2022-12-13 16:32:24 -08:00
Brooks Prumo
2bafb0cb12
Requires EAH state cannot be Invalid ( #28817 )
2022-11-17 11:01:01 -05:00
Brooks Prumo
d1ba42180d
clippy for rust 1.65.0 ( #28765 )
2022-11-09 19:39:38 +00:00
Jeff Washington (jwash)
fd2e671861
remove slot# from account hash ( #28405 )
...
* remove slot# from account hash
* add feature
* fix tests
* constants to help clarify 'irrelevant' changes
* move to enum for enforcing irrelevancy
* ignore unsupported tests
2022-10-18 08:03:37 -07:00
Jeff Washington (jwash)
abd01553d5
tests: Keypair::new().pubkey() -> pubkey::new_rand ( #27705 )
2022-09-10 13:56:45 -07:00
Brooks Prumo
2fd9a4f373
Add clean_accounts_for_tests() ( #27200 )
2022-08-17 18:45:59 -04:00
Brooks Prumo
b4ade0d48a
Make stake integration tests aware of stake minimum delegation ( #24809 )
2022-04-28 18:11:39 -05:00
Michael Vines
b8837c04ec
Reformat imports to a consistent style for imports
...
rustfmt.toml configuration:
imports_granularity = "One"
group_imports = "One"
2021-12-03 09:19:13 -08:00
Jack May
785fcb63f5
Remove support for dynamically loaded native programs ( #20444 )
2021-10-06 14:53:23 -07:00
Jack May
8fee9a2e1a
Dont call precompiled programs ( #19930 )
2021-09-29 06:25:08 +00:00
Jon Cinque
73aa004c59
stake: Remove v2 program references ( #19308 )
...
* stake: Remove v2 program references
* Remove stake v2 feature, along with stake rewrite
2021-08-20 01:08:44 -04:00
Brooks Prumo
5fb6b341c4
Handle cleaning of zero-lamport accounts w.r.t. Incremental Snapshots ( #18870 )
...
* Handle cleaning zero-lamport accounts
Handle cleaning zero-lamport accounts in slots higher than the last full
snapshot slot. This is part of the Incremental Snapshot work.
Fixes #18825
2021-08-12 15:56:08 -05:00
Jeff Washington (jwash)
41f4973f0d
accounts default refactoring stragglers ( #19097 )
2021-08-06 12:36:42 -05:00
Jeff Washington (jwash)
14361906ca
for all tests, bank::new -> bank::new_for_tests ( #19064 )
2021-08-05 08:42:38 -05:00
Jeff Washington (jwash)
6a995f5dfd
rename to AccountsDb::new_single_for_tests ( #19039 )
2021-08-04 11:47:11 -05:00
Alexander Meißner
6514096a67
chore: cargo +nightly clippy --fix -Z unstable-options
2021-06-18 10:42:46 -07:00
Jon Cinque
1b1d34da59
Refactor stake program into solana_program ( #17906 )
...
* Move stake state / instructions into solana_program
* Update account-decoder
* Update cli and runtime
* Update all other parts
* Commit Cargo.lock changes in programs/bpf
* Update cli stake instruction import
* Allow integer arithmetic
* Update ABI digest
* Bump rust mem instruction count
* Remove useless structs
* Move stake::id() -> stake::program::id()
* Re-export from solana_sdk and mark deprecated
* Address feedback
* Run cargo fmt
2021-06-15 18:04:00 +02:00
Jon Cinque
8f5e773caf
system-program: Remove zero lamport check on transfers ( #17726 )
...
* system-program: Move lamports == 0 check on transfers
* Address feedback
* Update stake split to explicitly allocate + assign
* Update stake tests referring to split instruction
* Revert whitespace
* Update split instruction index in test
* Remove unnecessary `assign_with_seed` from `split_with_seed`
* Fix stake instruction parser
* Update test to allow splitting into account with lamports
2021-06-06 01:45:45 +02:00
Jeff Washington (jwash)
98f1b11edd
Ancestors to HashSet: From(Vec) ( #17447 )
...
* ancestors.large_range_slots becomes HashSet
* Ancestors to HashSet: From(Vec)
2021-05-25 11:01:11 -05:00
Jeff Washington (jwash)
0486df02ba
don't limit to thread pool when cleaning on startup ( #17317 )
2021-05-20 14:36:35 -05:00
Jeff Washington (jwash)
a9aa533684
replace Ancestors HashMap for performance ( #16477 )
...
* replace Ancestors HashMap for performance
* add ancestors module
2021-05-20 10:11:56 -05:00
Jeff Washington (jwash)
ed9cbd50f0
move Ancestors to its own module ( #17316 )
2021-05-19 11:50:34 -05:00
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)
3fdbaefaa6
tests: lamports -= to checked_sub ( #16843 )
2021-04-27 09:12:48 -05:00
Jeff Washington (jwash)
69cbad0869
some ReadableAccount changes ( #16688 )
...
* some ReadableAccount changes
* deref
2021-04-21 12:20:37 -05:00
carllin
d747614b27
Account for possibility of cache flush in load() ( #15454 )
...
* Account for possibility of cache flush in load()
* More cleaning
* More cleaning
* Remove unused method and some comment cleaning
* Fix typo
* Make the detected impossible purge race panic()!
* Finally revert to original .expect()
* Fix typos...
* Add assertion for max_root for easier reasoning
* Reframe races with LoadHint as possible opt.
* Fix test
* Make race bug tests run longer for less flaky
* Delay the clone-in-lock slow path even for RPC
* Make get_account panic-free & add its onchain ver.
* Fix rebase conflicts...
* Clean up
* Clean up comment
* Revert fn name change
* Fix flaky test...
* fmt...
Co-authored-by: Ryo Onodera <ryoqun@gmail.com>
2021-04-17 00:23:32 +09:00
Brooks Prumo
17aa45fad1
Remove old way of account hashing
...
Account data hashing used to use different ways of hashing on different
clusters. That is no longer the case, but the old code still existed.
This commit removes that old, now used code.
**NOTE** The golden hash values in bank.rs needed to be updated. Since
the original code that selected the hash algorithm used `if >` instead
of `if >=`, this meant that the genesis block's hash _always_ used the
old hashing method, which is no longer valid.
Validated by running `cargo test` successfully.
2021-04-13 14:42:21 -05:00
Jeff Washington (jwash)
8a3135d17b
Account->AccountSharedData ( #15691 )
2021-03-09 15:06:07 -06:00
Michael Vines
5df36aec7d
Pacify clippy
2021-02-19 20:08:41 -08:00
Trent Nelson
7f7370c306
Re-allow clippy::integer_arithmetic at crate-level
2021-02-17 13:55:08 -07:00
carllin
6dfad0652f
Cache account stores, flush from AccountsBackgroundService ( #13140 )
2021-01-11 17:00:23 -08:00
sakridge
1c61d005b5
Re-enable shrink test ( #14331 )
2020-12-30 08:25:45 -08:00
Ryo Onodera
89b474e192
Fix slow/stuck unstaking due to toggling in epoch ( #13501 )
...
* Fix slow/stuck unstaking due to toggling in epoch
* nits
* nits
* Add stake_program_v2 feature status check to cli
Co-authored-by: Tyera Eulberg <tyera@solana.com>
2020-11-11 14:11:57 -07:00
Tyera Eulberg
bc62313c66
Allow feature builtins to overwrite existing builtins ( #13403 )
...
* Allow feature builtins to overwrite existing builtins
* Add feature_builtin ActivationType
* Correctly retain idempotent for replacing case
* Fix test
Co-authored-by: Ryo Onodera <ryoqun@gmail.com>
2020-11-05 15:37:07 +00:00
Jack May
c458d4b213
move Account to solana-sdk ( #13198 )
2020-10-28 22:01:07 -07:00
Michael Vines
959880db60
Remove unused pubkey::Pubkey imports
2020-10-21 19:08:13 -07:00
Michael Vines
7bc073defe
Run `codemod --extensions rs Pubkey::new_rand solana_sdk::pubkey::new_rand`
2020-10-21 19:08:13 -07:00
Greg Fitzgerald
7ade330b23
Rename Client methods to match proposed BanksClient ( #10793 )
2020-06-25 03:35:38 +00:00
Greg Fitzgerald
1c498369b5
Remove fee-payer guesswork from Message and Transaction ( #10776 )
...
* Make Message::new_with_payer the default constructor
* Remove Transaction::new_[un]signed_instructions
These guess the fee-payer instead of stating it explicitly
2020-06-24 14:52:38 -06:00
Greg Fitzgerald
36a36d1c83
No longer allow create-account to add funds to an existing account ( #10192 )
...
automerge
2020-05-22 16:39:01 -07:00
Kristofer Peterson
58ef02f02b
9951 clippy errors in the test suite ( #10030 )
...
automerge
2020-05-15 09:35:43 -07:00
Jack May
eb1acaf927
Remove archiver and storage program ( #9992 )
...
automerge
2020-05-14 18:22:47 -07:00