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

setting [accept_tasks] is set to true always after requesting a task #5188

Open ederenn opened 4 years ago

ederenn commented 4 years ago

Description

Golem Version: 0.23.0+dev57.gfd36d37

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

Electron version (if used): 2.6.0

OS [e.g. Windows 10 Pro]: checked on Mac OS Mojave, possibly happens on all systems

Branch (if launched from source):

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:

Setting "I want to act as a Requestor. Don't send tasks to my node" works just only until first task was requested. Same happens when "requesting only" is enabled from CLI or from GUI.

Actual result:

setting │ Accept tasks [accept_tasks] is set to true always after requesting a task

Steps To Reproduce

Short description of steps to reproduce the behavior: e.g.

From interface:

  1. Launch the app
  2. In network tab click Stop Golem button
  3. Switch on "I want to act only as a requestor"
  4. Click Start Golem button
  5. Wait for node to connect to the network
  6. Check from CLI golemcli settings show , it should show Accept tasks [accept_tasks] │ false
  7. Request a task. Wait for task to finish.
  8. Check from CLI golemcli settings show , it shows Accept tasks [accept_tasks] │ true

From CLI:

  1. Launch the app
  2. In terminal type in golemcli settings set accept_tasks false
  3. Check from CLI golemcli settings show , it should show Accept tasks [accept_tasks] │ false
  4. Request a task. Wait for task to finish.
  5. Check from CLI golemcli settings show , it shows Accept tasks [accept_tasks] │ true

Expected behavior

Requesting a task should not switch the flag

Logs and any additional context

as-Mac:Desktop a$ golemcli settings set accept_tasks false
Accept tasks [accept_tasks] = false
as-Mac:Desktop a$ golemcli settings show 
┌───────────────────────────────────────────────────────────────────────┬───────────┬─────────────────────────┐
│  description [name]                                                   │  value    │  type                   │
├───────────────────────────────────────────────────────────────────────┼───────────┼─────────────────────────┤
│                                                                       │           │                         │
│  General                                                              │           │                         │
│                                                                       │           │                         │
│  Node name [node_name]                                                │           │  str                    │
│  Accept tasks [accept_tasks]                                          │  false    │  bool                   │
│  Interval between task requests [getting_tasks_interval]              │  4        │  float [s]              │
│  Interval between peer requests [getting_peers_interval]              │  4        │  float [s]              │
│  Task session timeout [task_session_timeout]                          │  900      │  float [s]              │
│  P2P session timeout [p2p_session_timeout]                            │  240      │  float [s]              │
│  Use IPv6 [use_ipv6]                                                  │  false    │  bool                   │
│  Use UPnP for port forwarding. [use_upnp]                             │  true     │  bool                   │
│  Number of peers to keep [opt_peer_num]                               │  10       │  int > 0                │
│  Send ping messages to peers [send_pings]                             │  true     │  bool                   │
│  Interval between ping messages [pings_interval]                      │  120      │  int > 0                │
│  Enable error reporting with talkback service [enable_talkback]       │  false    │  bool                   │
│  Enable reporting to golem monitor service. [enable_monitor]          │  true     │  bool                   │
│  Enable resources cleaning [cleaning_enabled]                         │  false    │  bool                   │
│                                                                       │           │                         │
│  Requestor                                                            │           │                         │
│                                                                       │           │                         │
│  Minimal provider trust [computing_trust]                             │  0        │  - 1.0 <= float <= 1.0  │
│  Max GNT/h price (requestor) [max_price]                              │  1        │  decimal [GNT]          │
│                                                                       │           │                         │
│  Provider                                                             │           │                         │
│                                                                       │           │                         │
│  Minimal requestor trust [requesting_trust]                           │  0        │  - 1.0 <= float <= 1.0  │
│  Min GNT/h price (provider) [min_price]                               │  0.1      │  decimal [GNT]          │
│  Maximal resource size [max_resource_size]                            │  6194542  │  float [kB]             │
│  Max memory size [max_memory_size]                                    │  5630852  │  int >= 1048576 [kB]    │
│  Number of CPU cores to use [num_cores]                               │  1        │  int >= 1               │
│  Interval between request task from network. [task_request_interval]  │  5        │  float                  │
└───────────────────────────────────────────────────────────────────────┴───────────┴─────────────────────────┘

checked again after requesting a task:


as-Mac:Desktop a$ golemcli settings show 
┌───────────────────────────────────────────────────────────────────────┬───────────┬─────────────────────────┐
│  description [name]                                                   │  value    │  type                   │
├───────────────────────────────────────────────────────────────────────┼───────────┼─────────────────────────┤
│                                                                       │           │                         │
│  General                                                              │           │                         │
│                                                                       │           │                         │
│  Node name [node_name]                                                │           │  str                    │
│  Accept tasks [accept_tasks]                                          │  true     │  bool                   │
│  Interval between task requests [getting_tasks_interval]              │  4        │  float [s]              │
│  Interval between peer requests [getting_peers_interval]              │  4        │  float [s]              │
│  Task session timeout [task_session_timeout]                          │  900      │  float [s]              │
│  P2P session timeout [p2p_session_timeout]                            │  240      │  float [s]              │
│  Use IPv6 [use_ipv6]                                                  │  false    │  bool                   │
│  Use UPnP for port forwarding. [use_upnp]                             │  true     │  bool                   │
│  Number of peers to keep [opt_peer_num]                               │  10       │  int > 0                │
│  Send ping messages to peers [send_pings]                             │  true     │  bool                   │
│  Interval between ping messages [pings_interval]                      │  120      │  int > 0                │
│  Enable error reporting with talkback service [enable_talkback]       │  false    │  bool                   │
│  Enable reporting to golem monitor service. [enable_monitor]          │  true     │  bool                   │
│  Enable resources cleaning [cleaning_enabled]                         │  false    │  bool                   │
│                                                                       │           │                         │
│  Requestor                                                            │           │                         │
│                                                                       │           │                         │
│  Minimal provider trust [computing_trust]                             │  0        │  - 1.0 <= float <= 1.0  │
│  Max GNT/h price (requestor) [max_price]                              │  1        │  decimal [GNT]          │
│                                                                       │           │                         │
│  Provider                                                             │           │                         │
│                                                                       │           │                         │
│  Minimal requestor trust [requesting_trust]                           │  0        │  - 1.0 <= float <= 1.0  │
│  Min GNT/h price (provider) [min_price]                               │  0.1      │  decimal [GNT]          │
│  Maximal resource size [max_resource_size]                            │  6194542  │  float [kB]             │
│  Max memory size [max_memory_size]                                    │  5630852  │  int >= 1048576 [kB]    │
│  Number of CPU cores to use [num_cores]                               │  1        │  int >= 1               │
│  Interval between request task from network. [task_request_interval]  │  5        │  float                  │
└───────────────────────────────────────────────────────────────────────┴───────────┴─────────────────────────┘
as-Mac:Desktop a$

## Proposed Solution?
_(Optional: What could be a solution for that issue)_