-
Notifications
You must be signed in to change notification settings - Fork 148
testing/btc: migrate harness to descriptor wallets #3480
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Open
JustinBeBoy
wants to merge
3
commits into
decred:master
Choose a base branch
from
JustinBeBoy:fix_testing_btc_harness
base: master
Could not load branches
Branch not found: {{ refName }}
Loading
Could not load tags
Nothing to show
Loading
Are you sure you want to change the base?
Some commits from the old base branch may be removed from the timeline,
and old review comments may become outdated.
Open
Changes from all commits
Commits
Show all changes
3 commits
Select commit
Hold shift + click to select a range
File filter
Filter by extension
Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
There are no files selected for viewing
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| Original file line number | Diff line number | Diff line change |
|---|---|---|
| @@ -0,0 +1 @@ | ||
| [{"desc":"pkh(tprv8ZgxMBicQKsPd6K7HPaoxQmGnC43xV2qw9U5SsuvaS9A5JKj3yxSCTxjUyhLWMyEiN89msKcjiftHB6Rz8v7fvfLKuU52rCYy9EvYeC7MXV/44h/1h/0h/0/*)#qc049l39","timestamp":"now","active":true,"internal":false,"range":[0,999],"next":0},{"desc":"pkh(tprv8ZgxMBicQKsPd6K7HPaoxQmGnC43xV2qw9U5SsuvaS9A5JKj3yxSCTxjUyhLWMyEiN89msKcjiftHB6Rz8v7fvfLKuU52rCYy9EvYeC7MXV/44h/1h/0h/1/*)#3v25c2pa","timestamp":"now","active":true,"internal":true,"range":[0,999],"next":0},{"desc":"sh(wpkh(tprv8ZgxMBicQKsPd6K7HPaoxQmGnC43xV2qw9U5SsuvaS9A5JKj3yxSCTxjUyhLWMyEiN89msKcjiftHB6Rz8v7fvfLKuU52rCYy9EvYeC7MXV/49h/1h/0h/0/*))#edynh5ze","timestamp":"now","active":true,"internal":false,"range":[0,999],"next":0},{"desc":"sh(wpkh(tprv8ZgxMBicQKsPd6K7HPaoxQmGnC43xV2qw9U5SsuvaS9A5JKj3yxSCTxjUyhLWMyEiN89msKcjiftHB6Rz8v7fvfLKuU52rCYy9EvYeC7MXV/49h/1h/0h/1/*))#lwvkvefd","timestamp":"now","active":true,"internal":true,"range":[0,999],"next":0},{"desc":"tr(tprv8ZgxMBicQKsPd6K7HPaoxQmGnC43xV2qw9U5SsuvaS9A5JKj3yxSCTxjUyhLWMyEiN89msKcjiftHB6Rz8v7fvfLKuU52rCYy9EvYeC7MXV/86h/1h/0h/0/*)#f8rt6k6w","timestamp":"now","active":true,"internal":false,"range":[0,999],"next":0},{"desc":"tr(tprv8ZgxMBicQKsPd6K7HPaoxQmGnC43xV2qw9U5SsuvaS9A5JKj3yxSCTxjUyhLWMyEiN89msKcjiftHB6Rz8v7fvfLKuU52rCYy9EvYeC7MXV/86h/1h/0h/1/*)#cnx28r2k","timestamp":"now","active":true,"internal":true,"range":[0,999],"next":0},{"desc":"wpkh(tprv8ZgxMBicQKsPd6K7HPaoxQmGnC43xV2qw9U5SsuvaS9A5JKj3yxSCTxjUyhLWMyEiN89msKcjiftHB6Rz8v7fvfLKuU52rCYy9EvYeC7MXV/84h/1h/0h/0/*)#5e2fkn6t","timestamp":"now","active":true,"internal":false,"range":[0,999],"next":0},{"desc":"wpkh(tprv8ZgxMBicQKsPd6K7HPaoxQmGnC43xV2qw9U5SsuvaS9A5JKj3yxSCTxjUyhLWMyEiN89msKcjiftHB6Rz8v7fvfLKuU52rCYy9EvYeC7MXV/84h/1h/0h/1/*)#9d0gtx2n","timestamp":"now","active":true,"internal":true,"range":[0,999],"next":0}] |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| Original file line number | Diff line number | Diff line change |
|---|---|---|
| @@ -1 +1 @@ | ||
| [{"desc":"pkh(tprv8ZgxMBicQKsPeEJskbB5M2i3VL5wHcbZWiHV9bqsaWWFbYGVSzu6GYpkHtXrVD9QAe773xwYcjfb1jZMcShNofV18USL6h9e6rqSLdekxkp/44'/1'/0'/0/*)#xep6cuqj","timestamp":1655751807,"active":true,"internal":false,"range":[0,999],"next":1},{"desc":"sh(wpkh(tprv8ZgxMBicQKsPeEJskbB5M2i3VL5wHcbZWiHV9bqsaWWFbYGVSzu6GYpkHtXrVD9QAe773xwYcjfb1jZMcShNofV18USL6h9e6rqSLdekxkp/49'/1'/0'/0/*))#amcg4nny","timestamp":1655751807,"active":true,"internal":false,"range":[0,999],"next":0},{"desc":"wpkh(tprv8ZgxMBicQKsPeEJskbB5M2i3VL5wHcbZWiHV9bqsaWWFbYGVSzu6GYpkHtXrVD9QAe773xwYcjfb1jZMcShNofV18USL6h9e6rqSLdekxkp/84'/1'/0'/0/*)#y3dnm4x9","timestamp":1655751807,"active":true,"internal":false,"range":[0,999],"next":1},{"desc":"tr(tprv8ZgxMBicQKsPeEJskbB5M2i3VL5wHcbZWiHV9bqsaWWFbYGVSzu6GYpkHtXrVD9QAe773xwYcjfb1jZMcShNofV18USL6h9e6rqSLdekxkp/86'/1'/0'/0/*)#dx02vsaf","timestamp":1655751807,"active":true,"internal":false,"range":[0,999],"next":0},{"desc":"pkh(tprv8ZgxMBicQKsPeEJskbB5M2i3VL5wHcbZWiHV9bqsaWWFbYGVSzu6GYpkHtXrVD9QAe773xwYcjfb1jZMcShNofV18USL6h9e6rqSLdekxkp/44'/1'/0'/1/*)#hdym9fs2","timestamp":1655751807,"active":true,"internal":true,"range":[0,999],"next":0},{"desc":"sh(wpkh(tprv8ZgxMBicQKsPeEJskbB5M2i3VL5wHcbZWiHV9bqsaWWFbYGVSzu6GYpkHtXrVD9QAe773xwYcjfb1jZMcShNofV18USL6h9e6rqSLdekxkp/49'/1'/0'/1/*))#mcsdw7cs","timestamp":1655751807,"active":true,"internal":true,"range":[0,999],"next":0},{"desc":"wpkh(tprv8ZgxMBicQKsPeEJskbB5M2i3VL5wHcbZWiHV9bqsaWWFbYGVSzu6GYpkHtXrVD9QAe773xwYcjfb1jZMcShNofV18USL6h9e6rqSLdekxkp/84'/1'/0'/1/*)#49gjxqka","timestamp":1655751807,"active":true,"internal":true,"range":[0,999],"next":0},{"desc":"tr(tprv8ZgxMBicQKsPeEJskbB5M2i3VL5wHcbZWiHV9bqsaWWFbYGVSzu6GYpkHtXrVD9QAe773xwYcjfb1jZMcShNofV18USL6h9e6rqSLdekxkp/86'/1'/0'/1/*)#uj2t39d3","timestamp":1655751807,"active":true,"internal":true,"range":[0,999],"next":0}] | ||
| [{"desc":"pkh(tprv8ZgxMBicQKsPeyeXQGRzVYafa4YWL47Rc2fBzCCB9CQoLh4iXLV5jJLX6brunv2Qo4fgP61wqtQbAU6iWydfhqeFudM8d511SHF197Mh6Wi/44h/1h/0h/0/*)#v08w9npt","timestamp":"now","active":true,"internal":false,"range":[0,999],"next":0},{"desc":"pkh(tprv8ZgxMBicQKsPeyeXQGRzVYafa4YWL47Rc2fBzCCB9CQoLh4iXLV5jJLX6brunv2Qo4fgP61wqtQbAU6iWydfhqeFudM8d511SHF197Mh6Wi/44h/1h/0h/1/*)#amz0cx3n","timestamp":"now","active":true,"internal":true,"range":[0,999],"next":0},{"desc":"sh(wpkh(tprv8ZgxMBicQKsPeyeXQGRzVYafa4YWL47Rc2fBzCCB9CQoLh4iXLV5jJLX6brunv2Qo4fgP61wqtQbAU6iWydfhqeFudM8d511SHF197Mh6Wi/49h/1h/0h/0/*))#zgm8ymm0","timestamp":"now","active":true,"internal":false,"range":[0,999],"next":0},{"desc":"sh(wpkh(tprv8ZgxMBicQKsPeyeXQGRzVYafa4YWL47Rc2fBzCCB9CQoLh4iXLV5jJLX6brunv2Qo4fgP61wqtQbAU6iWydfhqeFudM8d511SHF197Mh6Wi/49h/1h/0h/1/*))#ytnzlksm","timestamp":"now","active":true,"internal":true,"range":[0,999],"next":0},{"desc":"tr(tprv8ZgxMBicQKsPeyeXQGRzVYafa4YWL47Rc2fBzCCB9CQoLh4iXLV5jJLX6brunv2Qo4fgP61wqtQbAU6iWydfhqeFudM8d511SHF197Mh6Wi/86h/1h/0h/0/*)#fe6yrppt","timestamp":"now","active":true,"internal":false,"range":[0,999],"next":0},{"desc":"tr(tprv8ZgxMBicQKsPeyeXQGRzVYafa4YWL47Rc2fBzCCB9CQoLh4iXLV5jJLX6brunv2Qo4fgP61wqtQbAU6iWydfhqeFudM8d511SHF197Mh6Wi/86h/1h/0h/1/*)#cdl9753n","timestamp":"now","active":true,"internal":true,"range":[0,999],"next":0},{"desc":"wpkh(tprv8ZgxMBicQKsPeyeXQGRzVYafa4YWL47Rc2fBzCCB9CQoLh4iXLV5jJLX6brunv2Qo4fgP61wqtQbAU6iWydfhqeFudM8d511SHF197Mh6Wi/84h/1h/0h/0/*)#n23jpl8l","timestamp":"now","active":true,"internal":false,"range":[0,999],"next":0},{"desc":"wpkh(tprv8ZgxMBicQKsPeyeXQGRzVYafa4YWL47Rc2fBzCCB9CQoLh4iXLV5jJLX6brunv2Qo4fgP61wqtQbAU6iWydfhqeFudM8d511SHF197Mh6Wi/84h/1h/0h/1/*)#z75nu2h8","timestamp":"now","active":true,"internal":true,"range":[0,999],"next":0}] |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| Original file line number | Diff line number | Diff line change |
|---|---|---|
| @@ -0,0 +1 @@ | ||
| [{"desc":"pkh(tprv8ZgxMBicQKsPdhobdXkAnzvpwgaiM4jzWvV22Ne35bK1hGJ9yR9uwgmYWEg31KTADZwrHbuDTb3bKDkQ9DQuAhvNnYYLL4HqBrSp1M3eQWt/44h/1h/0h/0/*)#y0c0vkn6","timestamp":"now","active":true,"internal":false,"range":[0,999],"next":0},{"desc":"pkh(tprv8ZgxMBicQKsPdhobdXkAnzvpwgaiM4jzWvV22Ne35bK1hGJ9yR9uwgmYWEg31KTADZwrHbuDTb3bKDkQ9DQuAhvNnYYLL4HqBrSp1M3eQWt/44h/1h/0h/1/*)#4maw3rrz","timestamp":"now","active":true,"internal":true,"range":[0,999],"next":0},{"desc":"sh(wpkh(tprv8ZgxMBicQKsPdhobdXkAnzvpwgaiM4jzWvV22Ne35bK1hGJ9yR9uwgmYWEg31KTADZwrHbuDTb3bKDkQ9DQuAhvNnYYLL4HqBrSp1M3eQWt/49h/1h/0h/0/*))#r4ec7vhq","timestamp":"now","active":true,"internal":false,"range":[0,999],"next":0},{"desc":"sh(wpkh(tprv8ZgxMBicQKsPdhobdXkAnzvpwgaiM4jzWvV22Ne35bK1hGJ9yR9uwgmYWEg31KTADZwrHbuDTb3bKDkQ9DQuAhvNnYYLL4HqBrSp1M3eQWt/49h/1h/0h/1/*))#9k3a9pu5","timestamp":"now","active":true,"internal":true,"range":[0,999],"next":0},{"desc":"tr(tprv8ZgxMBicQKsPdhobdXkAnzvpwgaiM4jzWvV22Ne35bK1hGJ9yR9uwgmYWEg31KTADZwrHbuDTb3bKDkQ9DQuAhvNnYYLL4HqBrSp1M3eQWt/86h/1h/0h/0/*)#5l3xshvg","timestamp":"now","active":true,"internal":false,"range":[0,999],"next":0},{"desc":"tr(tprv8ZgxMBicQKsPdhobdXkAnzvpwgaiM4jzWvV22Ne35bK1hGJ9yR9uwgmYWEg31KTADZwrHbuDTb3bKDkQ9DQuAhvNnYYLL4HqBrSp1M3eQWt/86h/1h/0h/1/*)#9t58dzus","timestamp":"now","active":true,"internal":true,"range":[0,999],"next":0},{"desc":"wpkh(tprv8ZgxMBicQKsPdhobdXkAnzvpwgaiM4jzWvV22Ne35bK1hGJ9yR9uwgmYWEg31KTADZwrHbuDTb3bKDkQ9DQuAhvNnYYLL4HqBrSp1M3eQWt/84h/1h/0h/0/*)#pj6g5485","timestamp":"now","active":true,"internal":false,"range":[0,999],"next":0},{"desc":"wpkh(tprv8ZgxMBicQKsPdhobdXkAnzvpwgaiM4jzWvV22Ne35bK1hGJ9yR9uwgmYWEg31KTADZwrHbuDTb3bKDkQ9DQuAhvNnYYLL4HqBrSp1M3eQWt/84h/1h/0h/1/*)#sxlffqhv","timestamp":"now","active":true,"internal":true,"range":[0,999],"next":0}] |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| Original file line number | Diff line number | Diff line change |
|---|---|---|
| @@ -1 +1 @@ | ||
| [{"desc":"pkh(tprv8ZgxMBicQKsPf7ZAtR3ggoFn1RhD7i5GupkFVfsKCSCBEgb2scmPUmFMf2dMx5djtHDit3aWTAPQGnkR9QNx2uiB8kMSVgjDoD1p7ynHtyz/44'/1'/0'/0/*)#wg4x3eld","timestamp":1655755384,"active":true,"internal":false,"range":[0,999],"next":0},{"desc":"sh(wpkh(tprv8ZgxMBicQKsPf7ZAtR3ggoFn1RhD7i5GupkFVfsKCSCBEgb2scmPUmFMf2dMx5djtHDit3aWTAPQGnkR9QNx2uiB8kMSVgjDoD1p7ynHtyz/49'/1'/0'/0/*))#8r2f8dxp","timestamp":1655755384,"active":true,"internal":false,"range":[0,999],"next":0},{"desc":"wpkh(tprv8ZgxMBicQKsPf7ZAtR3ggoFn1RhD7i5GupkFVfsKCSCBEgb2scmPUmFMf2dMx5djtHDit3aWTAPQGnkR9QNx2uiB8kMSVgjDoD1p7ynHtyz/84'/1'/0'/0/*)#2mqfus42","timestamp":1655755384,"active":true,"internal":false,"range":[0,999],"next":0},{"desc":"tr(tprv8ZgxMBicQKsPf7ZAtR3ggoFn1RhD7i5GupkFVfsKCSCBEgb2scmPUmFMf2dMx5djtHDit3aWTAPQGnkR9QNx2uiB8kMSVgjDoD1p7ynHtyz/86'/1'/0'/0/*)#ege8qf0x","timestamp":1655755384,"active":true,"internal":false,"range":[0,999],"next":0},{"desc":"pkh(tprv8ZgxMBicQKsPf7ZAtR3ggoFn1RhD7i5GupkFVfsKCSCBEgb2scmPUmFMf2dMx5djtHDit3aWTAPQGnkR9QNx2uiB8kMSVgjDoD1p7ynHtyz/44'/1'/0'/1/*)#lus8vv04","timestamp":1655755384,"active":true,"internal":true,"range":[0,999],"next":0},{"desc":"sh(wpkh(tprv8ZgxMBicQKsPf7ZAtR3ggoFn1RhD7i5GupkFVfsKCSCBEgb2scmPUmFMf2dMx5djtHDit3aWTAPQGnkR9QNx2uiB8kMSVgjDoD1p7ynHtyz/49'/1'/0'/1/*))#pqzvuqd4","timestamp":1655755385,"active":true,"internal":true,"range":[0,999],"next":0},{"desc":"wpkh(tprv8ZgxMBicQKsPf7ZAtR3ggoFn1RhD7i5GupkFVfsKCSCBEgb2scmPUmFMf2dMx5djtHDit3aWTAPQGnkR9QNx2uiB8kMSVgjDoD1p7ynHtyz/84'/1'/0'/1/*)#m09gp99j","timestamp":1655755385,"active":true,"internal":true,"range":[0,999],"next":0},{"desc":"tr(tprv8ZgxMBicQKsPf7ZAtR3ggoFn1RhD7i5GupkFVfsKCSCBEgb2scmPUmFMf2dMx5djtHDit3aWTAPQGnkR9QNx2uiB8kMSVgjDoD1p7ynHtyz/86'/1'/0'/1/*)#guuxaul7","timestamp":1655755385,"active":true,"internal":true,"range":[0,999],"next":0}] | ||
| [{"desc":"pkh(tprv8ZgxMBicQKsPdLVb1ZPPcJp5LpsPaC9opAiqLoCFmqoiHN2YiyJUTfAAro8mfpeieCWRb1hVP4SbqejtNgnj5MqyJpPB3qJ47h7bZEtkZoK/44h/1h/0h/0/*)#aa0p74f6","timestamp":"now","active":true,"internal":false,"range":[0,999],"next":0},{"desc":"pkh(tprv8ZgxMBicQKsPdLVb1ZPPcJp5LpsPaC9opAiqLoCFmqoiHN2YiyJUTfAAro8mfpeieCWRb1hVP4SbqejtNgnj5MqyJpPB3qJ47h7bZEtkZoK/44h/1h/0h/1/*)#vf2qrqez","timestamp":"now","active":true,"internal":true,"range":[0,999],"next":0},{"desc":"sh(wpkh(tprv8ZgxMBicQKsPdLVb1ZPPcJp5LpsPaC9opAiqLoCFmqoiHN2YiyJUTfAAro8mfpeieCWRb1hVP4SbqejtNgnj5MqyJpPB3qJ47h7bZEtkZoK/49h/1h/0h/0/*))#tvht38gv","timestamp":"now","active":true,"internal":false,"range":[0,999],"next":0},{"desc":"sh(wpkh(tprv8ZgxMBicQKsPdLVb1ZPPcJp5LpsPaC9opAiqLoCFmqoiHN2YiyJUTfAAro8mfpeieCWRb1hVP4SbqejtNgnj5MqyJpPB3qJ47h7bZEtkZoK/49h/1h/0h/1/*))#d0lw22rc","timestamp":"now","active":true,"internal":true,"range":[0,999],"next":0},{"desc":"tr(tprv8ZgxMBicQKsPdLVb1ZPPcJp5LpsPaC9opAiqLoCFmqoiHN2YiyJUTfAAro8mfpeieCWRb1hVP4SbqejtNgnj5MqyJpPB3qJ47h7bZEtkZoK/86h/1h/0h/0/*)#x5hnk8ty","timestamp":"now","active":true,"internal":false,"range":[0,999],"next":0},{"desc":"tr(tprv8ZgxMBicQKsPdLVb1ZPPcJp5LpsPaC9opAiqLoCFmqoiHN2YiyJUTfAAro8mfpeieCWRb1hVP4SbqejtNgnj5MqyJpPB3qJ47h7bZEtkZoK/86h/1h/0h/1/*)#hqjjtjmu","timestamp":"now","active":true,"internal":true,"range":[0,999],"next":0},{"desc":"wpkh(tprv8ZgxMBicQKsPdLVb1ZPPcJp5LpsPaC9opAiqLoCFmqoiHN2YiyJUTfAAro8mfpeieCWRb1hVP4SbqejtNgnj5MqyJpPB3qJ47h7bZEtkZoK/84h/1h/0h/0/*)#w5pp088a","timestamp":"now","active":true,"internal":false,"range":[0,999],"next":0},{"desc":"wpkh(tprv8ZgxMBicQKsPdLVb1ZPPcJp5LpsPaC9opAiqLoCFmqoiHN2YiyJUTfAAro8mfpeieCWRb1hVP4SbqejtNgnj5MqyJpPB3qJ47h7bZEtkZoK/84h/1h/0h/1/*)#lqyqjjh9","timestamp":"now","active":true,"internal":true,"range":[0,999],"next":0}] |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| Original file line number | Diff line number | Diff line change |
|---|---|---|
| @@ -0,0 +1,121 @@ | ||
| #!/usr/bin/env bash | ||
| # Generate descriptor JSON files for BTC testing harness using Bitcoin Core RPC. | ||
| # This script creates desc-{alpha,beta,gamma,delta}.json with correct checksums. | ||
| # | ||
| # Prerequisites: | ||
| # - Bitcoin Core running on regtest (run harness.sh first, or start manually) | ||
| # - bitcoin-cli available in PATH | ||
| # - python3 available in PATH | ||
| # | ||
| # Usage: ./gen-descriptors.sh [RPC_PORT] | ||
| # RPC_PORT defaults to 20556 (alpha node) | ||
|
|
||
| set -e | ||
|
|
||
| RPC_PORT="${1:-20556}" | ||
| RPC_USER="user" | ||
| RPC_PASS="pass" | ||
|
|
||
| CLI="bitcoin-cli -regtest=1 -rpcport=${RPC_PORT} -rpcuser=${RPC_USER} -rpcpassword=${RPC_PASS}" | ||
|
|
||
| echo "=== BTC Descriptor Generator ===" | ||
| echo "Using RPC port: ${RPC_PORT}" | ||
| echo "" | ||
|
|
||
| # Check if Bitcoin Core is running | ||
| if ! ${CLI} getblockchaininfo &>/dev/null; then | ||
| echo "ERROR: Bitcoin Core not running on port ${RPC_PORT}" | ||
| echo "Please start the harness first or run bitcoind manually:" | ||
| echo " bitcoind -regtest -rpcport=${RPC_PORT} -rpcuser=${RPC_USER} -rpcpassword=${RPC_PASS}" | ||
| exit 1 | ||
| fi | ||
|
|
||
| echo "Bitcoin Core is running. Generating descriptors..." | ||
| echo "" | ||
|
|
||
| # Function to generate descriptor file for a wallet | ||
| generate_wallet_descriptors() { | ||
| local wallet_name="$1" | ||
| local output_file="$2" | ||
| local temp_wallet="_gen_${wallet_name}_$$" | ||
|
|
||
| echo "Generating descriptors for ${wallet_name}..." | ||
|
|
||
| # Create temporary descriptor wallet | ||
| ${CLI} createwallet "${temp_wallet}" false false "" false true >/dev/null 2>&1 || { | ||
| # Wallet might already exist, try to load it | ||
| ${CLI} loadwallet "${temp_wallet}" >/dev/null 2>&1 || true | ||
| } | ||
|
|
||
| # Export descriptors with private keys | ||
| local descriptors=$(${CLI} -rpcwallet="${temp_wallet}" listdescriptors true) | ||
|
|
||
| # Get the first bech32 address (wpkh - BIP84) | ||
| local address=$(${CLI} -rpcwallet="${temp_wallet}" getnewaddress "" "bech32") | ||
|
|
||
| # Convert to importdescriptors format | ||
| echo "${descriptors}" | python3 -c " | ||
| import json, sys | ||
| data = json.load(sys.stdin) | ||
| result = [] | ||
| for d in data['descriptors']: | ||
| result.append({ | ||
| 'desc': d['desc'], | ||
| 'timestamp': 'now', | ||
| 'active': d['active'], | ||
| 'internal': d['internal'], | ||
| 'range': d['range'], | ||
| 'next': d.get('next', 0) | ||
| }) | ||
| print(json.dumps(result, separators=(',',':'))) | ||
| " > "${output_file}" | ||
JustinBeBoy marked this conversation as resolved.
Show resolved
Hide resolved
|
||
|
|
||
| echo " -> ${output_file}" | ||
| echo " -> Address: ${address}" | ||
|
|
||
| # Unload and delete temporary wallet | ||
| ${CLI} unloadwallet "${temp_wallet}" >/dev/null 2>&1 || true | ||
JustinBeBoy marked this conversation as resolved.
Show resolved
Hide resolved
|
||
|
|
||
| # Return address via global variable (bash limitation) | ||
| GENERATED_ADDRESS="${address}" | ||
| } | ||
|
|
||
| # Generate descriptors for all wallets (macOS bash 3.x compatible) | ||
| generate_wallet_descriptors "alpha" "desc-alpha.json" | ||
| ALPHA_ADDR="${GENERATED_ADDRESS}" | ||
|
|
||
| generate_wallet_descriptors "beta" "desc-beta.json" | ||
| BETA_ADDR="${GENERATED_ADDRESS}" | ||
|
|
||
| generate_wallet_descriptors "gamma" "desc-gamma.json" | ||
| GAMMA_ADDR="${GENERATED_ADDRESS}" | ||
|
|
||
| generate_wallet_descriptors "delta" "desc-delta.json" | ||
| DELTA_ADDR="${GENERATED_ADDRESS}" | ||
|
|
||
| echo "" | ||
| echo "==========================================" | ||
| echo "GENERATED FILES:" | ||
| echo "==========================================" | ||
| ls -la desc-*.json | ||
| echo "" | ||
|
|
||
| echo "==========================================" | ||
| echo "UPDATE harness.sh WITH THESE VALUES:" | ||
| echo "==========================================" | ||
| echo "" | ||
| echo "export ALPHA_MINING_ADDR=\"${ALPHA_ADDR}\"" | ||
| echo "export BETA_MINING_ADDR=\"${BETA_ADDR}\"" | ||
| echo "export GAMMA_ADDRESS=\"${GAMMA_ADDR}\"" | ||
| echo "export DELTA_ADDRESS=\"${DELTA_ADDR}\"" | ||
| echo "" | ||
|
|
||
| echo "==========================================" | ||
| echo "IMPORTANT NOTES:" | ||
| echo "==========================================" | ||
| echo "1. Commit the generated desc-*.json files to the repository" | ||
| echo "2. Update harness.sh with the addresses above" | ||
| echo "3. Remove any existing harnesschain.tar.gz" | ||
| echo "4. Bump HARNESS_VER in harness.sh" | ||
| echo "" | ||
| echo "Done!" | ||
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Add this suggestion to a batch that can be applied as a single commit.
This suggestion is invalid because no changes were made to the code.
Suggestions cannot be applied while the pull request is closed.
Suggestions cannot be applied while viewing a subset of changes.
Only one suggestion per line can be applied in a batch.
Add this suggestion to a batch that can be applied as a single commit.
Applying suggestions on deleted lines is not supported.
You must change the existing code in this line in order to create a valid suggestion.
Outdated suggestions cannot be applied.
This suggestion has been applied or marked resolved.
Suggestions cannot be applied from pending reviews.
Suggestions cannot be applied on multi-line comments.
Suggestions cannot be applied while the pull request is queued to merge.
Suggestion cannot be applied right now. Please check back later.
Uh oh!
There was an error while loading. Please reload this page.