From 6b4af04a1bc5b2158538fde11959dfbc200ea862 Mon Sep 17 00:00:00 2001 From: plebhash Date: Mon, 22 Jan 2024 10:43:44 -0300 Subject: [PATCH 1/5] rename jdc config example --- ...-config-hosted-example.toml => jdc-config-hosted-example.toml} | 0 ...xy-config-local-example.toml => jdc-config-local-example.toml} | 0 2 files changed, 0 insertions(+), 0 deletions(-) rename roles/jd-client/config-examples/{proxy-config-hosted-example.toml => jdc-config-hosted-example.toml} (100%) rename roles/jd-client/config-examples/{proxy-config-local-example.toml => jdc-config-local-example.toml} (100%) diff --git a/roles/jd-client/config-examples/proxy-config-hosted-example.toml b/roles/jd-client/config-examples/jdc-config-hosted-example.toml similarity index 100% rename from roles/jd-client/config-examples/proxy-config-hosted-example.toml rename to roles/jd-client/config-examples/jdc-config-hosted-example.toml diff --git a/roles/jd-client/config-examples/proxy-config-local-example.toml b/roles/jd-client/config-examples/jdc-config-local-example.toml similarity index 100% rename from roles/jd-client/config-examples/proxy-config-local-example.toml rename to roles/jd-client/config-examples/jdc-config-local-example.toml From f1bb9004312242b4cdf54bbf21dbdde8cdcc97dd Mon Sep 17 00:00:00 2001 From: plebhash Date: Mon, 22 Jan 2024 10:45:09 -0300 Subject: [PATCH 2/5] rename tproxy config example --- ...ocal-jdc-example.toml => tproxy-config-local-jdc-example.toml} | 0 ...al-pool-example.toml => tproxy-config-local-pool-example.toml} | 0 roles/translator/{proxy-config.toml => tproxy-config.toml} | 0 3 files changed, 0 insertions(+), 0 deletions(-) rename roles/translator/config-examples/{proxy-config-local-jdc-example.toml => tproxy-config-local-jdc-example.toml} (100%) rename roles/translator/config-examples/{proxy-config-local-pool-example.toml => tproxy-config-local-pool-example.toml} (100%) rename roles/translator/{proxy-config.toml => tproxy-config.toml} (100%) diff --git a/roles/translator/config-examples/proxy-config-local-jdc-example.toml b/roles/translator/config-examples/tproxy-config-local-jdc-example.toml similarity index 100% rename from roles/translator/config-examples/proxy-config-local-jdc-example.toml rename to roles/translator/config-examples/tproxy-config-local-jdc-example.toml diff --git a/roles/translator/config-examples/proxy-config-local-pool-example.toml b/roles/translator/config-examples/tproxy-config-local-pool-example.toml similarity index 100% rename from roles/translator/config-examples/proxy-config-local-pool-example.toml rename to roles/translator/config-examples/tproxy-config-local-pool-example.toml diff --git a/roles/translator/proxy-config.toml b/roles/translator/tproxy-config.toml similarity index 100% rename from roles/translator/proxy-config.toml rename to roles/translator/tproxy-config.toml From db91a8799d1e6d8946f6cc3bfaef56501c15387b Mon Sep 17 00:00:00 2001 From: plebhash Date: Mon, 22 Jan 2024 16:19:32 -0300 Subject: [PATCH 3/5] readjust hashrate values for translator config examples --- .../config-examples/tproxy-config-local-jdc-example.toml | 4 ++-- .../config-examples/tproxy-config-local-pool-example.toml | 4 ++-- roles/translator/tproxy-config.toml | 4 ++-- 3 files changed, 6 insertions(+), 6 deletions(-) diff --git a/roles/translator/config-examples/tproxy-config-local-jdc-example.toml b/roles/translator/config-examples/tproxy-config-local-jdc-example.toml index d71a9f303..585b02dbd 100644 --- a/roles/translator/config-examples/tproxy-config-local-jdc-example.toml +++ b/roles/translator/config-examples/tproxy-config-local-jdc-example.toml @@ -26,7 +26,7 @@ coinbase_reward_sat = 5_000_000_000 # Difficulty params [downstream_difficulty_config] # hashes/s of the weakest miner that will be connecting -min_individual_miner_hashrate=5_000_000.0 +min_individual_miner_hashrate=10_000_000_000_000.0 # target number of shares per minute the miner should be sending shares_per_minute = 6.0 @@ -34,4 +34,4 @@ shares_per_minute = 6.0 # interval in seconds to elapse before updating channel hashrate with the pool channel_diff_update_interval = 60 # estimated accumulated hashrate of all downstream miners -channel_nominal_hashrate = 5_000_000.0 +channel_nominal_hashrate = 10_000_000_000_000.0 diff --git a/roles/translator/config-examples/tproxy-config-local-pool-example.toml b/roles/translator/config-examples/tproxy-config-local-pool-example.toml index 3a1f78cfa..e7ebd7b3b 100644 --- a/roles/translator/config-examples/tproxy-config-local-pool-example.toml +++ b/roles/translator/config-examples/tproxy-config-local-pool-example.toml @@ -26,7 +26,7 @@ coinbase_reward_sat = 5_000_000_000 # Difficulty params [downstream_difficulty_config] # hashes/s of the weakest miner that will be connecting -min_individual_miner_hashrate=5_000_000.0 +min_individual_miner_hashrate=10_000_000_000_000.0 # target number of shares per minute the miner should be sending shares_per_minute = 6.0 @@ -34,4 +34,4 @@ shares_per_minute = 6.0 # interval in seconds to elapse before updating channel hashrate with the pool channel_diff_update_interval = 60 # estimated accumulated hashrate of all downstream miners -channel_nominal_hashrate = 5_000_000.0 +channel_nominal_hashrate = 10_000_000_000_000.0 diff --git a/roles/translator/tproxy-config.toml b/roles/translator/tproxy-config.toml index b83fd15e7..5078917e8 100644 --- a/roles/translator/tproxy-config.toml +++ b/roles/translator/tproxy-config.toml @@ -26,7 +26,7 @@ coinbase_reward_sat = 5_000_000_000 # Difficulty params [downstream_difficulty_config] # hashes/s of the weakest miner that will be connecting -min_individual_miner_hashrate=500_000.0 +min_individual_miner_hashrate=10_000_000_000_000.0 # minimum number of shares needed before a mining.set_difficulty is sent for updating targets miner_num_submits_before_update=5 # target number of shares per minute the miner should be sending @@ -36,4 +36,4 @@ shares_per_minute = 6.0 # interval in seconds to elapse before updating channel hashrate with the pool channel_diff_update_interval = 10 # estimated accumulated hashrate of all downstream miners -channel_nominal_hashrate = 50_000.0 +channel_nominal_hashrate = 10_000_000_000_000.0 From efbd99f8740d6bd16fb50bf118a4a8ac45534d49 Mon Sep 17 00:00:00 2001 From: plebhash Date: Tue, 23 Jan 2024 11:04:47 -0300 Subject: [PATCH 4/5] rm roles/*/*-config.toml --- .gitignore | 1 + roles/jd-client/jdc-config.toml | 63 ------------------- roles/jd-server/jds-config.toml | 20 ------ .../proxy-config-example.toml | 0 roles/mining-proxy/proxy-config.toml | 15 ----- roles/pool/config.toml | 30 --------- roles/pool/pool-config.toml | 30 --------- roles/translator/tproxy-config.toml | 39 ------------ 8 files changed, 1 insertion(+), 197 deletions(-) delete mode 100644 roles/jd-client/jdc-config.toml delete mode 100644 roles/jd-server/jds-config.toml rename roles/mining-proxy/{ => config-examples}/proxy-config-example.toml (100%) delete mode 100644 roles/mining-proxy/proxy-config.toml delete mode 100644 roles/pool/config.toml delete mode 100644 roles/pool/pool-config.toml delete mode 100644 roles/translator/tproxy-config.toml diff --git a/.gitignore b/.gitignore index f104bcfa9..341e3cd47 100644 --- a/.gitignore +++ b/.gitignore @@ -12,3 +12,4 @@ lcov.info *.py **/conf/** cobertura.xml +/roles/*/*-config.toml diff --git a/roles/jd-client/jdc-config.toml b/roles/jd-client/jdc-config.toml deleted file mode 100644 index 160f93a9e..000000000 --- a/roles/jd-client/jdc-config.toml +++ /dev/null @@ -1,63 +0,0 @@ -# SRI JDC config -downstream_address = "0.0.0.0" -downstream_port = 34265 - -# Version support -max_supported_version = 2 -min_supported_version = 2 - -# Minimum extranonce2 size for downstream -# Max value: 16 (leaves 0 bytes for search space splitting of downstreams) -# Max value for CGminer: 8 -# Min value: 2 -min_extranonce2_size = 8 - -# Withhold -withhold = false -test_only_do_not_send_solution_to_tp = false - -# Auth keys for open encrypted connection downstream -authority_public_key = "3VANfft6ei6jQq1At7d8nmiZzVhBFS4CiQujdgim1ign" -authority_secret_key = "7qbpUjScc865jyX2kiB4NVJANoC7GA7TAJupdzXWkc62" -cert_validity_sec = 3600 - -# How many time the JDC try to reinitialize itself after a failure -retry = 10 - -# Template Provider config -# Local TP (this is pointing to localhost so you must run a TP locally for this configuration to work) -tp_address = "127.0.0.1:8442" -# Hosted testnet TP -#tp_address = "89.116.25.191:8442" -tp_authority_pub_key = "3VANfft6ei6jQq1At7d8nmiZzVhBFS4CiQujdgim1ign" -# Hosted regtest TP -# tp_address = "75.119.150.111:8442" - -# Solo Mining config -# List of coinbase outputs used to build the coinbase tx in case of Solo Mining (as last-resort solution of the pools fallback system) -# ! Put your Extended Public Key or Script as output_script_value ! -# ! Right now only one output is supported, so comment all the ones you don't need ! -# For P2PK, P2PKH, P2WPKH, P2TR a BIP32 extended public key is needed -coinbase_outputs = [ - { output_script_type = "P2WPKH", output_script_value = "036adc3bdf21e6f9a0f0fb0066bf517e5b7909ed1563d6958a10993849a7554075" }, -] - -[timeout] -unit = "secs" -value = 1 - -# List of upstreams (JDS) used as backup endpoints -# In case of shares refused by the JDS, the fallback system will propose the same job to the next upstream in this list -[[upstreams]] -authority_pubkey = "3VANfft6ei6jQq1At7d8nmiZzVhBFS4CiQujdgim1ign" -pool_address = "127.0.0.1:34254" -jd_address = "127.0.0.1:34264" -# Pool signature (string to be included in coinbase tx) -pool_signature = "Stratum v2 SRI Pool" - -# [[upstreams]] -# authority_pubkey = "2di19GHYQnAZJmEpoUeP7C3Eg9TCcksHr23rZCC83dvUiZgiDL" -# pool_address = "127.0.0.1:34254" -# jd_address = "127.0.0.1:34264" -# Pool signature (string to be included in coinbase tx) -# pool_signature = "Stratum v2 SRI Pool" diff --git a/roles/jd-server/jds-config.toml b/roles/jd-server/jds-config.toml deleted file mode 100644 index 803493fa5..000000000 --- a/roles/jd-server/jds-config.toml +++ /dev/null @@ -1,20 +0,0 @@ -# SRI Pool config -authority_public_key = "3VANfft6ei6jQq1At7d8nmiZzVhBFS4CiQujdgim1ign" -authority_secret_key = "7qbpUjScc865jyX2kiB4NVJANoC7GA7TAJupdzXWkc62" -cert_validity_sec = 3600 - -# List of coinbase outputs used to build the coinbase tx -# ! Right now only one output is supported, so comment all the ones you don't need ! -# For P2PK, P2PKH, P2WPKH, P2TR a BIP32 extended public key is needed -coinbase_outputs = [ - { output_script_type = "P2WPKH", output_script_value = "036adc3bdf21e6f9a0f0fb0066bf517e5b7909ed1563d6958a10993849a7554075" }, -] - -# SRI Pool JD config -listen_jd_address = "0.0.0.0:34264" -# RPC config for mempool (it can be also the same TP if correctly configured) -core_rpc_url = "http://127.0.0.1" -#core_rpc_port = 18443 -core_rpc_port = 18332 -core_rpc_user = "username" -core_rpc_pass = "password" diff --git a/roles/mining-proxy/proxy-config-example.toml b/roles/mining-proxy/config-examples/proxy-config-example.toml similarity index 100% rename from roles/mining-proxy/proxy-config-example.toml rename to roles/mining-proxy/config-examples/proxy-config-example.toml diff --git a/roles/mining-proxy/proxy-config.toml b/roles/mining-proxy/proxy-config.toml deleted file mode 100644 index d38aabf55..000000000 --- a/roles/mining-proxy/proxy-config.toml +++ /dev/null @@ -1,15 +0,0 @@ -upstreams = [ - { channel_kind = "Extended", address = "127.0.0.1", port = 34265, pub_key = "3VANfft6ei6jQq1At7d8nmiZzVhBFS4CiQujdgim1ign"}, - # { channel_kind = "Group", address = "127.0.0.1", port = 34254, pub_key = "3VANfft6ei6jQq1At7d8nmiZzVhBFS4CiQujdgim1ign"}, -] -listen_address = "127.0.0.1" -listen_mining_port = 34255 -max_supported_version = 2 -min_supported_version = 2 -downstream_share_per_minute = 1 -coinbase_reward_sat = 5_000_000_000 -# This value is used by the proxy to communicate to the pool the expected hash rate when we open an -# extended channel, based on it the pool will set a target for the channel -expected_total_downstream_hr = 10_000 -# If set to true the proxy will try to reconnect to an upstream that drop the connection -reconnect = true diff --git a/roles/pool/config.toml b/roles/pool/config.toml deleted file mode 100644 index d2f36743e..000000000 --- a/roles/pool/config.toml +++ /dev/null @@ -1,30 +0,0 @@ -# SRI Pool config -authority_public_key = "3VANfft6ei6jQq1At7d8nmiZzVhBFS4CiQujdgim1ign" -authority_secret_key = "7qbpUjScc865jyX2kiB4NVJANoC7GA7TAJupdzXWkc62" -cert_validity_sec = 3600 -test_only_listen_adress_plain = "0.0.0.0:34250" -listen_address = "0.0.0.0:34254" - -# List of coinbase outputs used to build the coinbase tx -# ! Right now only one output is supported, so comment all the ones you don't need ! -# For P2PK, P2PKH, P2WPKH, P2TR a public key is needed. For P2SH and P2WSH, a redeem script is needed. -coinbase_outputs = [ - #{ output_script_type = "P2PK", output_script_value = "0372c47307e5b75ce365daf835f226d246c5a7a92fe24395018d5552123354f086" }, - #{ output_script_type = "P2PKH", output_script_value = "0372c47307e5b75ce365daf835f226d246c5a7a92fe24395018d5552123354f086" }, - #{ output_script_type = "P2SH", output_script_value = "00142ef89234bc95136eb9e6fee9d32722ebd8c1f0ab" }, - #{ output_script_type = "P2WSH", output_script_value = "00142ef89234bc95136eb9e6fee9d32722ebd8c1f0ab" }, - { output_script_type = "P2WPKH", output_script_value = "036adc3bdf21e6f9a0f0fb0066bf517e5b7909ed1563d6958a10993849a7554075" }, - #{ output_script_type = "P2TR", output_script_value = "036adc3bdf21e6f9a0f0fb0066bf517e5b7909ed1563d6958a10993849a7554075" }, -] - -# Pool signature (string to be included in coinbase tx) -pool_signature = "Stratum v2 SRI Pool" - -# Template Provider config -# Local TP (this is pointing to localhost so you must run a TP locally for this configuration to work) -#tp_address = "127.0.0.1:8442" -# Hosted testnet TP -tp_address = "89.116.25.191:8442" -# Hosted regtest TP -# tp_address = "75.119.150.111:8442" - diff --git a/roles/pool/pool-config.toml b/roles/pool/pool-config.toml deleted file mode 100644 index 30e150188..000000000 --- a/roles/pool/pool-config.toml +++ /dev/null @@ -1,30 +0,0 @@ - -# SRI Pool config -authority_public_key = "3VANfft6ei6jQq1At7d8nmiZzVhBFS4CiQujdgim1ign" -authority_secret_key = "7qbpUjScc865jyX2kiB4NVJANoC7GA7TAJupdzXWkc62" -cert_validity_sec = 3600 -test_only_listen_adress_plain = "0.0.0.0:34250" -listen_address = "0.0.0.0:34254" - -# List of coinbase outputs used to build the coinbase tx -# ! Right now only one output is supported, so comment all the ones you don't need ! -# For P2PK, P2PKH, P2WPKH, P2TR a public key is needed. For P2SH and P2WSH, a redeem script is needed. -coinbase_outputs = [ - #{ output_script_type = "P2PK", output_script_value = "0372c47307e5b75ce365daf835f226d246c5a7a92fe24395018d5552123354f086" }, - #{ output_script_type = "P2PKH", output_script_value = "0372c47307e5b75ce365daf835f226d246c5a7a92fe24395018d5552123354f086" }, - #{ output_script_type = "P2SH", output_script_value = "00142ef89234bc95136eb9e6fee9d32722ebd8c1f0ab" }, - #{ output_script_type = "P2WSH", output_script_value = "00142ef89234bc95136eb9e6fee9d32722ebd8c1f0ab" }, - { output_script_type = "P2WPKH", output_script_value = "036adc3bdf21e6f9a0f0fb0066bf517e5b7909ed1563d6958a10993849a7554075" }, - #{ output_script_type = "P2TR", output_script_value = "036adc3bdf21e6f9a0f0fb0066bf517e5b7909ed1563d6958a10993849a7554075" }, -] - -# Pool signature (string to be included in coinbase tx) -pool_signature = "Stratum v2 SRI Pool" - -# Template Provider config -# Local TP (this is pointing to localhost so you must run a TP locally for this configuration to work) -#tp_address = "127.0.0.1:8442" -# Hosted testnet TP -tp_address = "89.116.25.191:8442" -# Hosted regtest TP -# tp_address = "75.119.150.111:8442" diff --git a/roles/translator/tproxy-config.toml b/roles/translator/tproxy-config.toml deleted file mode 100644 index 5078917e8..000000000 --- a/roles/translator/tproxy-config.toml +++ /dev/null @@ -1,39 +0,0 @@ -# Braiins Pool Upstream Connection -# upstream_authority_pubkey = "u95GEReVMjK6k5YqiSFNqqTnKU4ypU2Wm8awa6tmbmDmk1bWt" -# upstream_address = "18.196.32.109" -# upstream_port = 3336 - -# Local SRI Pool Upstream Connection -upstream_address = "127.0.0.1" -upstream_port = 34254 -upstream_authority_pubkey = "3VANfft6ei6jQq1At7d8nmiZzVhBFS4CiQujdgim1ign" - -# Local Mining Device Downstream Connection -downstream_address = "0.0.0.0" -downstream_port = 34255 - -# Version support -max_supported_version = 2 -min_supported_version = 2 - -# Minimum extranonce2 size for downstream -# Max value: 16 (leaves 0 bytes for search space splitting of downstreams) -# Max value for CGminer: 8 -# Min value: 2 -min_extranonce2_size = 8 -coinbase_reward_sat = 5_000_000_000 - -# Difficulty params -[downstream_difficulty_config] -# hashes/s of the weakest miner that will be connecting -min_individual_miner_hashrate=10_000_000_000_000.0 -# minimum number of shares needed before a mining.set_difficulty is sent for updating targets -miner_num_submits_before_update=5 -# target number of shares per minute the miner should be sending -shares_per_minute = 6.0 - -[upstream_difficulty_config] -# interval in seconds to elapse before updating channel hashrate with the pool -channel_diff_update_interval = 10 -# estimated accumulated hashrate of all downstream miners -channel_nominal_hashrate = 10_000_000_000_000.0 From 8346e17c3976909fef43e37114541c6dae4c1e7a Mon Sep 17 00:00:00 2001 From: plebhash Date: Tue, 23 Jan 2024 11:56:54 -0300 Subject: [PATCH 5/5] explaing hashrate values on comments --- .../config-examples/tproxy-config-local-jdc-example.toml | 4 ++-- .../config-examples/tproxy-config-local-pool-example.toml | 4 ++-- 2 files changed, 4 insertions(+), 4 deletions(-) diff --git a/roles/translator/config-examples/tproxy-config-local-jdc-example.toml b/roles/translator/config-examples/tproxy-config-local-jdc-example.toml index 585b02dbd..fd1ac9237 100644 --- a/roles/translator/config-examples/tproxy-config-local-jdc-example.toml +++ b/roles/translator/config-examples/tproxy-config-local-jdc-example.toml @@ -25,7 +25,7 @@ coinbase_reward_sat = 5_000_000_000 # Difficulty params [downstream_difficulty_config] -# hashes/s of the weakest miner that will be connecting +# hashes/s of the weakest miner that will be connecting (e.g.: 10 Th/s = 10_000_000_000_000.0) min_individual_miner_hashrate=10_000_000_000_000.0 # target number of shares per minute the miner should be sending shares_per_minute = 6.0 @@ -33,5 +33,5 @@ shares_per_minute = 6.0 [upstream_difficulty_config] # interval in seconds to elapse before updating channel hashrate with the pool channel_diff_update_interval = 60 -# estimated accumulated hashrate of all downstream miners +# estimated accumulated hashrate of all downstream miners (e.g.: 10 Th/s = 10_000_000_000_000.0) channel_nominal_hashrate = 10_000_000_000_000.0 diff --git a/roles/translator/config-examples/tproxy-config-local-pool-example.toml b/roles/translator/config-examples/tproxy-config-local-pool-example.toml index e7ebd7b3b..6da9c3a51 100644 --- a/roles/translator/config-examples/tproxy-config-local-pool-example.toml +++ b/roles/translator/config-examples/tproxy-config-local-pool-example.toml @@ -25,7 +25,7 @@ coinbase_reward_sat = 5_000_000_000 # Difficulty params [downstream_difficulty_config] -# hashes/s of the weakest miner that will be connecting +# hashes/s of the weakest miner that will be connecting (e.g.: 10 Th/s = 10_000_000_000_000.0) min_individual_miner_hashrate=10_000_000_000_000.0 # target number of shares per minute the miner should be sending shares_per_minute = 6.0 @@ -33,5 +33,5 @@ shares_per_minute = 6.0 [upstream_difficulty_config] # interval in seconds to elapse before updating channel hashrate with the pool channel_diff_update_interval = 60 -# estimated accumulated hashrate of all downstream miners +# estimated accumulated hashrate of all downstream miners (e.g.: 10 Th/s = 10_000_000_000_000.0) channel_nominal_hashrate = 10_000_000_000_000.0