spacemeshos / post

Spacemesh POST protocol implementation
MIT License
19 stars 20 forks source link

Avoid initializing work oracle if not needed #208

Closed poszu closed 1 year ago

poszu commented 1 year ago

Currently, the work oracle (de facto the OpenCL provider) is created always, regardless of whether labels need to be generated. This is suboptimal and causes issues for users who moved their data to a setup w/o a GPU OpenCL provider (but forgot to remove provider-id configuration).

The proposed solution is to initialize the work oracle lazily, only when it is needed.