golemfactory / clay

Golem is creating a global market for computing power.
https://golem.network
GNU General Public License v3.0
2.91k stars 286 forks source link

Task which was not created due to lack of funds appears on a task list #4536

Closed ederenn closed 4 years ago

ederenn commented 5 years ago

Description

Golem Version: 0.20.1+dev294.gffa862e binaries from: https://github.com/golemfactory/golem/pull/4417

Golem-Messages version (leave empty if unsure):3.9.0

Electron version (if used): 0.2.1

OS [e.g. Windows 10 Pro]:Mac OS

Branch (if launched from source): asyncio_reactor

Mainnet/Testnet: mainnet

Priority label is set to the lowest by default. To setup higher priority please change the label P0 label is set for Severity-Critical/Effort-easy P1 label is set for Severity-Critical/Effort-hard P2 label is set for Severity-Low/ Effort-easy P3 label is set for Severity-Low/Effort-hard

Description of the issue:

Golem has created already finished task in a task list. Task time shown is wrong. Task hadn't been started at all, finished time is the same as error entry 2019-07-24 14:27:57 ERROR golem.task.taskmanager Cannot create task. id=None : Not enough funds available.

Screenshots:

Screen Shot 2019-07-24 at 15 10 03 Screen Shot 2019-07-24 at 15 43 38

Expected behavior

Golem should inform in modal about not enough funds instead of creating an empty task

Logs and any additional context

2019-07-24 14:27:57 INFO     golem.task.rpc                      Creating task. task_dict={'resources': ['/Users/a/Desktop/scene-Helicopter-27-cycles.blend'], 'taskName': 'scene-Helicopter-27-cycles.blend', 'relativePath': '/Users/a/Desktop/scene-Helicopter-27-cycles.blend', 'name': 'scene-Helicopter-40', 'type': 'Blender', 'bid': '0.1', 'compute_on': 'cpu', 'concent_enabled': False, 'estimated_memory': 55492608, 'subtasks_count': 40, 'subtask_timeout': '0:10:00', 'timeout': '0:30:00', 'options': {'frames': '1-10', 'format': 'PNG', 'compositing': False, 'output_path': '/Users/a/Documents', 'resolution': [400, 400]}}
2019-07-24 14:27:57 INFO     golem.task.taskmanager              Creating task. type=<class 'apps.blender.task.blenderrendertask.BlenderRenderTask'>, id=7803477a-ae0e-11e9-89eb-e11c1025ea6e
2019-07-24 14:27:57 ERROR    golem.task.taskmanager              Cannot create task. id=None : Not enough funds available.

Proposed Solution?

(Optional: What could be a solution for that issue)

mfranciszkiewicz commented 5 years ago

ClientProvider.create_task performs a check whether the requestor has enough funds via _validate_enough_funds_to_pay_for_task. Validation passes, but task creation fails due to Not enough funds available

shadeofblue commented 5 years ago

@ederenn which branch is this?

mfranciszkiewicz commented 5 years ago

@shadeofblue asyncio_reactor but the code is the same as in develop

mfranciszkiewicz commented 5 years ago

Addressed in https://github.com/golemfactory/golem/pull/4542. GUI does not handle the new statuses yet.

ederenn commented 5 years ago

same happens for g_filite tasks on mainnet, branch b0.21

INFO     [golemapp                           ] GOLEM Version: 0.20.2+dev513.g0156ca7
INFO     [golemapp                           ] golem_messages Version: 3.11.0

Screenshot from 2019-09-10 16-13-14

from golem.log:

INFO     [golem.task.rpc                     ] Creating task. task_dict={'bid': 1.0, 'name': 'g_flite', 'options': {'input_dir': '/tmp/g_flitefpSj4L/in', 'js_name': 'g_flite.js', 'output_dir': '/tmp/g_flitefpSj4L/out', 'subtasks': {'subtask_0': {'exec_args': ['in.txt', 'in.wav'], 'output_file_paths': ['in.wav']}, 'subtask_1': {'exec_args': ['in.txt', 'in.wav'], 'output_file_paths': ['in.wav']}}, 'wasm_name': 'g_flite.wasm'}, 'subtask_timeout': '00:05:00', 'timeout': '00:10:00', 'type': 'wasm'}
INFO     [golem.task.taskmanager             ] Creating task. type=<class 'apps.wasm.task.WasmTask'>, id=56d34e0a-d3d4-11e9-953d-2f67ff27ad1e
ERROR    [golem.task.taskmanager             ] Cannot create task. task_id=56d34e0a-d3d4-11e9-953d-2f67ff27ad1e : Not enough funds available.
Required GNT: 0.333333, available: 0.000000
Required ETH: 0.002780, available: 0.000000

ERROR    [golem.task.taskmanager             ] Cannot create task. task_id=None : Not enough funds available.
Required GNT: 0.333333, available: 0.000000
Required ETH: 0.002780, available: 0.000000
mfranciszkiewicz commented 4 years ago

@ederenn Can we close this issue?

ZmijaWA commented 4 years ago

Yes we can