Closed hilmarx closed 4 years ago
This issue is tightly coupled to #205 and #204
Yes, I think the canSubmitTask
function's main purpose is to be a convenience API for Providers to make all sorts of sanity checks easily before submitting a Task. This sanity check also includes a check that their currently assigned executor is minStaked
or indeed that an executor is assigned at all.
I think we can keep it this way, as for example an Executor that is unwilling to increase his stake to match a new minExecutorStake requirement, should still retain the privilege to execute all the Tasks that he had been monitoring for maybe months, and then exit the system.
New Tasks cannot be assigned to him anyway during that "graceful exit" period.
Decision on phone with @hilmarx
Include in canExec
Included in #213 with commit 4994f5865699fcc3190a58f0aac6e2f265bd6aa7
Effect:
Executors that are not min. staked any more do not get any new tasks assigned to them, because they e.g. did not top up after the minExecutorStake was increased. However in practice, I doubt that minStake will be made higher any time soon and otherwise executors can only unstake if they re-assigned all their providers to another executor.
Hence the only real use case I see for this check being in
canSubmitTask
, is that it is a sanity check for providers to have on their UI to see if they did indeed assign an executor and did not forget about it.However, this could also easily be done off-chain.