diff --git a/common/config/presets/tari_config_example.toml b/common/config/presets/tari_config_example.toml index d1f32cbf8b..09fe5a41fc 100644 --- a/common/config/presets/tari_config_example.toml +++ b/common/config/presets/tari_config_example.toml @@ -470,7 +470,6 @@ monerod_url = "http://monero-stagenet.exan.tech:38081" # stagenet # Address of the tari_merge_mining_proxy application proxy_host_address = "127.0.0.1:7878" -transcoder_host_address = "127.0.0.1:7879" # In sole merged mining, the block solution is usually submitted to the Monero blockchain # (monerod) as well as to the Tari blockchain, then this setting should be "true". With pool @@ -492,6 +491,11 @@ monerod_password = "" # accepted. (Default value = true; will wait for base node initial sync). #wait_for_initial_sync_at_startup = true +[stratum_transcoder] + +# Address of the tari_stratum_transcoder application +transcoder_host_address = "127.0.0.1:7879" + [mining_node] # Number of mining threads # Default: number of logical CPU cores @@ -515,3 +519,7 @@ monerod_password = "" # to true # Default: 30 seconds #validate_tip_timeout_sec=30 + +# Stratum Mode configuration +# mining_pool_address = "miningcore.tarilabs.com:3052" +# mining_wallet_address = "YOUR_WALLET_PUBLIC_KEY" diff --git a/common/src/configuration/global.rs b/common/src/configuration/global.rs index 6b316b1bfd..d08752239c 100644 --- a/common/src/configuration/global.rs +++ b/common/src/configuration/global.rs @@ -619,7 +619,7 @@ fn convert_node_config( .map_err(|e| ConfigurationError::new(&key, &e.to_string())) })?; - let key = config_string("merge_mining_proxy", &net_str, "transcoder_host_address"); + let key = config_string("stratum_transcoder", &net_str, "transcoder_host_address"); let transcoder_host_address = cfg .get_str(&key) .map_err(|e| ConfigurationError::new(&key, &e.to_string())) diff --git a/common/src/configuration/utils.rs b/common/src/configuration/utils.rs index fa19117e31..13dfdf0ab2 100644 --- a/common/src/configuration/utils.rs +++ b/common/src/configuration/utils.rs @@ -242,10 +242,21 @@ pub fn default_config(bootstrap: &ConfigBootstrap) -> Config { set_transport_defaults(&mut cfg).unwrap(); set_merge_mining_defaults(&mut cfg); set_mining_node_defaults(&mut cfg); + set_stratum_transcoder_defaults(&mut cfg); cfg } +fn set_stratum_transcoder_defaults(cfg: &mut Config) { + cfg.set_default("stratum_transcoder.mainnet.transcoder_host_address", "127.0.0.1:7879") + .unwrap(); + cfg.set_default( + "stratum_transcoder.weatherwax.transcoder_host_address", + "127.0.0.1:7879", + ) + .unwrap(); +} + fn set_merge_mining_defaults(cfg: &mut Config) { cfg.set_default( "merge_mining_proxy.mainnet.monerod_url", @@ -254,8 +265,6 @@ fn set_merge_mining_defaults(cfg: &mut Config) { .unwrap(); cfg.set_default("merge_mining_proxy.mainnet.proxy_host_address", "127.0.0.1:7878") .unwrap(); - cfg.set_default("merge_mining_proxy.mainnet.transcoder_host_address", "127.0.0.1:7879") - .unwrap(); cfg.set_default("merge_mining_proxy.mainnet.monerod_use_auth", "false") .unwrap(); cfg.set_default("merge_mining_proxy.mainnet.monerod_username", "") @@ -264,7 +273,6 @@ fn set_merge_mining_defaults(cfg: &mut Config) { .unwrap(); cfg.set_default("merge_mining_proxy.mainnet.wait_for_initial_sync_at_startup", true) .unwrap(); - cfg.set_default( "merge_mining_proxy.weatherwax.monerod_url", "http://monero-stagenet.exan.tech:38081", @@ -272,8 +280,6 @@ fn set_merge_mining_defaults(cfg: &mut Config) { .unwrap(); cfg.set_default("merge_mining_proxy.weatherwax.proxy_host_address", "127.0.0.1:7878") .unwrap(); - cfg.set_default("merge_mining_proxy.mainnet.transcoder_host_address", "127.0.0.1:7879") - .unwrap(); cfg.set_default("merge_mining_proxy.weatherwax.proxy_submit_to_origin", true) .unwrap(); cfg.set_default("merge_mining_proxy.weatherwax.monerod_use_auth", "false") diff --git a/integration_tests/helpers/config.js b/integration_tests/helpers/config.js index 5034ad0cf7..14e7599567 100644 --- a/integration_tests/helpers/config.js +++ b/integration_tests/helpers/config.js @@ -151,7 +151,7 @@ function createEnv( `TARI_MERGE_MINING_PROXY__${network}__PROXY_HOST_ADDRESS` ] = `${proxyFullAddress}`; configEnvs[ - `TARI_MERGE_MINING_PROXY__${network}__TRANSCODER_HOST_ADDRESS` + `TARI_STRATUM_TRANSCODER__${network}__TRANSCODER_HOST_ADDRESS` ] = `${transcoderFullAddress}`; configEnvs[`TARI_BASE_NODE__${network}__TRANSPORT`] = "tcp"; configEnvs[`TARI_WALLET__${network}__TRANSPORT`] = "tcp";