Pankaj Garg
9d42cd7efe
Initialize fork graph in program cache during bank_forks creation ( #33810 )
...
* Initialize fork graph in program cache during bank_forks creation
* rename BankForks::new to BankForks::new_rw_arc
* fix compilation
* no need to set fork_graph on insert()
* fix partition tests
2023-10-23 09:32:41 -07:00
Pankaj Garg
abf3b3e527
Custom debug impl for LoadedPrograms cache ( #33808 )
2023-10-22 05:51:14 -07:00
Ryo Onodera
5a963529a8
Add BankWithScheduler for upcoming scheduler code ( #33704 )
...
* Add BankWithScheduler for upcoming scheduler code
* Remove too confusing insert_without_scheduler()
* Add doc comment as a bonus
* Simplify BankForks::banks()
* Add derive(Debug) on BankWithScheduler
2023-10-21 15:56:43 +09:00
Pankaj Garg
59cb3b57ee
Set a global fork graph in program cache ( #33776 )
...
* Set a global fork graph in program cache
* fix deadlock
* review feedback
2023-10-20 08:47:03 -07:00
Ryo Onodera
1704789247
Define tick related helper test methods ( #33537 )
...
* Define tick related helper methods
* dcou VoteSimulator
* blacklist ledger-tool for dcou
* fix dcou ci...
* github
2023-10-10 09:23:18 +09:00
Alexander Meißner
8033be333e
Refactor - `LoadedPrograms` ( #33482 )
...
* Adds type ProgramRuntimeEnvironment.
* Moves LoadedPrograms::remove_expired_entries() into LoadedPrograms::prune().
* Adds Stats::prunes_environment and renames Stats::prunes_orphan and Stats::prunes_expired.
* Adds LoadedPrograms::latest_root_epoch.
* Typo fix, authored-by: Dmitri Makarov <dmakarov@users.noreply.github.com>
2023-10-02 19:01:23 +02:00
behzad nouri
39615bd075
removes manual let...else ( #33089 )
...
https://rust-lang.github.io/rust-clippy/master/index.html#/manual_let_else
2023-08-31 22:35:47 +00:00
behzad nouri
4ec5ea6f7b
replaces assert!(matches!(...)) with assert_matches!(...) ( #33068 )
...
assert_matches!(...) provides more informative error message when it
fails and it is part of nightly rust:
https://doc.rust-lang.org/std/assert_matches/macro.assert_matches.html
2023-08-30 13:48:27 -04:00
Brooks
9a6cf3f528
Renames SnapshotRequestType to SnapshotRequestKind ( #32907 )
2023-08-21 07:12:20 -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
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
Pankaj Garg
f4287d70bb
Move accounts-db code to its own crate ( #32766 )
2023-08-09 13:03:36 -07: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
Ashwin Sekar
3e8f5bad81
refactor: highest_cluster_confirmed_root -> highest_super_majority_root ( #31619 )
2023-05-14 00:42:03 -07:00
Pankaj Garg
94dc8fed55
Check program modification slots during cold start ( #31331 )
2023-04-28 06:22:14 -07:00
HaoranYi
684901879d
Refactor squash timing report ( #31041 )
...
* typo
* refactor squash timing report
* address review comments
2023-04-05 08:53:49 -05:00
Brooks
e7887cfb06
RootBankCache must use Acquire-Release semantics when accessing BankForks::root ( #30936 )
2023-03-28 14:35:02 -04:00
Pankaj Garg
375f9ae41d
LoadedPrograms cache implementation and tests ( #30139 )
2023-02-08 13:24:44 -08:00
Brennan
8312141f87
Move bank tests to separate file ( #29912 )
2023-02-02 16:32:22 -08:00
Brooks Prumo
2bafb0cb12
Requires EAH state cannot be Invalid ( #28817 )
2022-11-17 11:01:01 -05:00
Brooks Prumo
d798e751a0
Disables EAH with short epochs ( #28803 )
2022-11-15 13:26:19 -05:00
Brooks Prumo
f158bab0ef
Tracks how long background requests wait before processing ( #28581 )
2022-10-25 12:10:53 -04:00
Brooks Prumo
1cc9cf927c
Supports warping with Epoch Accounts Hash ( #28459 )
2022-10-19 10:37:14 -04:00
Brooks Prumo
31c2b29941
Sends both an EAH and a snapshot request from `set_root()` ( #28363 )
2022-10-14 11:00:04 -04:00
Brooks Prumo
a8c6a9e5fc
Bank::freeze() waits for EAH calculation to complete ( #28170 )
2022-10-05 17:44:35 -04:00
Brooks Prumo
2f8f6c6a31
Send Epoch Accounts Hash requests from set_root() ( #27764 )
2022-09-30 14:59:41 -04:00
apfitzge
ca55fc8a05
root_bank_cache ( #27985 )
...
* BankForks: atomic root
* root bank cache
* fix and clean up
* added some tests
2022-09-23 15:01:03 -05:00
Brooks Prumo
1ee595ca9c
remove AccountsDb::initial_blockstore_processing_complete ( #27974 )
2022-09-22 13:52:04 -04:00
Jeff Washington (jwash)
f2d6a7ecea
bank.initial_blockstore_processing_complete to avoid concurrent hash calculations ( #27776 )
...
* bank.initial_blockstore_processing_complete to avoid concurrent hash calculations
* Update runtime/src/bank.rs
Co-authored-by: Brooks Prumo <brooks@prumo.org>
* Update runtime/src/bank.rs
Co-authored-by: Brooks Prumo <brooks@prumo.org>
* Rename TestValidator::set_startup_verification_complete()
* Initialize with `AtomicBool::new(false)` instead of `default()`
* snapshot tests: move where `initial_blockstore_processing_completed()` is called
* fixup bank_forks.rs calling `is_initial_blockstore_processing_complete()`
* only call initial_blockstore_processing_completed() in blockstore_processor
Co-authored-by: Brooks Prumo <brooks@prumo.org>
Co-authored-by: Brooks Prumo <brooks@solana.com>
2022-09-19 13:00:21 -07:00
Brooks Prumo
d36c5774a1
Use `.find()` instead of loop+filter+break for sending snapshot request ( #27674 )
2022-09-10 19:11:37 -04:00
Brooks Prumo
2b554560fd
Send snapshot request for correct bank in set_root() ( #27673 )
2022-09-09 17:30:37 -04:00
Brooks Prumo
6a322de845
Make Accounts Background Services aware of Epoch Accounts Hash ( #27626 )
2022-09-07 20:41:40 +00:00
Brennan Watt
467cb5def5
Concurrent slot replay ( #26465 )
...
* Concurrent replay slots
* Split out concurrent and single bank replay paths
* Sub function processing of replay results for readability
* Add feature switch for concurrent replay
2022-07-28 11:33:19 -07:00
Jeff Washington (jwash)
557bf6e656
allow initial hash calc to occur in bg ( #26271 )
...
* allow initial hash calc to occur in bg
* validator_initialized -> startup_verification_complete
* add infos for leader and vote
* rework snapshot for startup verification
* change to assert
2022-06-29 16:48:33 -05:00
Brooks Prumo
877fedadac
Remove StatusCacheRc type and use StatusCache directly ( #26184 )
2022-06-24 08:38:56 -05:00
Brooks Prumo
23c50a2389
Add StatusCache::root_slot_deltas() and use it ( #26170 )
2022-06-23 15:19:06 -05:00
Brooks Prumo
0dd3c6bf1f
Split up accounts data size field ( #25495 )
2022-05-24 20:26:32 -04:00
sakridge
3d96a1ab76
Block packets in vote-only mode ( #24906 )
2022-05-14 17:53:37 +02:00
Justin Starry
4e58b3870c
Update all BankForks methods to return owned values ( #24801 )
2022-04-28 18:51:00 +00:00
HaoranYi
9044cd7179
Check insert optimization for bank_forks ( #24641 )
...
* check insert optimization
* clippy suggested simplification
2022-04-25 19:17:21 -05:00
Michael Vines
6d5bbca630
Pacify clippy
2022-01-21 19:12:57 -08:00
Brooks Prumo
70633b5c2f
Add Bank::accounts_data_len to SetRootMetrics ( #22509 )
2022-01-14 20:00:07 -06:00
Justin Starry
b1d9a2e60e
Don't forward packets received from TPU forwards port ( #22078 )
...
* Don't forward packets received from TPU forwards port
* Add banking stage test
2021-12-29 19:34:31 +01: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
sakridge
c4d68063c7
Add timing for accounts add_root ( #21379 )
2021-11-22 18:29:45 +01:00
sakridge
398af132a5
More set_root metrics ( #21286 )
2021-11-15 16:28:18 -07:00
carllin
706b60b5c8
Add `set_root` bank drop logging ( #21144 )
2021-11-06 01:05:36 +00:00
sakridge
1e5212e60d
Add set_root timing metrics ( #21119 )
2021-11-02 18:23:35 +01:00
Jeff Washington (jwash)
14361906ca
for all tests, bank::new -> bank::new_for_tests ( #19064 )
2021-08-05 08:42:38 -05:00
carllin
4d3e301ee4
Introduce slot dumping to ReplayStage ( #18160 )
2021-07-08 19:07:32 -07:00