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:
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.
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
Remove -1 as identifier for "select best provider". The user has to select a provider explicitly via Smapp or the config file.
Remove automatic benchmarking; but not manually triggered (used by Smapp to display speeds of providers to user)
Default to CPU provider in config, so that unit and system tests still behave as expected
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:
uint
which means-1
will be cast to either2^32 - 1
or2^64 - 1
depending on the system.2^32 -1
which can cause the node to do a benchmarks when not intended.Acceptance criteria
-1
as identifier for "select best provider". The user has to select a provider explicitly via Smapp or the config file.