HaoranYi
910b0f5d12
fix sbf sysvar test ( #32803 )
...
* fix sbf sysvar test
* typo
---------
Co-authored-by: HaoranYi <haoran.yi@solana.com>
2023-08-21 09:49:48 -06:00
Brooks
a563b4cccb
Renames AccountsHashEnum to AccountsHashKind ( #32904 )
2023-08-21 10:34:56 -04:00
Brooks
9a6cf3f528
Renames SnapshotRequestType to SnapshotRequestKind ( #32907 )
2023-08-21 07:12:20 -04:00
Brooks
f9bc3cec24
Renames SnapshotType to SnapshotKind ( #32906 )
2023-08-19 19:55:29 -04:00
steviez
a4c8cc3ce0
Remove improper uses of &Arc<Bank> ( #32802 )
...
In most cases, either a &Bank or an Arc<Bank> is more proper.
- &Bank is used if the function only needs a momentary reference
- Arc<Bank> is used if the function needs its' own copy
This PR leaves several instances of &Arc<Bank> around; these instances
are situations where a clone may only happen conditionally.
2023-08-18 16:46:34 -05:00
Brooks
3cda810358
Adds docs to get_all_accounts_modified_since_parent() ( #32895 )
2023-08-18 16:01:50 -04:00
steviez
480851b865
Reduce repeated logic in BankForks unit tests ( #32852 )
...
* Move repeated BankForks logic into a loop
* Do away with redundant Vec<Arc<Bank>>
* Condense repeated logic into helper function
2023-08-18 11:58:04 -05:00
Brooks
280bb53802
Adds docs to get_all_accounts() ( #32887 )
2023-08-18 16:09:50 +00:00
Brooks
004577d94a
Adds docs to scan_all_accounts() ( #32888 )
2023-08-18 16:04:07 +00:00
Brooks
1e8f7b5d1e
Adds docs to non_vote_transaction_count_since_restart() ( #32886 )
2023-08-18 15:37:44 +00:00
Alexander Meißner
c5a251e8c3
Refactor - `Bank::compute_active_feature_set()` ( #32872 )
...
Returns the feature set instead of overwriting it inside Bank::compute_active_feature_set().
2023-08-17 19:14:10 +02:00
Pankaj Garg
c17b938204
Integrate program loader-v4 with bank ( #32832 )
...
* Integrate program loader-v4 with bank
* fix tests
* new struct for ProgramRuntimeEnvironments
* remove environment from program_runtime_environment_v
* move find_program_in_cache() to invoke_context
* cleanup
2023-08-16 10:50:23 -07:00
Brooks
e316db2ab4
dcou: set_accounts_hash() ( #32829 )
2023-08-15 07:18:59 -04:00
steviez
6bbf514e78
Add ability to output components that go into Bank hash ( #32632 )
...
When a consensus divergance occurs, the current workflow involves a
handful of manual steps to hone in on the offending slot and
transaction. This process isn't overly difficult to execute; however, it
is tedious and currently involves creating and parsing logs.
This change introduces functionality to output a debug file that
contains the components go into the bank hash. The file can be generated
in two ways:
- Via solana-validator when the node realizes it has diverged
- Via solana-ledger-tool verify by passing a flag
When a divergance occurs now, the steps to debug would be:
- Grab the file from the node that diverged
- Generate a file for the same slot with ledger-tool with a known good
version
- Diff the files, they are pretty-printed json
2023-08-15 00:12:05 -05:00
Brooks
ce57cac370
Use update_accounts_hash() in AccountsHashVerifier ( #32830 )
2023-08-14 13:11:23 -04:00
Ryo Onodera
ce63640d6d
dcou: make internal function `pub` conditionally ( #32822 )
...
dcou: make internal function pub conditionally
2023-08-13 14:12:20 +09:00
Pankaj Garg
a1a0829a8b
Initialize and store PRv2 environment in cache ( #32812 )
...
* Initialize and store PRv2 environment in cache
* address review comments
2023-08-11 18:58:22 +00:00
Jon Cinque
c73a56faf8
stake: Rename `StakeStateWithFlags` -> `StakeStateV2` ( #32795 )
2023-08-11 01:07:21 +02:00
Pankaj Garg
f4287d70bb
Move accounts-db code to its own crate ( #32766 )
2023-08-09 13:03:36 -07:00
Jon Cinque
8e4a9a94ed
sdk: Add new version of `StakeState` to avoid breaking downstream users ( #32736 )
...
* sdk: Rename `StakeState` -> `StakeStateWithFlags`
* Add back `StakeFlags` with a deprecation warning
2023-08-09 00:05:40 +02:00
Jeff Washington (jwash)
7c1cf298aa
add active stats for pieces of hash calc ( #32750 )
2023-08-08 07:16:10 -07:00
Jeff Washington (jwash)
32cb381f69
remove some stats that are no longer kept ( #32751 )
...
* remove some stats that are no longer kept
* Update runtime/src/accounts_hash.rs
Co-authored-by: Brooks <brooks@prumo.org>
* reorder to remove drop
---------
Co-authored-by: Brooks <brooks@prumo.org>
2023-08-08 07:15:37 -07:00
Jeff Washington (jwash)
21b8b70bee
add metrics around purge_exact ( #32752 )
2023-08-08 07:15:21 -07:00
Yueh-Hsuan Chiang
bf6d0aba4c
TieredStorage struct (4/N) -- remove_on_drop ( #32603 )
...
#### Summary of Changes
This PR makes TieredStorage implement Drop which does the remove-on-drop
behavior that follows the AccountsFile convention.
2023-08-07 15:39:46 -07:00
Brooks
df31bc13db
Removes `set_no_remove_on_drop()` from AppendVec/AccountsFile ( #32742 )
2023-08-07 17:48:31 -04:00
Brooks
4894eb0333
Moves some accounts-db test-only code into a dev-context-only-utils feature ( #32748 )
2023-08-07 17:28:15 -04:00
Ashwin Sekar
fa3506631a
stake: deprecate on chain warmup/cooldown rate and config ( #32723 )
...
* stake: deprecate on chain warmup/cooldown rate and config
* Pr feedback: Deprecate since 1.16.7
Co-authored-by: Jon Cinque <me@jonc.dev>
---------
Co-authored-by: Jon Cinque <me@jonc.dev>
2023-08-07 13:23:24 -07:00
behzad nouri
b9a2030537
uses atomics for read-only accounts cache entry index ( #32518 )
...
Using atomics for entry indices allows load function to use self.cache.get
instead of get_mut which reduces lock contention on the respective
dash-map shard.
2023-08-07 17:47:09 +00:00
Brooks
c2dec254c8
Removes `remove_on_drop` field from AppendVec ( #32741 )
2023-08-07 13:25:07 -04:00
Pankaj Garg
511cf28be8
Move `serde-snapshot dependent accounts-db tests ( #32671 )
...
Move serde-snapshot dependent accounts-db tests
2023-08-07 09:35:41 -07:00
Brooks
6ce647a3e0
Do not drop AppendVec in store-tool ( #32739 )
2023-08-07 12:15:01 -04:00
Yueh-Hsuan Chiang
a5bde0a79c
TieredStorage struct (3/N) -- new_readonly and reader structs ( #32579 )
...
#### Summary of Changes
This PR implements TieredStorage::new_readonly() and introduces
TieredStorageReader and HotStorageReader.
#### Test Plan
Updated the existing unit test.
2023-08-04 12:18:38 -07:00
HaoranYi
533f42dae6
remove type cast in scan metric report ( #32704 )
...
Co-authored-by: HaoranYi <haoran.yi@solana.com>
2023-08-04 13:03:32 -05:00
Brooks
04e25ff3ce
Adds doc comments for Bank fns that get accounts/snapshot hashes ( #32716 )
2023-08-04 13:56:15 -04:00
Jeff Washington (jwash)
ca7a7ad2f3
add some doc comments identified in audit ( #32709 )
...
* add some doc comments identified in audit
* Update runtime/src/bank.rs
Co-authored-by: Brooks <brooks@prumo.org>
* Update runtime/src/accounts_db.rs
Co-authored-by: Brooks <brooks@prumo.org>
* Update runtime/src/accounts_db.rs
Co-authored-by: Brooks <brooks@prumo.org>
---------
Co-authored-by: Brooks <brooks@prumo.org>
2023-08-04 10:52:01 -07:00
Alexander Meißner
a310dd776c
Fix - Uses `std::mem::transmute` and `std::ptr::write` in unsafe code in append_vec.rs ( #32711 )
...
Uses std::mem::transmute and std::ptr::write in unsafe code in append_vec.rs
2023-08-04 17:18:13 +02:00
steviez
5edd032c79
Remove unnecessary clone ( #32707 )
2023-08-03 13:54:43 -06:00
Jeff Washington (jwash)
f5c8bb789a
remove unused bank creation/freezing progress ( #32699 )
2023-08-03 10:12:44 -07:00
Alexander Meißner
33c33f5f79
Fix - Adds missing feature pubkeys to the `FEATURES_AFFECTING_RBPF` list ( #32703 )
...
Adds missing feature pubkeys to the FEATURES_AFFECTING_RBPF list.
2023-08-03 17:45:30 +02:00
Jeff Washington (jwash)
3dcb382731
avoid giant memory allocation in hash calc ( #32646 )
...
* avoid giant memory allocation in hash calc
* update comment
* reorder to avoid clone
* simplify references
* update comment on get_item
2023-07-31 13:13:19 -07:00
Brooks
f4504d055a
Uses Mutex::into_inner() at end of de_dup_accounts() ( #32667 )
2023-07-31 17:02:45 +00:00
Jeff Washington (jwash)
91fd2a3a93
abs purge slots in parallel ( #32536 )
...
* abs purge slots in parallel
* remove arc clone
2023-07-31 09:22:53 -07:00
Jeff Washington (jwash)
bb407d2b62
add metric read_only_cache_load_us ( #32559 )
2023-07-31 07:07:13 -07:00
Brooks
58e796dc64
Removes unnecessary clippy-allow for needless-collect when generating index ( #32656 )
2023-07-29 22:30:11 -04:00
Brooks
fc8cfb63ae
Unstable sort slots when generating index ( #32653 )
2023-07-29 22:28:33 -04:00
behzad nouri
ad4ddd3cb0
stores stake-accounts in parallel after epoch rewards calculations ( #32633 )
2023-07-29 20:47:28 +00:00
Brooks
16ec9a68c9
Unzips Option when deserializing snapshot data files ( #32652 )
2023-07-28 15:21:22 -04:00
Brooks
965ed1ab1f
Simplifies if-let when rebuilding bank ( #32654 )
...
Simplifies let-Some when rebuilding bank
2023-07-28 17:55:58 +00:00
Brooks
e1d0785f4f
Unzips Option when rebuilding bank ( #32651 )
2023-07-28 12:28:49 -04:00
Brooks
de02601d73
Cleanups metrics in add_bank_snapshot() ( #32645 )
2023-07-27 20:24:25 +00:00