From 6a9de6cd229d588fd1cfa3376ca7d574c3125cb7 Mon Sep 17 00:00:00 2001 From: jbesraa Date: Tue, 14 Jan 2025 15:25:21 +0200 Subject: [PATCH] Remove jdc-upstream-change MG test --- scripts/message-generator-tests.sh | 7 +- .../jdc-config.toml | 49 ---- .../jds-config.toml | 20 -- .../proxy-config.toml | 13 -- .../interop-jdc-change-upstream.json | 214 ------------------ .../interop-jdc-change-upstream.sh | 12 - 6 files changed, 1 insertion(+), 314 deletions(-) delete mode 100644 test/config/interop-jd-change-upstream/jdc-config.toml delete mode 100644 test/config/interop-jd-change-upstream/jds-config.toml delete mode 100644 test/config/interop-jd-change-upstream/proxy-config.toml delete mode 100644 test/message-generator/test/interop-jdc-change-upstream/interop-jdc-change-upstream.json delete mode 100755 test/message-generator/test/interop-jdc-change-upstream/interop-jdc-change-upstream.sh diff --git a/scripts/message-generator-tests.sh b/scripts/message-generator-tests.sh index a7897a07d..6fc12045e 100755 --- a/scripts/message-generator-tests.sh +++ b/scripts/message-generator-tests.sh @@ -3,13 +3,8 @@ search_dir="test/message-generator/test/" for entry in `ls $search_dir`; do - if [ "$entry" = "interop-jdc-change-upstream" ]; then - echo "Skipping $entry" - continue - fi - echo $entry - $search_dir$entry/$entry.sh + $search_dir$entry/$entry.sh done cd roles diff --git a/test/config/interop-jd-change-upstream/jdc-config.toml b/test/config/interop-jd-change-upstream/jdc-config.toml deleted file mode 100644 index c03b36e5f..000000000 --- a/test/config/interop-jd-change-upstream/jdc-config.toml +++ /dev/null @@ -1,49 +0,0 @@ -# Local Mining Device Downstream Connection -downstream_address = "127.0.0.1" -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 = "9auqWEzQDVyd2oe1JVGFLMLHZtCo2FFqZwtKA5gd9xbuEu7PH72" -authority_secret_key = "mkDLTBBRxdBv998612qipDYoTK3YUrqLe8uWw7gu3iXbSrn2n" -cert_validity_sec = 3600 - -# How many time the JDC try to reinitialize itself after a failure -retry = 10 - -tp_address = "75.119.150.111:8442" -tp_authority_pub_key = "9auqWEzQDVyd2oe1JVGFLMLHZtCo2FFqZwtKA5gd9xbuEu7PH72" - - - -coinbase_outputs = [ - { output_script_type = "P2WPKH", output_script_value = "036adc3bdf21e6f9a0f0fb0066bf517e5b7909ed1563d6958a10993849a7554075" }, -] - -[timeout] -unit = "secs" -value = 1 - -[[upstreams]] -authority_pubkey = "9auqWEzQDVyd2oe1JVGFLMLHZtCo2FFqZwtKA5gd9xbuEu7PH72" -pool_address = "127.0.0.1:44254" -jd_address = "127.0.0.1:34264" -pool_signature = "Stratum v2 SRI Pool" - -[[upstreams]] -authority_pubkey = "9auqWEzQDVyd2oe1JVGFLMLHZtCo2FFqZwtKA5gd9xbuEu7PH72" -pool_address = "127.0.0.1:44255" -jd_address = "127.0.0.1:34264" -pool_signature = "Stratum v2 SRI Pool" diff --git a/test/config/interop-jd-change-upstream/jds-config.toml b/test/config/interop-jd-change-upstream/jds-config.toml deleted file mode 100644 index acda73227..000000000 --- a/test/config/interop-jd-change-upstream/jds-config.toml +++ /dev/null @@ -1,20 +0,0 @@ -# SRI Pool config -authority_public_key = "9auqWEzQDVyd2oe1JVGFLMLHZtCo2FFqZwtKA5gd9xbuEu7PH72" -authority_secret_key = "mkDLTBBRxdBv998612qipDYoTK3YUrqLe8uWw7gu3iXbSrn2n" -cert_validity_sec = 3600 - -# list of compressed or uncompressed pubkeys for coinbase payout (only supports 1 item in the array at this point) -coinbase_outputs = [ - { output_script_type = "P2WPKH", output_script_value = "036adc3bdf21e6f9a0f0fb0066bf517e5b7909ed1563d6958a10993849a7554075" }, -] - -listen_jd_address = "127.0.0.1:34264" - -core_rpc_url = "" -core_rpc_port = 18332 -core_rpc_user = "" -core_rpc_pass = "" -# Time interval used for JDS mempool update -[mempool_update_interval] -unit = "secs" -value = 1 \ No newline at end of file diff --git a/test/config/interop-jd-change-upstream/proxy-config.toml b/test/config/interop-jd-change-upstream/proxy-config.toml deleted file mode 100644 index 3ed024c13..000000000 --- a/test/config/interop-jd-change-upstream/proxy-config.toml +++ /dev/null @@ -1,13 +0,0 @@ -upstreams = [ - { channel_kind = "Extended", address = "127.0.0.1", port = 34265, pub_key = "9auqWEzQDVyd2oe1JVGFLMLHZtCo2FFqZwtKA5gd9xbuEu7PH72"}, -] -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 -reconnect = true diff --git a/test/message-generator/test/interop-jdc-change-upstream/interop-jdc-change-upstream.json b/test/message-generator/test/interop-jdc-change-upstream/interop-jdc-change-upstream.json deleted file mode 100644 index 344b8d6ce..000000000 --- a/test/message-generator/test/interop-jdc-change-upstream/interop-jdc-change-upstream.json +++ /dev/null @@ -1,214 +0,0 @@ -{ - "version": "2", - "doc": [ - "This test does", - "Launch a pool mocks", - "Launch jds", - "Launch jdc", - "Launch mining-proxy", - "Launch a mining device", - "Act like a pool", - "Connect jdc to the first pool", - "Receive an submit share error from first pool", - "Close jdc connection with first pool", - "Connect jdc the pool mocked by this test" - ], - "frame_builders": [ - { - "type": "automatic", - "message_id": "test/message-generator/messages/common_messages.json::setup_connection_success_tproxy" - } - ], - "actions": [ - { - "message_ids": [], - "role": "server", - "results": [ - { - "type": "match_message_type", - "value": "0x00" - } - ], - "actiondoc": "This action checks that a Setupconnection message is received" - }, - { - "message_ids": ["setup_connection_success_tproxy"], - "role": "server", - "results": [ - { - "type": "match_message_type", - "value": "0x13" - } - ], - "actiondoc": "This action sends SetupConnection.Success and check that a open_extended_mining_channel is received" - } - ], - "setup_commands": [ - { - "command": "cargo", - "args": [ - "run", - "../../test/message-generator/mock/pool-mock-invalid-share.json" - ], - "conditions": { - "WithConditions": { - "conditions": [ - { - "output_string": "Running `target/debug/message_generator_sv2 ../../test/message-generator/mock/pool-mock-invalid-share.json`", - "output_location": "StdErr", - "late_condition": false, - "condition": true - } - ], - "timer_secs": 600, - "warn_no_panic": false - } - } - }, - { - "command": "sleep", - "args": ["10000"], - "conditions": "None" - }, - { - "command": "cargo", - "args": [ - "llvm-cov", - "--no-report", - "run", - "-p", - "jd_server", - "--", - "-c", - "../test/config/interop-jd-change-upstream/jds-config.toml" - ], - "conditions": { - "WithConditions": { - "conditions": [ - { - "output_string": "JD INITIALIZED", - "output_location": "StdOut", - "late_condition": false, - "condition": true - } - ], - "timer_secs": 600, - "warn_no_panic": false - } - } - }, - { - "command": "cargo", - "args": [ - "llvm-cov", - "--no-report", - "run", - "-p", - "jd_client", - "--", - "-c", - "../test/config/interop-jd-change-upstream/jdc-config.toml" - ], - "conditions": { - "WithConditions": { - "conditions": [ - { - "output_string": "Listening for downstream mining connections on", - "output_location": "StdOut", - "late_condition": false, - "condition": true - } - ], - "timer_secs": 600, - "warn_no_panic": false - } - } - }, - { - "command": "cargo", - "args": [ - "llvm-cov", - "--no-report", - "run", - "-p", - "mining_proxy_sv2", - "--", - "-c", - "../test/config/interop-jd-change-upstream/proxy-config.toml" - ], - "conditions": { - "WithConditions": { - "conditions": [ - { - "output_string": "Listening for downstream mining connections on 127.0.0.1:34255", - "output_location": "StdOut", - "late_condition": false, - "condition": true - } - ], - "timer_secs": 600, - "warn_no_panic": false - } - } - }, - { - "command": "sleep", - "args": ["10000"], - "conditions": "None" - }, - { - "command": "cargo", - "args": [ - "run", - "-p", - "mining-device" - ], - "conditions": { - "WithConditions": { - "conditions": [ - { - "output_string": "SUCCESS SubmitSharesSuccess", - "output_location": "StdOut", - "late_condition": false, - "condition": true - } - ], - "timer_secs": 600, - "warn_no_panic": false - } - } - } - ], - "execution_commands": [ - ], - "cleanup_commands": [ - { - "command": "pkill", - "args": ["-f", "mining_device", "-SIGINT"], - "conditions": "None" - }, - { - "command": "pkill", - "args": ["-f", "jd_server", "-SIGINT"], - "conditions": "None" - }, - { - "command": "pkill", - "args": ["-f", "jd_client", "-SIGINT"], - "conditions": "None" - }, - { - "command": "pkill", - "args": ["-f", "mining_proxy_sv2", "-SIGINT"], - "conditions": "None" - } - ], - "role": "none", - "role": "server", - "upstream": { - "ip": "127.0.0.1", - "port": 44255, - "pub_key": "9auqWEzQDVyd2oe1JVGFLMLHZtCo2FFqZwtKA5gd9xbuEu7PH72", - "secret_key": "mkDLTBBRxdBv998612qipDYoTK3YUrqLe8uWw7gu3iXbSrn2n" - } -} diff --git a/test/message-generator/test/interop-jdc-change-upstream/interop-jdc-change-upstream.sh b/test/message-generator/test/interop-jdc-change-upstream/interop-jdc-change-upstream.sh deleted file mode 100755 index 514b2e79e..000000000 --- a/test/message-generator/test/interop-jdc-change-upstream/interop-jdc-change-upstream.sh +++ /dev/null @@ -1,12 +0,0 @@ -cd roles -cargo llvm-cov --no-report -p jd_server -cargo llvm-cov --no-report -p jd_client -cargo llvm-cov --no-report -p mining_proxy_sv2 -cargo build -p --no-report mining-device - -cd ../utils/message-generator/ -cargo build - -RUST_LOG=debug cargo run ../../test/message-generator/test/interop-jdc-change-upstream/interop-jdc-change-upstream.json || { echo 'mg test failed' ; exit 1; } - -sleep 10