truebit-eth
truebit-eth copied to clipboard
Solver and verifier pick up task without having the minimum required deposit balance to work on the task
Issue:
- Task giver submitted the factorial task today with a minimum deposit of 5,000 specified.
- Solver and Verifier tried to pick up the task. However, neither had enough TRU deposited into the incentive layer to meet the 5.000 minimum. Both the verifier and the solver burnt ~0.005 TRU on gas fees for a task that they knew a prior they couldn't work on.
Proposed solution: client should check the deposit balance before the Solver registers for a task
Reference:
[05-01 01:50:08] info: SOLVER [TASK 0x6ae]: Task 0x6ae4b82ca292916c41d126437b47883c1d35b0e1fa494749afebe9eb46470eaa has been posted with Solver reward 1.8, minimum deposit 5000, and blockLimit 1 (ratio 1.8). Checking for availability, setting up VM, and retrieving file(s).
Getting file { name: 'factorial.wast', size: 314, type: 'contract' }
Executing: ./../wasm-client/ocaml-offchain/interpreter/wasm -m -disable-float -input -memory-size 16 -stack-size 14 -table-size 8 -globals-size 8 -call-stack-size 10 -case 0 task.wast
[05-01 01:50:13] info: SOLVER [TASK 0x6ae]: Created local directory: /truebit-eth/tmp.solver_2po012lbgs00
[05-01 01:51:42] info: SOLVER [TASK 0x6ae]: Ending Solver selection period.
Waiting...
[05-01 01:51:58] warn: SOLVER [TASK 0x6ae]: Re-ending Solver selection period.
Waiting...
[05-01 01:52:10] warn: SOLVER [TASK 0x6ae]: Another Solver with account 0x13d784bf032151818688041f9e46af92d29ae505 has been selected for this task.
[05-01 01:52:10] warn: SOLVER [TASK 0x6ae]: My bonded deposit for task 0x6ae4b82ca292916c41d126437b47883c1d35b0e1fa494749afebe9eb46470eaa is zero.
(node:3240) UnhandledPromiseRejectionWarning: TypeError: Cannot set property 'taskInfo' of undefined
at registerTask (/snapshot/truebit/wasm-client/solver.js)
at runMicrotasks (truebit-os --trace-warnings ...
to show where the warning was created)
(node:3240) UnhandledPromiseRejectionWarning: Unhandled promise rejection. This error originated either by throwing inside of an async function without a catch block, or by rejecting a promise which was not handled with .catch(). To terminate the node process on unhandled promise rejection, use the CLI flag --unhandled-rejections=strict
(see https://nodejs.org/api/cli.html#cli_unhandled_rejections_mode). (rejection id: 1)
(node:3240) [DEP0018] DeprecationWarning: Unhandled promise rejections are deprecated. In the future, promise rejections that are not handled will terminate the Node.js process with a non-zero exit code.