uw-miner-config #4

Merged
uwiger merged 10 commits from uw-miner-config into master 2025-05-28 01:56:38 +09:00
5 changed files with 11 additions and 12 deletions
Showing only changes of commit d45f64f027 - Show all commits

View File

@ -12,7 +12,7 @@
{ref, "818ce33"}}},
{gmhive_worker, {git, "https://git.qpq.swiss/QPQ-AG/gmhive_worker", {ref, "708f1a6"}}},
{gmconfig, {git, "https://git.qpq.swiss/QPQ-AG/gmconfig.git",
{ref, "32c1ed5c4b"}}},
{ref, "38620ff9e2"}}},
{gproc, "1.0.0"},
{setup, {git, "https://github.com/uwiger/setup", {ref, "3ad83ed"}}}
]}.

View File

@ -22,12 +22,8 @@
0},
{<<"gmconfig">>,
{git,"https://git.qpq.swiss/QPQ-AG/gmconfig.git",
{ref,"32c1ed5c4bc0913adc175fb18b1c9251acc7b606"}},
{ref,"38620ff9e2289dff121377c382e4d5b08c719d87"}},
0},
{<<"gmcuckoo">>,
{git,"https://git.qpq.swiss/QPQ-AG/gmcuckoo.git",
{ref,"9f3aef96d8660e83ef8b5a7ee64908060a8c6572"}},
1},
{<<"gmhive_protocol">>,
{git,"https://git.qpq.swiss/QPQ-AG/gmhive_protocol.git",
{ref,"818ce33cc1dec74c020515be48fb548a5207befd"}},

View File

@ -44,12 +44,16 @@ appl_env(K, C) ->
undefined -> C
end.
appl_env(bin_dir_hook , H , C) -> set_bin_dir_hook(H), C;
appl_env(pubkey , K , C) -> C#{<<"pubkey">> => K};
appl_env(extra_pubkeys , Ks, C) -> C#{<<"extra_pubkeys">> => Ks};
appl_env(pool_admin_url, U , C) -> merge(C, #{<<"pool_admin">> => #{<<"url">> => U}});
appl_env(workers , Ws, C) -> C#{<<"workers">> => Ws}.
env_keys() -> [pubkey, extra_pubkeys, pool_admin_url, workers, network].
set_bin_dir_hook({Mod, F}) when is_atom(Mod), is_atom(F) ->
application:set_env(gmhive_worker, bin_dir_hook, {Mod, F}).
env_keys() -> [pubkey, extra_pubkeys, pool_admin_url, workers, network, bin_dir_hook].
cpath([<<"pubkey">>]) -> [user_config ];
cpath([<<"extra_pubkeys">>]) -> [user_config, schema_default];

View File

@ -66,7 +66,7 @@ pool_admin() ->
workers() ->
array(
#{default => [#{executable => <<"mean29-generic">>,
executable_group => <<"aecuckoo">>}],
executable_group => <<"cpu">>}],
description =>
<<"Definitions of workers' configurations. If no worker are configured one worker "
"is used as default, i.e. 'mean29-generic' executable without any extra args.">>},
@ -83,9 +83,8 @@ workers() ->
"from faster CPU supporting AVX2 instructions).">>}),
executable_group =>
str(#{description => <<"Group of executable binaries of the worker.">>,
enum => [ <<"aecuckoo">>, <<"aecuckooprebuilt">>,
<<"gmcuckoo">>, <<"cuda">>, <<"gajumine">> ],
default => <<"aecuckoo">>}),
enum => [ <<"cpu">>, <<"cuda">> ],
default => <<"cpuo">>}),
extra_args =>
str(#{description => <<"Extra arguments to pass to the worker executable binary. "
"The safest choice is specifying no arguments i.e. empty string.">>,

View File

@ -16,7 +16,7 @@
-include_lib("kernel/include/logger.hrl").
-define(DEFAULT_EXECUTABLE_GROUP , <<"gajumine">>).
-define(DEFAULT_EXECUTABLE_GROUP , <<"cpu">>).
-define(DEFAULT_EXTRA_ARGS , <<>>).
-define(DEFAULT_HEX_ENCODED_HEADER , false).
-define(DEFAULT_REPEATS , 1).