-
Notifications
You must be signed in to change notification settings - Fork 684
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
[stateless_validation] Load memtrie async on catchup (#10983)
**Context** Issue: #10982 Follow up to: #10820. Modifies StateSync state machine so that memtrie load happens asynchronously on catchup. **Summary** * Split `chain.set_state_finalize()` into: * `create_flat_storage_for_shard()` * `schedule_load_memtrie()` * actual `set_state_finalize()` * ^ we need it because creating flat storage and state finalize requires `chain` which cannot be passed in a message to the separate thread. * Code to trigger memtrie load in a separate thread, analogously to how apply state parts is done. * Modify shard sync stages: * `StateDownloadScheduling` --> `StateApplyScheduling` * Just changed the name as it was confusing. What happens there is scheduling applying of state parts. * `StateDownloadApplying` --> `StateApplyComplete` * What it actually did before was initializing flat storage and finalizing state update after state apply from previous stage. * Now it only initializes flat storage and schedules memtrie loading. * `StateDownloadComplete` --> `StateApplyFinalizing` * Before it was just deciding what next stage to transit into. * Now it also contains the finalizing state update logic that was previously in the previous stage. Integration tests are to be done as a part of: #10844.
- Loading branch information
Showing
14 changed files
with
261 additions
and
108 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Oops, something went wrong.