-
Notifications
You must be signed in to change notification settings - Fork 731
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Support purely single threaded execution #370
Conversation
8f87821
to
5d4ded8
Compare
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
LGTM. Can you add an entry to fork.yaml
, to track this change (workers.go
and hasher.go
in particular, statedb.go
already has some description elsewhere), and a short description referencing the single-threaded program proving context?
@protolambda Good call-out - updated fork.yaml. |
When only a single CPU is available: * Avoid creating threads in StateDB.IntermediateRoot * Force single threaded hashing
When only a single CPU is available: * Avoid creating threads in StateDB.IntermediateRoot * Force single threaded hashing
When only a single CPU is available: * Avoid creating threads in StateDB.IntermediateRoot * Force single threaded hashing
When only a single CPU is available: * Avoid creating threads in StateDB.IntermediateRoot * Force single threaded hashing
Description
Modifies
StateDB
to execute all tasks on a single thread when there is a single CPU rather than spawning go routines to compute account storage roots in parallel. Also ensures the hasher only uses parallel mode when there are multiple CPUs available to accelerate the work.This ensures compatibility with cannon where there is only a single CPU and thread creation is not supported.