-
Notifications
You must be signed in to change notification settings - Fork 2k
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
[CHIA-1087] validate blocks in thread pool (instead of process pool) (#…
…18681) * bump chia_rs dependency and accomodate for changes to SpendBundleConditions and run_block_generator() * use ThreadPoolExecutor instead of ProcessPoolExecutor in pre_validate_blocks_multiprocessing * don't serialize BlockRecords when passing into pre_validate_blocks_multiprocessing * dont' pickle the list of full blocks passed into batch_pre_validate_blocks * don't serialize conditions when passed to batch_pre_validate_blocks * don't serialize previous session blocks passed to batch_pre_validate_blocks * don't serialize the return value from batch_pre_validate_blocks * make the batch size 1, in pre_validate_blocks_multiprocessing(). With the jobs running in a thread pool, there's no serialization cost we need to amortize over a batch * make batch_pre_validate_blocks() only validate a single block at a time. rename it to pre_validate_block() * avoid copying recent_blocks into each validation job. since they run in a thread we can just use the blockchain object directly * merge loops over the blocks in pre_validate_blocks_multiprocessing(), to simplify the code and to build fewer temporary lists
- Loading branch information
Showing
3 changed files
with
104 additions
and
192 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
Oops, something went wrong.