spacemeshos / post

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

Remove automatic selection for best provider #212

Closed fasmat closed 1 year ago

fasmat commented 1 year ago

Description

At the moment the node defaults to provider -1 in their config if not set to a different provider by the user. This value is problematic for multiple reasons:

  1. The provider ID is an uint which means -1 will be cast to either 2^32 - 1 or 2^64 - 1 depending on the system.
  2. The CPU provider of post-rs has the hard coded ID 2^32 -1 which can cause the node to do a benchmarks when not intended.

Acceptance criteria