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
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