forked from near/nearcore
-
Notifications
You must be signed in to change notification settings - Fork 0
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Optimise memory usage while loading genesis (near#4269)
1. Adding option of streaming records to Genesis 2. Applying genesis records in chunks (not only in case of streaming) * opt out of records loading while loading config * create GenesisValidator to allow validation while streaming records * adding streaming records from genesis and records files * adding records file path and streaming to Genesis * stream records from file in json_hash if records field is empty * stream records from file in genesis validation * encapsulate records iteration vs streaming logic * apply genesis state in chunks * refactor process_records usage * switch to streaming genesis in neard run * remove unused import * increase chunk size * punctuation * refactor genesis streaming * refactor ref * remove pub from GenesisValidator * Borrow<StateRecord> -> &StateRecord * process_records -> for_each_record * move genesis processing to separate file & genesis chunk -> genesis batch * make GenesisStateApplier stateless * pass error from File::open * make RecordsProcessor visitor universal * fix imports * move imports to tests * new_as_is -> new_with_path * minor fixes: imports and visibility
- Loading branch information
1 parent
a0177cd
commit 884c6d1
Showing
11 changed files
with
591 additions
and
280 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
Oops, something went wrong.