From 9c02d403c3a7674c284a6f6e413bf7e0ff0f8fae Mon Sep 17 00:00:00 2001 From: fi3 Date: Thu, 12 Oct 2023 21:14:14 +0200 Subject: [PATCH] Add jdc config --- roles/jd-client/proxy-config-example.toml | 66 +++++++++++++++++++++++ roles/jd-client/proxy-config.toml | 66 +++++++++++++++++++++++ 2 files changed, 132 insertions(+) create mode 100644 roles/jd-client/proxy-config-example.toml create mode 100644 roles/jd-client/proxy-config.toml diff --git a/roles/jd-client/proxy-config-example.toml b/roles/jd-client/proxy-config-example.toml new file mode 100644 index 000000000..21cffbfc1 --- /dev/null +++ b/roles/jd-client/proxy-config-example.toml @@ -0,0 +1,66 @@ +# 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 + +# Auth keys for open encrypted connection downstream +authority_public_key = "2di19GHYQnAZJmEpoUeP7C3Eg9TCcksHr23rZCC83dvUiZgiDL" +authority_secret_key = "2Z1FZug7mZNyM63ggkm37r4oKQ29khLjAvEx43rGkFN47RcJ2t" +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" +# 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 = "P2PK", output_script_value = "vpub5XzEwP9YWe4cKKZAmbiBUxC7eL5HaZhbquBYzP3vDSDJJegb7CSCRphAPmwpGHzAyH1as9MRnXFWDcZozXA1K3sQqyKdTagooPfCVDhiwnr" }, + #{ output_script_type = "P2PKH", output_script_value = "vpub5XzEwP9YWe4cKKZAmbiBUxC7eL5HaZhbquBYzP3vDSDJJegb7CSCRphAPmwpGHzAyH1as9MRnXFWDcZozXA1K3sQqyKdTagooPfCVDhiwnr" }, + #{ output_script_type = "P2SH", output_script_value = "..." }, + #{ output_script_type = "P2WSH", output_script_value = "..." }, + { output_script_type = "P2WPKH", output_script_value = "vpub5XzEwP9YWe4cKKZAmbiBUxC7eL5HaZhbquBYzP3vDSDJJegb7CSCRphAPmwpGHzAyH1as9MRnXFWDcZozXA1K3sQqyKdTagooPfCVDhiwnr" }, + #{ output_script_type = "P2TR", output_script_value = "vpub5XzEwP9YWe4cKKZAmbiBUxC7eL5HaZhbquBYzP3vDSDJJegb7CSCRphAPmwpGHzAyH1as9MRnXFWDcZozXA1K3sQqyKdTagooPfCVDhiwnr" }, +] + +[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 = "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" + +# [[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-client/proxy-config.toml b/roles/jd-client/proxy-config.toml new file mode 100644 index 000000000..21cffbfc1 --- /dev/null +++ b/roles/jd-client/proxy-config.toml @@ -0,0 +1,66 @@ +# 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 + +# Auth keys for open encrypted connection downstream +authority_public_key = "2di19GHYQnAZJmEpoUeP7C3Eg9TCcksHr23rZCC83dvUiZgiDL" +authority_secret_key = "2Z1FZug7mZNyM63ggkm37r4oKQ29khLjAvEx43rGkFN47RcJ2t" +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" +# 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 = "P2PK", output_script_value = "vpub5XzEwP9YWe4cKKZAmbiBUxC7eL5HaZhbquBYzP3vDSDJJegb7CSCRphAPmwpGHzAyH1as9MRnXFWDcZozXA1K3sQqyKdTagooPfCVDhiwnr" }, + #{ output_script_type = "P2PKH", output_script_value = "vpub5XzEwP9YWe4cKKZAmbiBUxC7eL5HaZhbquBYzP3vDSDJJegb7CSCRphAPmwpGHzAyH1as9MRnXFWDcZozXA1K3sQqyKdTagooPfCVDhiwnr" }, + #{ output_script_type = "P2SH", output_script_value = "..." }, + #{ output_script_type = "P2WSH", output_script_value = "..." }, + { output_script_type = "P2WPKH", output_script_value = "vpub5XzEwP9YWe4cKKZAmbiBUxC7eL5HaZhbquBYzP3vDSDJJegb7CSCRphAPmwpGHzAyH1as9MRnXFWDcZozXA1K3sQqyKdTagooPfCVDhiwnr" }, + #{ output_script_type = "P2TR", output_script_value = "vpub5XzEwP9YWe4cKKZAmbiBUxC7eL5HaZhbquBYzP3vDSDJJegb7CSCRphAPmwpGHzAyH1as9MRnXFWDcZozXA1K3sQqyKdTagooPfCVDhiwnr" }, +] + +[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 = "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" + +# [[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"