You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
walnut-the-cat
changed the title
[stateless_validation] Load memtrie async on catchup
[[stateless_validation] Load memtrie async on catchup
Apr 10, 2024
walnut-the-cat
changed the title
[[stateless_validation] Load memtrie async on catchup
[P2][stateless_validation] Load memtrie async on catchup
Apr 10, 2024
staffik
changed the title
[P2][stateless_validation] Load memtrie async on catchup
[stateless_validation] Load memtrie async on catchup
Apr 12, 2024
**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.
Follow-up to #10564.
Memtrie loading on catch-up must happen asynchronously.
The text was updated successfully, but these errors were encountered: