Skip to content
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

[DRAFT] Support Core 22 and 23 #229

Draft
wants to merge 2 commits into
base: master
Choose a base branch
from

Conversation

clarkmoody
Copy link
Member

Builds on top of #228, which modifies an RPC call to conform to Core 22.0, but we're not testing that version.

This PR will let us see how the test suite performs on those new versions, including the changes from #228.

@clarkmoody clarkmoody changed the title [DRAFT} Support Core 22 and 23 [DRAFT] Support Core 22 and 23 Jun 13, 2022
@tcharding
Copy link
Member

I'm not sure why but to get this to run locally against Bitcoin Core v22 I had to add a 0 to the default args list when calling get_tx_out_set_info. I don't understand why I was able to run #228 without this change? The changes to run.sh are the same as I posted on #228.

diff --git a/client/src/client.rs b/client/src/client.rs
index 6dc50d3..dc5ee1b 100644
--- a/client/src/client.rs
+++ b/client/src/client.rs
@@ -1142,7 +1142,7 @@ pub trait RpcApi: Sized {
     ) -> Result<json::GetTxOutSetInfoResult> {
         let mut args =
             [opt_into_json(hash_type)?, opt_into_json(hash_or_height)?, opt_into_json(use_index)?];
-        self.call("gettxoutsetinfo", handle_defaults(&mut args, &[null(), null(), null()]))
+        self.call("gettxoutsetinfo", handle_defaults(&mut args, &[null(), 0.into(), null()]))
     }
 
     /// Returns information about network traffic, including bytes in, bytes out,
diff --git a/integration_test/run.sh b/integration_test/run.sh
index bb06cfd..c178a69 100755
--- a/integration_test/run.sh
+++ b/integration_test/run.sh
@@ -22,9 +22,12 @@ BLOCKFILTERARG=""
 if bitcoind -version | grep -q "v0\.\(19\|2\)"; then
     BLOCKFILTERARG="-blockfilterindex=1"
 fi
+if bitcoind -version | grep -q "v2"; then
+    BLOCKFILTERARG="-blockfilterindex=basic"
+fi
 
 FALLBACKFEEARG=""
-if bitcoind -version | grep -q "v0\.2"; then
+if bitcoind -version | grep -q "v0\.2\|v2"; then
     FALLBACKFEEARG="-fallbackfee=0.00001000"
 fi

@tcharding
Copy link
Member

tcharding commented Aug 17, 2022

I tried testing against Bitcoin Core v23 as well.

I'm not sure why the CI error is being generated.

"This type of wallet does not support this command"

When I run bitcoind manually, create a wallet, generate an address, and dump the private key, it works fine.

@clarkmoody clarkmoody force-pushed the support-core-22-and-23 branch from 9aa1ec2 to c189056 Compare August 25, 2023 22:51
@0xB10C
Copy link
Contributor

0xB10C commented Sep 1, 2023

I tried testing against Bitcoin Core v23 as well.

I'm not sure why the CI error is being generated.

"This type of wallet does not support this command"

When I run bitcoind manually, create a wallet, generate an address, and dump the private key, it works fine.

Starting with Bitcoin Core v23, Bitcoin Core will create descriptor wallets by default. You can't dump private keys from descriptor wallets. See also https://bitcoin.stackexchange.com/a/113838/63817.

I've made progress with 0xB10C@ab16de2 which is now stuck on

[TRACE][bitcoincore_rpc]: JSON-RPC response for listwallets: ["testwallet","alice","bob","carol","denise","emily","frank"]
[DEBUG][bitcoincore_rpc]: JSON-RPC request: listwalletdir []
thread 'main' panicked at 'Missing `default` for argument idx 1', client/src/client.rs:129:21
note: run with `RUST_BACKTRACE=1` environment variable to display a backtrace
[TRACE][bitcoincore_rpc]: JSON-RPC response for listwalletdir: {"wallets":[{"name":"carol"},{"name":"alice"},{"name":"testwallet"},{"name":"bob"},{"name":"emily"},{"name":"denise"},{"name":"frank"}]}

https://github.com/0xB10C/rust-bitcoincore-rpc/actions/runs/6047586720/job/16411328972#step:4:1395

The whole create_wallet tests seems a bit fragile.

edit: see also #230. I missed this before.

@tcharding tcharding added this to the v0.20.0 milestone Apr 30, 2024
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

3 participants