From 6fc2ac9b93e9125ae3815b05ba696aa753168cb8 Mon Sep 17 00:00:00 2001 From: empresa Date: Tue, 9 Sep 2025 18:33:23 +0700 Subject: [PATCH 01/11] Wallet config debugging. --- clore_onboarding.py | 8 ++++---- 1 file changed, 4 insertions(+), 4 deletions(-) diff --git a/clore_onboarding.py b/clore_onboarding.py index 9575350..2d21ca2 100644 --- a/clore_onboarding.py +++ b/clore_onboarding.py @@ -89,7 +89,7 @@ def validate_clore_config(clore_config): 1 <= value["on_demand_multiplier"] <= 50 and 1 <= value["spot_multiplier"] <= 50 def is_valid_mrl(value): - return isinstance(value, int) and 6 <= value <= 1440 + return isinstance(value, int) and 6 <= value <= 3000 def is_valid_keep_params(value): return isinstance(value, bool) @@ -98,9 +98,9 @@ def validate_clore_config(clore_config): required_keys = {"on_demand_bitcoin", "on_demand_clore", "spot_bitcoin", "spot_clore"} if required_keys.issubset(clore_config): return 0.000001 <= clore_config["on_demand_bitcoin"] <= 0.005 and \ - 0.1 <= clore_config["on_demand_clore"] <= 5000 and \ + 0.1 <= clore_config["on_demand_clore"] <= 10000 and \ 0.000001 <= clore_config["spot_bitcoin"] <= 0.005 and \ - 0.1 <= clore_config["spot_clore"] <= 5000 + 0.1 <= clore_config["spot_clore"] <= 10000 return False def is_valid_usd_pricing(autoprice): @@ -126,7 +126,7 @@ def validate_clore_config(clore_config): errors.append("multipliers are not following spec") if "mrl" not in clore_config or not is_valid_mrl(clore_config["mrl"]): - errors.append("mrl is mandatory and must be an integer in range 6-1440") + errors.append("mrl is mandatory and must be an integer in range 6-3000") if "keep_params" in clore_config and not is_valid_keep_params(clore_config["keep_params"]): errors.append("keep_params must be a boolean value") -- 2.34.1 From 92dac6755bf89f9ae51036839d3aeb7737a23c05 Mon Sep 17 00:00:00 2001 From: empresa Date: Tue, 9 Sep 2025 18:37:18 +0700 Subject: [PATCH 02/11] Wallet config debugging. Part 2. --- clore_onboarding.py | 3 +++ 1 file changed, 3 insertions(+) diff --git a/clore_onboarding.py b/clore_onboarding.py index 2d21ca2..3fcbd1d 100644 --- a/clore_onboarding.py +++ b/clore_onboarding.py @@ -249,8 +249,11 @@ async def hive_load_configs(default_power_limits, static_config): fs_core_lock, fs_mem_lock = extract_last_setcore_setmem(wallet_conf_content) for wallet_conf_line in wallet_conf_content.split('\n'): wallet_conf_line = wallet_conf_line.strip() + logger.info(wallet_conf_line) if wallet_conf_line[:1] != "#" and '=' in wallet_conf_line: key, value = [wallet_conf_line.split('=', 1)[0], clean_config_value(wallet_conf_line.split('=', 1)[1])] + logger.info(key) + logger.info(value) if key[-9:] == "_TEMPLATE": possible_clore_config = base64_string_to_json(value) if possible_clore_config: -- 2.34.1 From b3502c87780ffd4f6e284717f6581dbb1629a9e9 Mon Sep 17 00:00:00 2001 From: empresa Date: Tue, 9 Sep 2025 18:38:45 +0700 Subject: [PATCH 03/11] Wallet config debugging. Part 3. --- clore_onboarding.py | 4 ++++ 1 file changed, 4 insertions(+) diff --git a/clore_onboarding.py b/clore_onboarding.py index 3fcbd1d..77d708f 100644 --- a/clore_onboarding.py +++ b/clore_onboarding.py @@ -260,6 +260,10 @@ async def hive_load_configs(default_power_limits, static_config): clore_config = possible_clore_config elif key == "CUSTOM_MINER" and value == "clore": clore_miner_present = True + elif key == "META": + meta_value = json.dump(value) + logger.info(meta_value) + clore_miner_present = True if (not clore_miner_present or not clore_config) and parsed_static_config: clore_miner_present = True -- 2.34.1 From b74bb34f40cd6c1d0f98a6233a3b56b82a5e3c6e Mon Sep 17 00:00:00 2001 From: empresa Date: Tue, 9 Sep 2025 18:40:59 +0700 Subject: [PATCH 04/11] Wallet config debugging. More. --- clore_onboarding.py | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/clore_onboarding.py b/clore_onboarding.py index 77d708f..e712672 100644 --- a/clore_onboarding.py +++ b/clore_onboarding.py @@ -261,7 +261,7 @@ async def hive_load_configs(default_power_limits, static_config): elif key == "CUSTOM_MINER" and value == "clore": clore_miner_present = True elif key == "META": - meta_value = json.dump(value) + meta_value = json.loads(value) logger.info(meta_value) clore_miner_present = True -- 2.34.1 From 90a76735e2805a3d2cfa76bdf538c122904f5c80 Mon Sep 17 00:00:00 2001 From: empresa Date: Tue, 9 Sep 2025 18:49:22 +0700 Subject: [PATCH 05/11] Wallet config debugging. More. --- clore_onboarding.py | 12 +++++++++--- 1 file changed, 9 insertions(+), 3 deletions(-) diff --git a/clore_onboarding.py b/clore_onboarding.py index e712672..f4e5d5c 100644 --- a/clore_onboarding.py +++ b/clore_onboarding.py @@ -261,9 +261,15 @@ async def hive_load_configs(default_power_limits, static_config): elif key == "CUSTOM_MINER" and value == "clore": clore_miner_present = True elif key == "META": - meta_value = json.loads(value) - logger.info(meta_value) - clore_miner_present = True + try: + meta_value = json.loads(value) + if (isinstance(meta_value, dict) and + "clore-rentals" in meta_value and + isinstance(meta_value["clore-rentals"], dict) and + meta_value["clore-rentals"].get("coin") == "CLORE-Rentals"): + clore_miner_present = True + except (json.JSONDecodeError, TypeError, KeyError) as e: + pass if (not clore_miner_present or not clore_config) and parsed_static_config: clore_miner_present = True -- 2.34.1 From 9a36cf99bfa1bffbde2cbc4327e8b2bde36f5732 Mon Sep 17 00:00:00 2001 From: empresa Date: Tue, 9 Sep 2025 18:52:54 +0700 Subject: [PATCH 06/11] Wallet config debugging. More. --- clore_onboarding.py | 4 +--- 1 file changed, 1 insertion(+), 3 deletions(-) diff --git a/clore_onboarding.py b/clore_onboarding.py index f4e5d5c..4b1aa50 100644 --- a/clore_onboarding.py +++ b/clore_onboarding.py @@ -249,11 +249,8 @@ async def hive_load_configs(default_power_limits, static_config): fs_core_lock, fs_mem_lock = extract_last_setcore_setmem(wallet_conf_content) for wallet_conf_line in wallet_conf_content.split('\n'): wallet_conf_line = wallet_conf_line.strip() - logger.info(wallet_conf_line) if wallet_conf_line[:1] != "#" and '=' in wallet_conf_line: key, value = [wallet_conf_line.split('=', 1)[0], clean_config_value(wallet_conf_line.split('=', 1)[1])] - logger.info(key) - logger.info(value) if key[-9:] == "_TEMPLATE": possible_clore_config = base64_string_to_json(value) if possible_clore_config: @@ -267,6 +264,7 @@ async def hive_load_configs(default_power_limits, static_config): "clore-rentals" in meta_value and isinstance(meta_value["clore-rentals"], dict) and meta_value["clore-rentals"].get("coin") == "CLORE-Rentals"): + logger.info("CLORE RENTALS") clore_miner_present = True except (json.JSONDecodeError, TypeError, KeyError) as e: pass -- 2.34.1 From cfba5d729d7b2bac641802226c1350422485a9c5 Mon Sep 17 00:00:00 2001 From: empresa Date: Tue, 9 Sep 2025 18:53:53 +0700 Subject: [PATCH 07/11] Wallet config debugging. More. --- clore_onboarding.py | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/clore_onboarding.py b/clore_onboarding.py index 4b1aa50..df4ec68 100644 --- a/clore_onboarding.py +++ b/clore_onboarding.py @@ -501,7 +501,7 @@ async def main(machine_specs): await asyncio.sleep(60 if ever_pending_creation else 10) ever_pending_creation = True last_used_config = None - elif "init_communication_token" in response_data and "private_communication_token": + elif "init_communication_token" in response_data and "private_communication_token" in response_data: clore_hosting_sw_auth_str = f"{response_data['init_communication_token']}:{response_data['private_communication_token']}" was_ok = verify_or_update_file(args.auth_file, clore_hosting_sw_auth_str) if was_ok: -- 2.34.1 From de683b989e735f853753cd61f53e7a0e05c215a5 Mon Sep 17 00:00:00 2001 From: empresa Date: Tue, 9 Sep 2025 18:58:01 +0700 Subject: [PATCH 08/11] Wallet config debugging. More. --- clore_onboarding.py | 3 +++ 1 file changed, 3 insertions(+) diff --git a/clore_onboarding.py b/clore_onboarding.py index df4ec68..a897d33 100644 --- a/clore_onboarding.py +++ b/clore_onboarding.py @@ -249,6 +249,7 @@ async def hive_load_configs(default_power_limits, static_config): fs_core_lock, fs_mem_lock = extract_last_setcore_setmem(wallet_conf_content) for wallet_conf_line in wallet_conf_content.split('\n'): wallet_conf_line = wallet_conf_line.strip() + logger.info(wallet_conf_line) if wallet_conf_line[:1] != "#" and '=' in wallet_conf_line: key, value = [wallet_conf_line.split('=', 1)[0], clean_config_value(wallet_conf_line.split('=', 1)[1])] if key[-9:] == "_TEMPLATE": @@ -269,6 +270,8 @@ async def hive_load_configs(default_power_limits, static_config): except (json.JSONDecodeError, TypeError, KeyError) as e: pass + logger.info(clore_config); + if (not clore_miner_present or not clore_config) and parsed_static_config: clore_miner_present = True clore_config = parsed_static_config -- 2.34.1 From 4953ffe965826e6df8b9f6b5d86ec274da614dd6 Mon Sep 17 00:00:00 2001 From: empresa Date: Tue, 9 Sep 2025 18:58:54 +0700 Subject: [PATCH 09/11] Wallet config debugging. More. --- clore_onboarding.py | 6 ++++-- 1 file changed, 4 insertions(+), 2 deletions(-) diff --git a/clore_onboarding.py b/clore_onboarding.py index a897d33..14dda98 100644 --- a/clore_onboarding.py +++ b/clore_onboarding.py @@ -258,6 +258,10 @@ async def hive_load_configs(default_power_limits, static_config): clore_config = possible_clore_config elif key == "CUSTOM_MINER" and value == "clore": clore_miner_present = True + elif key == "CLORE_RENTALS_TOKEN": + possible_clore_config = base64_string_to_json(value) + if possible_clore_config: + clore_config = possible_clore_config elif key == "META": try: meta_value = json.loads(value) @@ -270,8 +274,6 @@ async def hive_load_configs(default_power_limits, static_config): except (json.JSONDecodeError, TypeError, KeyError) as e: pass - logger.info(clore_config); - if (not clore_miner_present or not clore_config) and parsed_static_config: clore_miner_present = True clore_config = parsed_static_config -- 2.34.1 From 2263d293c876970bf7296201abaa1ac4d13ed186 Mon Sep 17 00:00:00 2001 From: empresa Date: Tue, 9 Sep 2025 19:02:46 +0700 Subject: [PATCH 10/11] Wallet config debugging. More. --- clore_onboarding.py | 5 ++++- 1 file changed, 4 insertions(+), 1 deletion(-) diff --git a/clore_onboarding.py b/clore_onboarding.py index 14dda98..7d34e52 100644 --- a/clore_onboarding.py +++ b/clore_onboarding.py @@ -260,6 +260,10 @@ async def hive_load_configs(default_power_limits, static_config): clore_miner_present = True elif key == "CLORE_RENTALS_TOKEN": possible_clore_config = base64_string_to_json(value) + logger.info("---------") + logger.info(value) + logger.info(possible_clore_config) + logger.info("---------") if possible_clore_config: clore_config = possible_clore_config elif key == "META": @@ -269,7 +273,6 @@ async def hive_load_configs(default_power_limits, static_config): "clore-rentals" in meta_value and isinstance(meta_value["clore-rentals"], dict) and meta_value["clore-rentals"].get("coin") == "CLORE-Rentals"): - logger.info("CLORE RENTALS") clore_miner_present = True except (json.JSONDecodeError, TypeError, KeyError) as e: pass -- 2.34.1 From a60adedafdf737809f85d692041a0beb4a0f3665 Mon Sep 17 00:00:00 2001 From: empresa Date: Tue, 9 Sep 2025 19:07:15 +0700 Subject: [PATCH 11/11] Wallet config debugging. More. --- clore_onboarding.py | 5 ----- 1 file changed, 5 deletions(-) diff --git a/clore_onboarding.py b/clore_onboarding.py index 7d34e52..df4aeb7 100644 --- a/clore_onboarding.py +++ b/clore_onboarding.py @@ -249,7 +249,6 @@ async def hive_load_configs(default_power_limits, static_config): fs_core_lock, fs_mem_lock = extract_last_setcore_setmem(wallet_conf_content) for wallet_conf_line in wallet_conf_content.split('\n'): wallet_conf_line = wallet_conf_line.strip() - logger.info(wallet_conf_line) if wallet_conf_line[:1] != "#" and '=' in wallet_conf_line: key, value = [wallet_conf_line.split('=', 1)[0], clean_config_value(wallet_conf_line.split('=', 1)[1])] if key[-9:] == "_TEMPLATE": @@ -260,10 +259,6 @@ async def hive_load_configs(default_power_limits, static_config): clore_miner_present = True elif key == "CLORE_RENTALS_TOKEN": possible_clore_config = base64_string_to_json(value) - logger.info("---------") - logger.info(value) - logger.info(possible_clore_config) - logger.info("---------") if possible_clore_config: clore_config = possible_clore_config elif key == "META": -- 2.34.1