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
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
Brooks
4417f49728
Adds more timing metrics to add_bank_snapshot() ( #32639 )
2023-07-27 14:52:34 -04:00
Yueh-Hsuan Chiang
2448486106
TieredStorage struct (2/N) -- write_accounts part 1 ( #32541 )
...
#### Summary of Changes
This PR initiates the implementation of TieredAccountsFile::write_accounts,
which will later support AccountsFile::append_accounts.
This PR also introduces TieredAccountsFileWriter -- the main writer struct for a
TieredAccountsFile.
#### Test Plan
Extended existing unit tests.
2023-07-27 14:55:48 +08:00
Brooks
89c1f94cc4
Do not add bank snapshots for AccountsHashVerifier requests ( #32589 )
2023-07-25 18:30:06 -04:00
Pankaj Garg
ef8d3206d7
Move bank specific code out of epoch_accounts_hash/utils.rs ( #32623 )
...
* Move bank specific code out of epoch_accounts_hash/utils.rs
* cleanup
2023-07-25 14:12:20 -07:00
Yueh-Hsuan Chiang
28d7e59cac
TieredStorage struct (1/N) -- new_writable() ( #32538 )
...
#### Summary of Changes
This PR initiates the implementation of the main struct for the
tiered accounts storage --- TieredStorage. Specifically,
it defines the TieredStorage struct, TieredStorageFormat,
and skeleton implementation of new_writable().
#### Test Plan
Unit tests are included in this PR.
2023-07-26 01:51:56 +08:00
Pankaj Garg
aba637d5d9
Split snapshot_utils.rs into snapshot_bank_utils.rs ( #32612 )
2023-07-24 16:31:03 -07:00
Brooks
de4ff348b4
Removes manual call to `.0.display()` with thiserror ( #32605 )
2023-07-24 12:02:55 -04:00
HaoranYi
17af3ab10a
Add stake_flags to stake state ( #32524 )
...
add stake_flags to stake state
Co-authored-by: HaoranYi <haoran.yi@solana.com>
2023-07-24 09:09:40 -05:00
Tao Zhu
62b9fcfa76
cleanup feature: Use default units per instruction in fee calculation ( #32570 )
...
* cleanup feature: Use default units per instruction in fee calculation
2023-07-21 18:37:58 -05:00
Pankaj Garg
fc35b13365
Cleanup load_program() in bank.rs ( #32146 )
2023-07-21 13:43:46 -07:00
behzad nouri
952d8861c6
removes feature-gate code for updating rewards from cached accounts ( #32514 )
2023-07-21 19:52:44 +00:00
HaoranYi
9e8639f7ae
Add distributed rewards for the block in partitioned reward metrics ( #32580 )
...
report distributed rewards for the block in metrics
Co-authored-by: HaoranYi <haoran.yi@solana.com>
2023-07-21 14:42:52 -05:00
Pankaj Garg
faff34403c
Move bank dependent tests out of serde_snapshot/tests.rs ( #32571 )
2023-07-21 12:08:32 -07:00
Tao Zhu
19f5b49abb
Priority queue supports deprecated compute budget ix ( #32567 )
...
Supports deprecated compute budget instruction when getting transaction's priority details
2023-07-20 19:17:56 -05:00
Brooks
faa002c2b6
Adds error types for all of `add_bank_snapshot()` ( #32564 )
2023-07-20 18:30:19 -04:00
Brooks
979913e1d5
Returns Self instead of Result<Self> for AccountsPackage::new_for_snapshot() ( #32545 )
2023-07-20 12:52:31 -04:00
Brooks
3fbfac41da
AccountsBackgroundService gracefully exits when snapshot request handling errors ( #32543 )
2023-07-20 11:53:06 -04:00
Jeff Washington (jwash)
0f70098410
allow shrinking to be in progress during `scan_account_storage` ( #32553 )
2023-07-20 08:01:10 -07:00
Brooks
6d30429dd1
Replaces `unwrap` with `?` when writing snapshot version file ( #32542 )
2023-07-19 16:42:46 -04:00
behzad nouri
a8b0c92873
simplifies update_stakes_cache implementation ( #32534 )
2023-07-19 18:13:30 +00:00
HaoranYi
5408872476
test force reward interval end fn ( #32513 )
...
Co-authored-by: HaoranYi <haoran.yi@solana.com>
2023-07-17 15:37:10 -05:00
Yueh-Hsuan Chiang
a2d9870678
[TieredStorage] Implementation of AccountIndexFormat for hot accounts ( #32497 )
...
#### Summary of Changes
This PR implements AccountIndexFormat::AddressAndOffset, the index format
that will be used by the hot account storage.
#### Test Plan
Unit tests are included in this PR.
Tested via the prototype implementation of tiered-storage.
2023-07-16 07:23:08 +08:00
Pankaj Garg
2a86420777
Move calculate_fee() out of bank.rs ( #32409 )
...
* Move calculate_fee() to fee.rs
* fixup code for compilation
2023-07-14 20:17:38 -07:00
Brooks
78230050fb
Fixes measure in log when calculating accounts hash ( #32502 )
2023-07-14 17:02:14 -04:00
Pankaj Garg
7177dd9809
Remove calculate_fee()'s dependency on ComputeBudget ( #32487 )
2023-07-14 12:25:04 -07:00
Pankaj Garg
eb74562124
Move methods to get num signatures and locks to SanitizedMessage ( #32489 )
2023-07-14 10:59:55 -07:00
Yueh-Hsuan Chiang
e6d1217dc3
[TieredStorage] Replace 'a by 'accounts_file in TieredReadableAccount ( #32470 )
...
#### Summary of Changes
This PR replaces the struct life-time parameter `'a` to `'accounts_file` in
TieredReadableAccount to improve readability.
2023-07-14 14:35:05 +08:00
Brooks
3b0e4c8452
Removes unnecessary default() ( #32477 )
2023-07-13 13:59:57 -04:00
Brooks
3c825f28a5
Uses next_back() ( #32478 )
2023-07-13 13:38:18 -04:00
Jeff Washington (jwash)
09ddbd731c
correctly log stats at remove_unrooted_slots ( #32467 )
2023-07-13 06:55:35 -07:00