From 17a80f27934942a5af1c755c47fa95b0c524ab55 Mon Sep 17 00:00:00 2001 From: Machu Pikacchu <177660647+machuPikacchuBTC@users.noreply.github.com> Date: Wed, 11 Jun 2025 00:57:02 +0000 Subject: [PATCH 1/7] Switch from testnet4 to regtest --- bitcoin.conf | 4 ++-- devenv.nix | 2 +- justfile | 18 ++++++++++++++++++ .../v2/roles-logic-sv2/src/job_creator.rs | 2 +- .../interop-jd-translator/jdc-config.toml | 6 +++--- .../interop-jd-translator/pool-config.toml | 4 ++-- 6 files changed, 27 insertions(+), 9 deletions(-) diff --git a/bitcoin.conf b/bitcoin.conf index 8c8a62065..3d3e5b882 100644 --- a/bitcoin.conf +++ b/bitcoin.conf @@ -1,9 +1,9 @@ server=1 rpcuser=username rpcpassword=password -testnet4=1 +regtest=1 -[testnet4] +[regtest] sv2=1 sv2port=8442 debug=sv2 \ No newline at end of file diff --git a/devenv.nix b/devenv.nix index d7fade714..3f6062442 100644 --- a/devenv.nix +++ b/devenv.nix @@ -95,7 +95,7 @@ in { exec = withLogging '' mkdir -p ${bitcoindDataDir} bitcoind -datadir=${bitcoindDataDir} -conf=${config.devenv.root}/bitcoin.conf - '' "bitcoind-testnet.log"; + '' "bitcoind-regtest.log"; }; miner = { exec = withLogging '' diff --git a/justfile b/justfile index f46cf9f47..726348a59 100644 --- a/justfile +++ b/justfile @@ -40,3 +40,21 @@ update-bitcoind: sed -i "s|rev = \".*\";|rev = \"$LATEST_COMMIT\";|" bitcoind.nix && \ sed -i "s|hash = \".*\";|hash = \"$HASH\";|" bitcoind.nix && \ echo "Done! bitcoind updated to commit $LATEST_COMMIT\nYou are now ready to test and commit" + +# create regtest wallet if it doesn't exist +create-wallet: + @echo "Creating regtest wallet..." + @bitcoin-cli -datadir=.devenv/state/bitcoind -conf=$(pwd)/bitcoin.conf -rpcuser=username -rpcpassword=password -regtest createwallet "regtest" || \ + (echo "Wallet exists, loading..." && bitcoin-cli -datadir=.devenv/state/bitcoind -conf=$(pwd)/bitcoin.conf -rpcuser=username -rpcpassword=password -regtest loadwallet "regtest") + +# generate blocks in regtest +generate-blocks COUNT="1" CREATE_WALLET="false": + @echo "Generating {{COUNT}} blocks in regtest..." + @if [ "{{CREATE_WALLET}}" = "true" ]; then just create-wallet; fi + @bitcoin-cli -datadir=.devenv/state/bitcoind -conf=$(pwd)/bitcoin.conf -rpcuser=username -rpcpassword=password -regtest -rpcwallet=regtest -generate {{COUNT}} + +# generate blocks to a specific address in regtest +generate-to-address ADDRESS COUNT="1" CREATE_WALLET="false": + @echo "Generating {{COUNT}} blocks to address {{ADDRESS}} in regtest..." + @if [ "{{CREATE_WALLET}}" = "true" ]; then just create-wallet; fi + @bitcoin-cli -datadir=.devenv/state/bitcoind -conf=$(pwd)/bitcoin.conf -rpcuser=username -rpcpassword=password -regtest -rpcwallet=regtest generatetoaddress {{COUNT}} {{ADDRESS}} diff --git a/protocols/v2/roles-logic-sv2/src/job_creator.rs b/protocols/v2/roles-logic-sv2/src/job_creator.rs index 1ed653762..9a4d3243e 100644 --- a/protocols/v2/roles-logic-sv2/src/job_creator.rs +++ b/protocols/v2/roles-logic-sv2/src/job_creator.rs @@ -524,7 +524,7 @@ pub mod tests { } const PRIVATE_KEY_BTC: [u8; 32] = [34; 32]; - const NETWORK: Network = Network::Testnet; + const NETWORK: Network = Network::Regtest; #[cfg(feature = "prop_test")] const BLOCK_REWARD: u64 = 625_000_000_000; diff --git a/test/config/interop-jd-translator/jdc-config.toml b/test/config/interop-jd-translator/jdc-config.toml index b718f482b..7c670d394 100644 --- a/test/config/interop-jd-translator/jdc-config.toml +++ b/test/config/interop-jd-translator/jdc-config.toml @@ -25,9 +25,9 @@ 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 = "75.119.150.111:8442" +tp_address = "127.0.0.1:8442" +# Hosted testnet TP +# tp_address = "75.119.150.111:8442" tp_authority_pub_key = "9auqWEzQDVyd2oe1JVGFLMLHZtCo2FFqZwtKA5gd9xbuEu7PH72" # Solo Mining config diff --git a/test/config/interop-jd-translator/pool-config.toml b/test/config/interop-jd-translator/pool-config.toml index 9de7b11b1..d414dc1ef 100644 --- a/test/config/interop-jd-translator/pool-config.toml +++ b/test/config/interop-jd-translator/pool-config.toml @@ -19,5 +19,5 @@ coinbase_outputs = [ pool_signature = "Stratum v2 SRI Pool - gitgab19" # Template Provider config -# hosted testnet TP -tp_address = "75.119.150.111:8442" +# Local TP for regtest +tp_address = "127.0.0.1:8442" From 27c7cc30d99f20926e1013e7c5993ee596093b27 Mon Sep 17 00:00:00 2001 From: Machu Pikacchu <177660647+machuPikacchuBTC@users.noreply.github.com> Date: Wed, 11 Jun 2025 13:49:10 +0000 Subject: [PATCH 2/7] Replace testnet4 port num with regtest port --- roles/jd-server/config-examples/jds-config-local-example.toml | 2 +- test/config/interop-jd-change-upstream/jds-config.toml | 2 +- test/config/interop-jd-translator/jds-config.toml | 2 +- test/config/jds-do-not-fail-on-wrong-txdatasucc/jds-config.toml | 2 +- .../jds-do-not-panic-if-jdc-close-connection/jds-config.toml | 2 +- .../jds-config.toml | 2 +- .../jds-config-with-async-support.toml | 2 +- .../jds-config-without-async-support.toml | 2 +- 8 files changed, 8 insertions(+), 8 deletions(-) diff --git a/roles/jd-server/config-examples/jds-config-local-example.toml b/roles/jd-server/config-examples/jds-config-local-example.toml index dc8ce0555..d9c0b55f8 100644 --- a/roles/jd-server/config-examples/jds-config-local-example.toml +++ b/roles/jd-server/config-examples/jds-config-local-example.toml @@ -22,7 +22,7 @@ coinbase_outputs = [ listen_jd_address = "127.0.0.1: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 = 48332 +core_rpc_port = 18443 core_rpc_user = "username" core_rpc_pass = "password" # Time interval used for JDS mempool update diff --git a/test/config/interop-jd-change-upstream/jds-config.toml b/test/config/interop-jd-change-upstream/jds-config.toml index acda73227..971cbf245 100644 --- a/test/config/interop-jd-change-upstream/jds-config.toml +++ b/test/config/interop-jd-change-upstream/jds-config.toml @@ -11,7 +11,7 @@ coinbase_outputs = [ listen_jd_address = "127.0.0.1:34264" core_rpc_url = "" -core_rpc_port = 18332 +core_rpc_port = 18443 core_rpc_user = "" core_rpc_pass = "" # Time interval used for JDS mempool update diff --git a/test/config/interop-jd-translator/jds-config.toml b/test/config/interop-jd-translator/jds-config.toml index acda73227..971cbf245 100644 --- a/test/config/interop-jd-translator/jds-config.toml +++ b/test/config/interop-jd-translator/jds-config.toml @@ -11,7 +11,7 @@ coinbase_outputs = [ listen_jd_address = "127.0.0.1:34264" core_rpc_url = "" -core_rpc_port = 18332 +core_rpc_port = 18443 core_rpc_user = "" core_rpc_pass = "" # Time interval used for JDS mempool update diff --git a/test/config/jds-do-not-fail-on-wrong-txdatasucc/jds-config.toml b/test/config/jds-do-not-fail-on-wrong-txdatasucc/jds-config.toml index acda73227..971cbf245 100644 --- a/test/config/jds-do-not-fail-on-wrong-txdatasucc/jds-config.toml +++ b/test/config/jds-do-not-fail-on-wrong-txdatasucc/jds-config.toml @@ -11,7 +11,7 @@ coinbase_outputs = [ listen_jd_address = "127.0.0.1:34264" core_rpc_url = "" -core_rpc_port = 18332 +core_rpc_port = 18443 core_rpc_user = "" core_rpc_pass = "" # Time interval used for JDS mempool update diff --git a/test/config/jds-do-not-panic-if-jdc-close-connection/jds-config.toml b/test/config/jds-do-not-panic-if-jdc-close-connection/jds-config.toml index acda73227..971cbf245 100644 --- a/test/config/jds-do-not-panic-if-jdc-close-connection/jds-config.toml +++ b/test/config/jds-do-not-panic-if-jdc-close-connection/jds-config.toml @@ -11,7 +11,7 @@ coinbase_outputs = [ listen_jd_address = "127.0.0.1:34264" core_rpc_url = "" -core_rpc_port = 18332 +core_rpc_port = 18443 core_rpc_user = "" core_rpc_pass = "" # Time interval used for JDS mempool update diff --git a/test/config/jds-receive-solution-while-processing-declared-job/jds-config.toml b/test/config/jds-receive-solution-while-processing-declared-job/jds-config.toml index 576b35443..1472d1734 100644 --- a/test/config/jds-receive-solution-while-processing-declared-job/jds-config.toml +++ b/test/config/jds-receive-solution-while-processing-declared-job/jds-config.toml @@ -11,7 +11,7 @@ coinbase_outputs = [ listen_jd_address = "127.0.0.1:34264" core_rpc_url = "" -core_rpc_port = 48332 +core_rpc_port = 18443 core_rpc_user = "" core_rpc_pass = "" # Time interval used for JDS mempool update diff --git a/test/config/jds-setupconnection-flag-test/jds-config-with-async-support.toml b/test/config/jds-setupconnection-flag-test/jds-config-with-async-support.toml index 379fee561..ab536eeb5 100644 --- a/test/config/jds-setupconnection-flag-test/jds-config-with-async-support.toml +++ b/test/config/jds-setupconnection-flag-test/jds-config-with-async-support.toml @@ -14,7 +14,7 @@ coinbase_outputs = [ listen_jd_address = "127.0.0.1:34264" core_rpc_url = "" -core_rpc_port = 18332 +core_rpc_port = 18443 core_rpc_user = "" core_rpc_pass = "" # Time interval used for JDS mempool update diff --git a/test/config/jds-setupconnection-flag-test/jds-config-without-async-support.toml b/test/config/jds-setupconnection-flag-test/jds-config-without-async-support.toml index c84655276..774f2ae5c 100644 --- a/test/config/jds-setupconnection-flag-test/jds-config-without-async-support.toml +++ b/test/config/jds-setupconnection-flag-test/jds-config-without-async-support.toml @@ -14,7 +14,7 @@ coinbase_outputs = [ listen_jd_address = "127.0.0.1:34264" core_rpc_url = "" -core_rpc_port = 18332 +core_rpc_port = 18443 core_rpc_user = "" core_rpc_pass = "" # Time interval used for JDS mempool update From aa7b9b62af047d2a86c0db58209677ee338a8adf Mon Sep 17 00:00:00 2001 From: Machu Pikacchu <177660647+machuPikacchuBTC@users.noreply.github.com> Date: Wed, 11 Jun 2025 14:16:14 +0000 Subject: [PATCH 3/7] Remove unused `just` recipe --- justfile | 6 ------ 1 file changed, 6 deletions(-) diff --git a/justfile b/justfile index 726348a59..5f0d9b1ff 100644 --- a/justfile +++ b/justfile @@ -52,9 +52,3 @@ generate-blocks COUNT="1" CREATE_WALLET="false": @echo "Generating {{COUNT}} blocks in regtest..." @if [ "{{CREATE_WALLET}}" = "true" ]; then just create-wallet; fi @bitcoin-cli -datadir=.devenv/state/bitcoind -conf=$(pwd)/bitcoin.conf -rpcuser=username -rpcpassword=password -regtest -rpcwallet=regtest -generate {{COUNT}} - -# generate blocks to a specific address in regtest -generate-to-address ADDRESS COUNT="1" CREATE_WALLET="false": - @echo "Generating {{COUNT}} blocks to address {{ADDRESS}} in regtest..." - @if [ "{{CREATE_WALLET}}" = "true" ]; then just create-wallet; fi - @bitcoin-cli -datadir=.devenv/state/bitcoind -conf=$(pwd)/bitcoin.conf -rpcuser=username -rpcpassword=password -regtest -rpcwallet=regtest generatetoaddress {{COUNT}} {{ADDRESS}} From 18b73533c73d5ac23e9283540fa28005832d23c3 Mon Sep 17 00:00:00 2001 From: Machu Pikacchu <177660647+machuPikacchuBTC@users.noreply.github.com> Date: Wed, 11 Jun 2025 17:33:59 +0000 Subject: [PATCH 4/7] Add bitcoind regtest init script --- devenv.nix | 5 +++ justfile | 9 +----- scripts/bitcoind-setup.sh | 64 +++++++++++++++++++++++++++++++++++++++ 3 files changed, 70 insertions(+), 8 deletions(-) create mode 100644 scripts/bitcoind-setup.sh diff --git a/devenv.nix b/devenv.nix index 3f6062442..1a201d790 100644 --- a/devenv.nix +++ b/devenv.nix @@ -97,6 +97,11 @@ in { bitcoind -datadir=${bitcoindDataDir} -conf=${config.devenv.root}/bitcoin.conf '' "bitcoind-regtest.log"; }; + bitcoind-setup = { + exec = withLogging '' + DEVENV_ROOT=${config.devenv.root} BITCOIND_DATADIR=${bitcoindDataDir} ${config.devenv.root}/scripts/bitcoind-setup.sh + '' "bitcoind-setup.log"; + }; miner = { exec = withLogging '' echo "Waiting for proxy..." diff --git a/justfile b/justfile index 5f0d9b1ff..69ec0d8c2 100644 --- a/justfile +++ b/justfile @@ -41,14 +41,7 @@ update-bitcoind: sed -i "s|hash = \".*\";|hash = \"$HASH\";|" bitcoind.nix && \ echo "Done! bitcoind updated to commit $LATEST_COMMIT\nYou are now ready to test and commit" -# create regtest wallet if it doesn't exist -create-wallet: - @echo "Creating regtest wallet..." - @bitcoin-cli -datadir=.devenv/state/bitcoind -conf=$(pwd)/bitcoin.conf -rpcuser=username -rpcpassword=password -regtest createwallet "regtest" || \ - (echo "Wallet exists, loading..." && bitcoin-cli -datadir=.devenv/state/bitcoind -conf=$(pwd)/bitcoin.conf -rpcuser=username -rpcpassword=password -regtest loadwallet "regtest") - # generate blocks in regtest -generate-blocks COUNT="1" CREATE_WALLET="false": +generate-blocks COUNT="1": @echo "Generating {{COUNT}} blocks in regtest..." - @if [ "{{CREATE_WALLET}}" = "true" ]; then just create-wallet; fi @bitcoin-cli -datadir=.devenv/state/bitcoind -conf=$(pwd)/bitcoin.conf -rpcuser=username -rpcpassword=password -regtest -rpcwallet=regtest -generate {{COUNT}} diff --git a/scripts/bitcoind-setup.sh b/scripts/bitcoind-setup.sh new file mode 100644 index 000000000..523ed273b --- /dev/null +++ b/scripts/bitcoind-setup.sh @@ -0,0 +1,64 @@ +#!/usr/bin/env bash + +# bitcoind-setup.sh - Initialize regtest environment +# This script waits for bitcoind to be ready, then checks if we need to initialize +# the regtest environment with a wallet and some initial blocks. This should only +# need to be run once per dev environment setup or if you've reset your state. It's +# idempotent, so you can safely run it multiple times. + +set -e + +BITCOIN_CONF="${DEVENV_ROOT:-$(pwd)}/bitcoin.conf" +DATADIR="${BITCOIND_DATADIR:-$(pwd)/.devenv/state/bitcoind}" +RPC_ARGS="-datadir=${DATADIR} -conf=${BITCOIN_CONF} -rpcuser=username -rpcpassword=password -regtest" + +create_and_load_wallet() { + echo "Creating/loading regtest wallet..." + if ! bitcoin-cli $RPC_ARGS createwallet "regtest" 2>/dev/null; then + echo "Wallet exists, attempting to load..." + bitcoin-cli $RPC_ARGS loadwallet "regtest" 2>/dev/null || echo "Wallet already loaded" + fi +} + +echo "Waiting for bitcoind to be ready..." + +# Wait for bitcoind RPC to be available +max_attempts=30 +attempt=0 +while [ $attempt -lt $max_attempts ]; do + if bitcoin-cli $RPC_ARGS getblockchaininfo >/dev/null 2>&1; then + echo "bitcoind is ready!" + break + fi + attempt=$((attempt + 1)) + echo "Attempt $attempt/$max_attempts: bitcoind not ready yet, waiting..." + sleep 2 +done + +if [ $attempt -eq $max_attempts ]; then + echo "ERROR: bitcoind failed to become ready after $max_attempts attempts" + exit 1 +fi + +BLOCK_HEIGHT=$(bitcoin-cli $RPC_ARGS getblockcount 2>/dev/null || echo "0") +echo "Current block height: $BLOCK_HEIGHT" + +# Ensure we have at least 16 blocks and a wallet +if [ "$BLOCK_HEIGHT" -lt "16" ]; then + BLOCKS_NEEDED=$((16 - BLOCK_HEIGHT)) + echo "Block height is $BLOCK_HEIGHT, need to generate $BLOCKS_NEEDED more blocks..." + + create_and_load_wallet + + echo "Generating $BLOCKS_NEEDED blocks to reach height 16..." + bitcoin-cli $RPC_ARGS -rpcwallet=regtest -generate $BLOCKS_NEEDED + + NEW_HEIGHT=$(bitcoin-cli $RPC_ARGS getblockcount) + echo "✅ Regtest environment initialized! New block height: $NEW_HEIGHT" +else + echo "✅ Regtest environment already has sufficient blocks (height: $BLOCK_HEIGHT)" + + create_and_load_wallet +fi + +echo "bitcoind setup complete!" From b5694095823c1537d351604858524c9ff6a608fb Mon Sep 17 00:00:00 2001 From: Machu Pikacchu <177660647+machuPikacchuBTC@users.noreply.github.com> Date: Wed, 11 Jun 2025 17:47:02 +0000 Subject: [PATCH 5/7] Make scripts/bitcoind-setup.sh executable --- scripts/bitcoind-setup.sh | 0 1 file changed, 0 insertions(+), 0 deletions(-) mode change 100644 => 100755 scripts/bitcoind-setup.sh diff --git a/scripts/bitcoind-setup.sh b/scripts/bitcoind-setup.sh old mode 100644 new mode 100755 From f8d89493d853199ac4731c9f3dab040f5b2d7ba4 Mon Sep 17 00:00:00 2001 From: Machu Pikacchu <177660647+machuPikacchuBTC@users.noreply.github.com> Date: Wed, 11 Jun 2025 18:43:51 +0000 Subject: [PATCH 6/7] Reset test configs --- test/config/interop-jd-change-upstream/jds-config.toml | 2 +- test/config/interop-jd-translator/jdc-config.toml | 6 +++--- test/config/interop-jd-translator/jds-config.toml | 2 +- test/config/interop-jd-translator/pool-config.toml | 4 ++-- .../jds-do-not-fail-on-wrong-txdatasucc/jds-config.toml | 2 +- .../jds-config.toml | 2 +- .../jds-config.toml | 2 +- .../jds-config-with-async-support.toml | 2 +- .../jds-config-without-async-support.toml | 2 +- 9 files changed, 12 insertions(+), 12 deletions(-) diff --git a/test/config/interop-jd-change-upstream/jds-config.toml b/test/config/interop-jd-change-upstream/jds-config.toml index 971cbf245..acda73227 100644 --- a/test/config/interop-jd-change-upstream/jds-config.toml +++ b/test/config/interop-jd-change-upstream/jds-config.toml @@ -11,7 +11,7 @@ coinbase_outputs = [ listen_jd_address = "127.0.0.1:34264" core_rpc_url = "" -core_rpc_port = 18443 +core_rpc_port = 18332 core_rpc_user = "" core_rpc_pass = "" # Time interval used for JDS mempool update diff --git a/test/config/interop-jd-translator/jdc-config.toml b/test/config/interop-jd-translator/jdc-config.toml index 7c670d394..b718f482b 100644 --- a/test/config/interop-jd-translator/jdc-config.toml +++ b/test/config/interop-jd-translator/jdc-config.toml @@ -25,9 +25,9 @@ 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 = "75.119.150.111:8442" +# tp_address = "127.0.0.1:8442" +# Hosted testnet TP +tp_address = "75.119.150.111:8442" tp_authority_pub_key = "9auqWEzQDVyd2oe1JVGFLMLHZtCo2FFqZwtKA5gd9xbuEu7PH72" # Solo Mining config diff --git a/test/config/interop-jd-translator/jds-config.toml b/test/config/interop-jd-translator/jds-config.toml index 971cbf245..acda73227 100644 --- a/test/config/interop-jd-translator/jds-config.toml +++ b/test/config/interop-jd-translator/jds-config.toml @@ -11,7 +11,7 @@ coinbase_outputs = [ listen_jd_address = "127.0.0.1:34264" core_rpc_url = "" -core_rpc_port = 18443 +core_rpc_port = 18332 core_rpc_user = "" core_rpc_pass = "" # Time interval used for JDS mempool update diff --git a/test/config/interop-jd-translator/pool-config.toml b/test/config/interop-jd-translator/pool-config.toml index d414dc1ef..9de7b11b1 100644 --- a/test/config/interop-jd-translator/pool-config.toml +++ b/test/config/interop-jd-translator/pool-config.toml @@ -19,5 +19,5 @@ coinbase_outputs = [ pool_signature = "Stratum v2 SRI Pool - gitgab19" # Template Provider config -# Local TP for regtest -tp_address = "127.0.0.1:8442" +# hosted testnet TP +tp_address = "75.119.150.111:8442" diff --git a/test/config/jds-do-not-fail-on-wrong-txdatasucc/jds-config.toml b/test/config/jds-do-not-fail-on-wrong-txdatasucc/jds-config.toml index 971cbf245..acda73227 100644 --- a/test/config/jds-do-not-fail-on-wrong-txdatasucc/jds-config.toml +++ b/test/config/jds-do-not-fail-on-wrong-txdatasucc/jds-config.toml @@ -11,7 +11,7 @@ coinbase_outputs = [ listen_jd_address = "127.0.0.1:34264" core_rpc_url = "" -core_rpc_port = 18443 +core_rpc_port = 18332 core_rpc_user = "" core_rpc_pass = "" # Time interval used for JDS mempool update diff --git a/test/config/jds-do-not-panic-if-jdc-close-connection/jds-config.toml b/test/config/jds-do-not-panic-if-jdc-close-connection/jds-config.toml index 971cbf245..acda73227 100644 --- a/test/config/jds-do-not-panic-if-jdc-close-connection/jds-config.toml +++ b/test/config/jds-do-not-panic-if-jdc-close-connection/jds-config.toml @@ -11,7 +11,7 @@ coinbase_outputs = [ listen_jd_address = "127.0.0.1:34264" core_rpc_url = "" -core_rpc_port = 18443 +core_rpc_port = 18332 core_rpc_user = "" core_rpc_pass = "" # Time interval used for JDS mempool update diff --git a/test/config/jds-receive-solution-while-processing-declared-job/jds-config.toml b/test/config/jds-receive-solution-while-processing-declared-job/jds-config.toml index 1472d1734..576b35443 100644 --- a/test/config/jds-receive-solution-while-processing-declared-job/jds-config.toml +++ b/test/config/jds-receive-solution-while-processing-declared-job/jds-config.toml @@ -11,7 +11,7 @@ coinbase_outputs = [ listen_jd_address = "127.0.0.1:34264" core_rpc_url = "" -core_rpc_port = 18443 +core_rpc_port = 48332 core_rpc_user = "" core_rpc_pass = "" # Time interval used for JDS mempool update diff --git a/test/config/jds-setupconnection-flag-test/jds-config-with-async-support.toml b/test/config/jds-setupconnection-flag-test/jds-config-with-async-support.toml index ab536eeb5..379fee561 100644 --- a/test/config/jds-setupconnection-flag-test/jds-config-with-async-support.toml +++ b/test/config/jds-setupconnection-flag-test/jds-config-with-async-support.toml @@ -14,7 +14,7 @@ coinbase_outputs = [ listen_jd_address = "127.0.0.1:34264" core_rpc_url = "" -core_rpc_port = 18443 +core_rpc_port = 18332 core_rpc_user = "" core_rpc_pass = "" # Time interval used for JDS mempool update diff --git a/test/config/jds-setupconnection-flag-test/jds-config-without-async-support.toml b/test/config/jds-setupconnection-flag-test/jds-config-without-async-support.toml index 774f2ae5c..c84655276 100644 --- a/test/config/jds-setupconnection-flag-test/jds-config-without-async-support.toml +++ b/test/config/jds-setupconnection-flag-test/jds-config-without-async-support.toml @@ -14,7 +14,7 @@ coinbase_outputs = [ listen_jd_address = "127.0.0.1:34264" core_rpc_url = "" -core_rpc_port = 18443 +core_rpc_port = 18332 core_rpc_user = "" core_rpc_pass = "" # Time interval used for JDS mempool update From 6e5c39b5dc1a3db9d5d089962ea5314e4e055b10 Mon Sep 17 00:00:00 2001 From: Machu Pikacchu <177660647+machuPikacchuBTC@users.noreply.github.com> Date: Wed, 11 Jun 2025 18:55:53 +0000 Subject: [PATCH 7/7] Initialize bitcoind wallet in pool process --- devenv.nix | 6 +----- 1 file changed, 1 insertion(+), 5 deletions(-) diff --git a/devenv.nix b/devenv.nix index 1a201d790..94ae4ab78 100644 --- a/devenv.nix +++ b/devenv.nix @@ -57,6 +57,7 @@ in { redis = {exec = withLogging "mkdir -p ${config.devenv.root}/.devenv/state/redis && redis-server --dir ${config.devenv.root}/.devenv/state/redis --port ${toString poolConfig.redis.port}" "redis.log";}; pool = { exec = withLogging '' + DEVENV_ROOT=${config.devenv.root} BITCOIND_DATADIR=${bitcoindDataDir} ${config.devenv.root}/scripts/bitcoind-setup.sh echo "Waiting for Mint..." while ! nc -z localhost ${toString poolConfig.mint.port}; do sleep 1 @@ -97,11 +98,6 @@ in { bitcoind -datadir=${bitcoindDataDir} -conf=${config.devenv.root}/bitcoin.conf '' "bitcoind-regtest.log"; }; - bitcoind-setup = { - exec = withLogging '' - DEVENV_ROOT=${config.devenv.root} BITCOIND_DATADIR=${bitcoindDataDir} ${config.devenv.root}/scripts/bitcoind-setup.sh - '' "bitcoind-setup.log"; - }; miner = { exec = withLogging '' echo "Waiting for proxy..."