From 383c1cf947c088037a2fdf7b701180e26ed03467 Mon Sep 17 00:00:00 2001 From: Elias Rohrer Date: Fri, 30 Aug 2024 11:57:26 +0200 Subject: [PATCH] WIP: Add support for Bitcoin Core v28 Add support and testing for Bitcoin Core versions `28.0` --- .github/workflows/rust.yaml | 1 + client/src/client_sync/v28.rs | 44 +++++ contrib/run_bitcoind.sh | 7 + integration_test/Cargo.toml | 2 + integration_test/tests/v28_api.rs | 57 ++++++ json/src/lib.rs | 1 + json/src/v17/network.rs | 5 +- json/src/v28/mod.rs | 197 ++++++++++++++++++++ json/src/v28/rpc-api.txt | 174 +++++++++++++++++ regtest/Cargo.toml | 5 +- regtest/sha256/bitcoin-core-28.0-SHA256SUMS | 1 + regtest/src/client_versions.rs | 10 +- regtest/src/versions.rs | 9 +- 13 files changed, 503 insertions(+), 10 deletions(-) create mode 100644 client/src/client_sync/v28.rs create mode 100644 integration_test/tests/v28_api.rs create mode 100644 json/src/v28/mod.rs create mode 100644 json/src/v28/rpc-api.txt create mode 100644 regtest/sha256/bitcoin-core-28.0-SHA256SUMS diff --git a/.github/workflows/rust.yaml b/.github/workflows/rust.yaml index bafbc25..aa783d6 100644 --- a/.github/workflows/rust.yaml +++ b/.github/workflows/rust.yaml @@ -178,6 +178,7 @@ jobs: matrix: feature: [ + "28_0", "27_1", "27_0", "26_2", diff --git a/client/src/client_sync/v28.rs b/client/src/client_sync/v28.rs new file mode 100644 index 0000000..0610830 --- /dev/null +++ b/client/src/client_sync/v28.rs @@ -0,0 +1,44 @@ +// SPDX-License-Identifier: CC0-1.0 + +//! A JSON-RPC client for testing against Bitcoin Core `v27`. +//! +//! We ignore option arguments unless they effect the shape of the returned JSON data. + +use bitcoin::address::{Address, NetworkChecked}; +use bitcoin::{Amount, Block, BlockHash, Txid}; + +use crate::client_sync::{handle_defaults, into_json}; +use crate::json::v28::*; + +crate::define_jsonrpc_minreq_client!("v27"); + +// == Blockchain == +crate::impl_client_v17__getblockchaininfo!(); +crate::impl_client_v17__getbestblockhash!(); +crate::impl_client_v17__getblock!(); +crate::impl_client_v17__gettxout!(); + +// == Control == +crate::impl_client_v17__stop!(); + +// == Generating == +crate::impl_client_v17__generatetoaddress!(); + +// == Network == +crate::impl_client_v17__getnetworkinfo!(); +crate::impl_client_check_expected_server_version!({ [270000, 270100] }); + +// == Rawtransactions == +crate::impl_client_v17__sendrawtransaction!(); + +// == Wallet == +crate::impl_client_v17__createwallet!(); +crate::impl_client_v22__unloadwallet!(); +crate::impl_client_v22__loadwallet!(); +crate::impl_client_v17__getbalance!(); +crate::impl_client_v19__getbalances!(); +crate::impl_client_v17__getnewaddress!(); +crate::impl_client_v17__sendtoaddress!(); +crate::impl_client_v17__gettransaction!(); + +pub use crate::client_sync::v23::AddressType; diff --git a/contrib/run_bitcoind.sh b/contrib/run_bitcoind.sh index 5d10b21..2501775 100755 --- a/contrib/run_bitcoind.sh +++ b/contrib/run_bitcoind.sh @@ -23,6 +23,7 @@ COMMAND - stop Kill all bitcoind nodes using 'pkill bitcoind'. KNOWN_VERSION + - v28 Bitcoin Core v28.0 - v27 Bitcoin Core v27.1 - v26 Bitcoin Core v26.2 - v25 Bitcoin Core v25.2 @@ -49,6 +50,7 @@ main() { case $cmd in all) + start "v28" # 28.0 start "v27" # 27.1 start "v26" # 26.2 start "v25" # 25.2 @@ -84,6 +86,11 @@ start() { local version="$1" case $version in + v28) + local version_number="28.0" + local version_id="280" + ;; + v27) local version_number="27.1" local version_id="271" diff --git a/integration_test/Cargo.toml b/integration_test/Cargo.toml index 4cebd5d..8f4ef5c 100644 --- a/integration_test/Cargo.toml +++ b/integration_test/Cargo.toml @@ -13,6 +13,7 @@ edition = "2021" [features] # Enable the same feature in `bitcoind` and the version feature here. # All minor releases (but only the latest patch release). +"28_0" = ["v28", "bitcoind/28_0"] "27_1" = ["v27", "bitcoind/27_1"] "27_0" = ["v27", "bitcoind/27_0"] "26_2" = ["v26", "bitcoind/26_2"] @@ -37,6 +38,7 @@ edition = "2021" "0_17_1" = ["v17", "bitcoind/0_17_1"] # Each minor version is tested with the same client. +"v28" = [] "v27" = [] "v26" = [] "v25" = [] diff --git a/integration_test/tests/v28_api.rs b/integration_test/tests/v28_api.rs new file mode 100644 index 0000000..40a9f75 --- /dev/null +++ b/integration_test/tests/v28_api.rs @@ -0,0 +1,57 @@ +//! Test the JSON-RPC API against `bitcoind v28.0`. + +#![cfg(feature = "v28")] + +use integration_test::*; + +// == Blockchain == +mod blockchain { + use super::*; + + impl_test_v17__getblockchaininfo!(); + impl_test_v17__getbestblockhash!(); + impl_test_v17__getblock_verbosity_0!(); + impl_test_v17__getblock_verbosity_1!(); +} + +// == Control == +mod control { + use super::*; + + impl_test_v17__stop!(); +} + +// == Generating == +mod generating { + use super::*; + + impl_test_v17__generatetoaddress!(); +} + +// == Network == +mod network { + use super::*; + + impl_test_v17__getnetworkinfo!(); +} + +// == Rawtransactions == +mod raw_transactions { + use super::*; + + impl_test_v17__sendrawtransaction!(); +} + +// == Wallet == +mod wallet { + use super::*; + + impl_test_v17__createwallet!(); + impl_test_v17__loadwallet!(); + + impl_test_v17__getnewaddress!(); + impl_test_v17__getbalance!(); + impl_test_v19__getbalances!(); + impl_test_v17__sendtoaddress!(); + impl_test_v17__gettransaction!(); +} diff --git a/json/src/lib.rs b/json/src/lib.rs index 5e1c758..776c29e 100644 --- a/json/src/lib.rs +++ b/json/src/lib.rs @@ -19,6 +19,7 @@ pub mod v24; pub mod v25; pub mod v26; pub mod v27; +pub mod v28; // JSON types that model _all_ `bitcoind` versions. pub mod model; diff --git a/json/src/v17/network.rs b/json/src/v17/network.rs index e06145e..c295125 100644 --- a/json/src/v17/network.rs +++ b/json/src/v17/network.rs @@ -155,8 +155,9 @@ impl fmt::Display for GetNetworkInfoError { match *self { RelayFee(ref e) => write_err!(f, "conversion of the `relay_fee` field failed"; e), - IncrementalFee(ref e) => - write_err!(f, "conversion of the `incremental_fee` field failed"; e), + IncrementalFee(ref e) => { + write_err!(f, "conversion of the `incremental_fee` field failed"; e) + } } } } diff --git a/json/src/v28/mod.rs b/json/src/v28/mod.rs new file mode 100644 index 0000000..691a6e6 --- /dev/null +++ b/json/src/v28/mod.rs @@ -0,0 +1,197 @@ +// SPDX-License-Identifier: CC0-1.0 + +//! Structs with standard types. +//! +//! These structs model the types returned by the JSON-RPC API and use stdlib types (or custom +//! types) and are specific to a specific to Bitcoin Core `v26`. +//! +//! **== Blockchain ==** +//! - [ ] `dumptxoutset "path"` +//! - [x] `getbestblockhash` +//! - [x] `getblock "blockhash" ( verbosity )` +//! - [x] `getblockchaininfo` +//! - [ ] `getblockcount` +//! - [ ] `getblockfilter "blockhash" ( "filtertype" )` +//! - [ ] `getblockfrompeer "blockhash" peer_id` +//! - [ ] `getblockhash height` +//! - [ ] `getblockheader "blockhash" ( verbose )` +//! - [ ] `getblockstats hash_or_height ( stats )` +//! - [ ] `getchainstates` +//! - [ ] `getchaintips` +//! - [ ] `getchaintxstats ( nblocks "blockhash" )` +//! - [ ] `getdeploymentinfo ( "blockhash" )` +//! - [ ] `getdifficulty` +//! - [ ] `getmempoolancestors "txid" ( verbose )` +//! - [ ] `getmempooldescendants "txid" ( verbose )` +//! - [ ] `getmempoolentry "txid"` +//! - [ ] `getmempoolinfo` +//! - [ ] `getrawmempool ( verbose mempool_sequence )` +//! - [ ] `gettxout "txid" n ( include_mempool )` +//! - [ ] `gettxoutproof ["txid",...] ( "blockhash" )` +//! - [ ] `gettxoutsetinfo ( "hash_type" hash_or_height use_index )` +//! - [ ] `gettxspendingprevout [{"txid":"hex","vout":n},...]` +//! - [ ] `importmempool "filepath" ( options )` +//! - [ ] `loadtxoutset "path"` +//! - [ ] `preciousblock "blockhash"` +//! - [ ] `pruneblockchain height` +//! - [ ] `savemempool` +//! - [ ] `scanblocks "action" ( [scanobjects,...] start_height stop_height "filtertype" options )` +//! - [ ] `scantxoutset "action" ( [scanobjects,...] )` +//! - [ ] `verifychain ( checklevel nblocks )` +//! - [ ] `verifytxoutproof "proof"` +//! +//! **== Control ==** +//! - [ ] `getmemoryinfo ( "mode" )` +//! - [ ] `getrpcinfo` +//! - [ ] `help ( "command" )` +//! - [ ] `logging ( ["include_category",...] ["exclude_category",...] )` +//! - [x] `stop` +//! - [ ] `uptime` +//! +//! **== Mining ==** +//! - [ ] `getblocktemplate {"mode":"str","capabilities":["str",...],"rules":["segwit","str",...],"longpollid":"str","data":"hex"}` +//! - [ ] `getmininginfo` +//! - [ ] `getnetworkhashps ( nblocks height )` +//! - [ ] `getprioritisedtransactions` +//! - [ ] `prioritisetransaction "txid" ( dummy ) fee_delta` +//! - [ ] `submitblock "hexdata" ( "dummy" )` +//! - [ ] `submitheader "hexdata"` +//! - [ ] `//!` +//! - [ ] `//! **== Network ==**` +//! - [ ] `addnode "node" "command" ( v2transport )` +//! - [ ] `clearbanned` +//! - [ ] `disconnectnode ( "address" nodeid )` +//! - [ ] `getaddednodeinfo ( "node" )` +//! - [ ] `getaddrmaninfo` +//! - [ ] `getconnectioncount` +//! - [ ] `getnettotals` +//! - [ ] `getnetworkinfo` +//! - [ ] `getnodeaddresses ( count "network" )` +//! - [ ] `getpeerinfo` +//! - [ ] `listbanned` +//! - [ ] `ping` +//! - [ ] `setban "subnet" "command" ( bantime absolute )` +//! - [ ] `setnetworkactive state` +//! +//! **== Rawtransactions ==** +//! - [ ] `analyzepsbt "psbt"` +//! - [ ] `combinepsbt ["psbt",...]` +//! - [ ] `combinerawtransaction ["hexstring",...]` +//! - [ ] `converttopsbt "hexstring" ( permitsigdata iswitness )` +//! - [ ] `createpsbt [{"txid":"hex","vout":n,"sequence":n},...] [{"address":amount,...},{"data":"hex"},...] ( locktime replaceable )` +//! - [ ] `createrawtransaction [{"txid":"hex","vout":n,"sequence":n},...] [{"address":amount,...},{"data":"hex"},...] ( locktime replaceable )` +//! - [ ] `decodepsbt "psbt"` +//! - [ ] `decoderawtransaction "hexstring" ( iswitness )` +//! - [ ] `decodescript "hexstring"` +//! - [ ] `descriptorprocesspsbt "psbt" ["",{"desc":"str","range":n or [n,n]},...] ( "sighashtype" bip32derivs finalize )` +//! - [ ] `finalizepsbt "psbt" ( extract )` +//! - [ ] `fundrawtransaction "hexstring" ( options iswitness )` +//! - [ ] `getrawtransaction "txid" ( verbosity "blockhash" )` +//! - [ ] `joinpsbts ["psbt",...]` +//! - [ ] `sendrawtransaction "hexstring" ( maxfeerate maxburnamount )` +//! - [ ] `signrawtransactionwithkey "hexstring" ["privatekey",...] ( [{"txid":"hex","vout":n,"scriptPubKey":"hex","redeemScript":"hex","witnessScript":"hex","amount":amount},...] "sighashtype" )` +//! - [ ] `submitpackage ["rawtx",...] ( maxfeerate maxburnamount )` +//! - [ ] `testmempoolaccept ["rawtx",...] ( maxfeerate )` +//! - [ ] `utxoupdatepsbt "psbt" ( ["",{"desc":"str","range":n or [n,n]},...] )` +//! +//! **== Signer ==** +//! - [ ] `enumeratesigners` +//! +//! **== Util ==** +//! - [ ] `createmultisig nrequired ["key",...] ( "address_type" )` +//! - [ ] `deriveaddresses "descriptor" ( range )` +//! - [ ] `estimatesmartfee conf_target ( "estimate_mode" )` +//! - [ ] `getdescriptorinfo "descriptor"` +//! - [ ] `getindexinfo ( "index_name" )` +//! - [ ] `signmessagewithprivkey "privkey" "message"` +//! - [ ] `validateaddress "address"` +//! - [ ] `verifymessage "address" "signature" "message"` +//! +//! **== Wallet ==** +//! - [ ] `abandontransaction "txid"` +//! - [ ] `abortrescan` +//! - [ ] `addmultisigaddress nrequired ["key",...] ( "label" "address_type" )` +//! - [ ] `backupwallet "destination"` +//! - [ ] `bumpfee "txid" ( options )` +//! - [x] `createwallet "wallet_name" ( disable_private_keys blank "passphrase" avoid_reuse descriptors load_on_startup external_signer )` +//! - [ ] `createwalletdescriptor "type" ( {"internal":bool,"hdkey":"str",...} )` +//! - [ ] `dumpprivkey "address"` +//! - [ ] `dumpwallet "filename"` +//! - [ ] `encryptwallet "passphrase"` +//! - [ ] `getaddressesbylabel "label"` +//! - [ ] `getaddressinfo "address"` +//! - [x] `getbalance ( "dummy" minconf include_watchonly avoid_reuse )` +//! - [x] `getbalances` +//! - [ ] `gethdkeys ( {"active_only":bool,"private":bool,...} )` +//! - [x] `getnewaddress ( "label" "address_type" )` +//! - [ ] `getrawchangeaddress ( "address_type" )` +//! - [ ] `getreceivedbyaddress "address" ( minconf include_immature_coinbase )` +//! - [ ] `getreceivedbylabel "label" ( minconf include_immature_coinbase )` +//! - [x] `gettransaction "txid" ( include_watchonly verbose )` +//! - [ ] `getunconfirmedbalance` +//! - [ ] `getwalletinfo` +//! - [ ] `importaddress "address" ( "label" rescan p2sh )` +//! - [ ] `importdescriptors requests` +//! - [ ] `importmulti requests ( options )` +//! - [ ] `importprivkey "privkey" ( "label" rescan )` +//! - [ ] `importprunedfunds "rawtransaction" "txoutproof"` +//! - [ ] `importpubkey "pubkey" ( "label" rescan )` +//! - [ ] `importwallet "filename"` +//! - [ ] `keypoolrefill ( newsize )` +//! - [ ] `listaddressgroupings` +//! - [ ] `listdescriptors ( private )` +//! - [ ] `listlabels ( "purpose" )` +//! - [ ] `listlockunspent` +//! - [ ] `listreceivedbyaddress ( minconf include_empty include_watchonly "address_filter" include_immature_coinbase )` +//! - [ ] `listreceivedbylabel ( minconf include_empty include_watchonly include_immature_coinbase )` +//! - [ ] `listsinceblock ( "blockhash" target_confirmations include_watchonly include_removed include_change "label" )` +//! - [ ] `listtransactions ( "label" count skip include_watchonly )` +//! - [ ] `listunspent ( minconf maxconf ["address",...] include_unsafe query_options )` +//! - [ ] `listwalletdir` +//! - [ ] `listwallets` +//! - [x] `loadwallet "filename" ( load_on_startup )` +//! - [ ] `lockunspent unlock ( [{"txid":"hex","vout":n},...] persistent )` +//! - [ ] `migratewallet ( "wallet_name" "passphrase" )` +//! - [ ] `newkeypool` +//! - [ ] `psbtbumpfee "txid" ( options )` +//! - [ ] `removeprunedfunds "txid"` +//! - [ ] `rescanblockchain ( start_height stop_height )` +//! - [ ] `restorewallet "wallet_name" "backup_file" ( load_on_startup )` +//! - [ ] `send [{"address":amount,...},{"data":"hex"},...] ( conf_target "estimate_mode" fee_rate options )` +//! - [ ] `sendall ["address",{"address":amount,...},...] ( conf_target "estimate_mode" fee_rate options )` +//! - [ ] `sendmany ( "" ) {"address":amount,...} ( minconf "comment" ["address",...] replaceable conf_target "estimate_mode" fee_rate verbose )` +//! - [x] `sendtoaddress "address" amount ( "comment" "comment_to" subtractfeefromamount replaceable conf_target "estimate_mode" avoid_reuse fee_rate verbose )` +//! - [ ] `sethdseed ( newkeypool "seed" )` +//! - [ ] `setlabel "address" "label"` +//! - [ ] `settxfee amount` +//! - [ ] `setwalletflag "flag" ( value )` +//! - [ ] `signmessage "address" "message"` +//! - [ ] `signrawtransactionwithwallet "hexstring" ( [{"txid":"hex","vout":n,"scriptPubKey":"hex","redeemScript":"hex","witnessScript":"hex","amount":amount},...] "sighashtype" )` +//! - [ ] `simulaterawtransaction ( ["rawtx",...] {"include_watchonly":bool,...} )` +//! - [ ] `unloadwallet ( "wallet_name" load_on_startup )` +//! - [ ] `upgradewallet ( version )` +//! - [ ] `walletcreatefundedpsbt ( [{"txid":"hex","vout":n,"sequence":n,"weight":n},...] ) [{"address":amount,...},{"data":"hex"},...] ( locktime options bip32derivs )` +//! - [ ] `walletdisplayaddress "address"` +//! - [ ] `walletlock` +//! - [ ] `walletpassphrase "passphrase" timeout` +//! - [ ] `walletpassphrasechange "oldpassphrase" "newpassphrase"` +//! - [ ] `walletprocesspsbt "psbt" ( sign "sighashtype" bip32derivs finalize )` +//! +//! **== Zmq ==** +//! - [ ] `getzmqnotifications` + +#[doc(inline)] +pub use crate::{ + v17::{ + GenerateToAddress, GetBalance, GetBestBlockHash, GetBlockVerbosityOne, + GetBlockVerbosityZero, GetNetworkInfo, GetNetworkInfoAddress, GetNetworkInfoNetwork, + GetNewAddress, GetTransaction, GetTransactionDetail, GetTransactionDetailCategory, + GetTxOut, SendRawTransaction, + }, + v19::{ + Bip9SoftforkInfo, Bip9SoftforkStatistics, Bip9SoftforkStatus, GetBalances, GetBalancesMine, + GetBalancesWatchOnly, GetBlockchainInfo, Softfork, SoftforkType, + }, + v22::{SendToAddress, UnloadWallet}, + v25::{CreateWallet, LoadWallet}, +}; diff --git a/json/src/v28/rpc-api.txt b/json/src/v28/rpc-api.txt new file mode 100644 index 0000000..4c3cad9 --- /dev/null +++ b/json/src/v28/rpc-api.txt @@ -0,0 +1,174 @@ +== Blockchain == +dumptxoutset "path" +getbestblockhash +getblock "blockhash" ( verbosity ) +getblockchaininfo +getblockcount +getblockfilter "blockhash" ( "filtertype" ) +getblockfrompeer "blockhash" peer_id +getblockhash height +getblockheader "blockhash" ( verbose ) +getblockstats hash_or_height ( stats ) +getchainstates +getchaintips +getchaintxstats ( nblocks "blockhash" ) +getdeploymentinfo ( "blockhash" ) +getdifficulty +getmempoolancestors "txid" ( verbose ) +getmempooldescendants "txid" ( verbose ) +getmempoolentry "txid" +getmempoolinfo +getrawmempool ( verbose mempool_sequence ) +gettxout "txid" n ( include_mempool ) +gettxoutproof ["txid",...] ( "blockhash" ) +gettxoutsetinfo ( "hash_type" hash_or_height use_index ) +gettxspendingprevout [{"txid":"hex","vout":n},...] +importmempool "filepath" ( options ) +loadtxoutset "path" +preciousblock "blockhash" +pruneblockchain height +savemempool +scanblocks "action" ( [scanobjects,...] start_height stop_height "filtertype" options ) +scantxoutset "action" ( [scanobjects,...] ) +verifychain ( checklevel nblocks ) +verifytxoutproof "proof" + +== Control == +getmemoryinfo ( "mode" ) +getrpcinfo +help ( "command" ) +logging ( ["include_category",...] ["exclude_category",...] ) +stop +uptime + +== Mining == +getblocktemplate {"mode":"str","capabilities":["str",...],"rules":["segwit","str",...],"longpollid":"str","data":"hex"} +getmininginfo +getnetworkhashps ( nblocks height ) +getprioritisedtransactions +prioritisetransaction "txid" ( dummy ) fee_delta +submitblock "hexdata" ( "dummy" ) +submitheader "hexdata" + +== Network == +addnode "node" "command" ( v2transport ) +clearbanned +disconnectnode ( "address" nodeid ) +getaddednodeinfo ( "node" ) +getaddrmaninfo +getconnectioncount +getnettotals +getnetworkinfo +getnodeaddresses ( count "network" ) +getpeerinfo +listbanned +ping +setban "subnet" "command" ( bantime absolute ) +setnetworkactive state + +== Rawtransactions == +analyzepsbt "psbt" +combinepsbt ["psbt",...] +combinerawtransaction ["hexstring",...] +converttopsbt "hexstring" ( permitsigdata iswitness ) +createpsbt [{"txid":"hex","vout":n,"sequence":n},...] [{"address":amount,...},{"data":"hex"},...] ( locktime replaceable ) +createrawtransaction [{"txid":"hex","vout":n,"sequence":n},...] [{"address":amount,...},{"data":"hex"},...] ( locktime replaceable ) +decodepsbt "psbt" +decoderawtransaction "hexstring" ( iswitness ) +decodescript "hexstring" +descriptorprocesspsbt "psbt" ["",{"desc":"str","range":n or [n,n]},...] ( "sighashtype" bip32derivs finalize ) +finalizepsbt "psbt" ( extract ) +fundrawtransaction "hexstring" ( options iswitness ) +getrawtransaction "txid" ( verbosity "blockhash" ) +joinpsbts ["psbt",...] +sendrawtransaction "hexstring" ( maxfeerate maxburnamount ) +signrawtransactionwithkey "hexstring" ["privatekey",...] ( [{"txid":"hex","vout":n,"scriptPubKey":"hex","redeemScript":"hex","witnessScript":"hex","amount":amount},...] "sighashtype" ) +submitpackage ["rawtx",...] ( maxfeerate maxburnamount ) +testmempoolaccept ["rawtx",...] ( maxfeerate ) +utxoupdatepsbt "psbt" ( ["",{"desc":"str","range":n or [n,n]},...] ) + +== Signer == +enumeratesigners + +== Util == +createmultisig nrequired ["key",...] ( "address_type" ) +deriveaddresses "descriptor" ( range ) +estimatesmartfee conf_target ( "estimate_mode" ) +getdescriptorinfo "descriptor" +getindexinfo ( "index_name" ) +signmessagewithprivkey "privkey" "message" +validateaddress "address" +verifymessage "address" "signature" "message" + +== Wallet == +abandontransaction "txid" +abortrescan +addmultisigaddress nrequired ["key",...] ( "label" "address_type" ) +backupwallet "destination" +bumpfee "txid" ( options ) +createwallet "wallet_name" ( disable_private_keys blank "passphrase" avoid_reuse descriptors load_on_startup external_signer ) +createwalletdescriptor "type" ( {"internal":bool,"hdkey":"str",...} ) +dumpprivkey "address" +dumpwallet "filename" +encryptwallet "passphrase" +getaddressesbylabel "label" +getaddressinfo "address" +getbalance ( "dummy" minconf include_watchonly avoid_reuse ) +getbalances +gethdkeys ( {"active_only":bool,"private":bool,...} ) +getnewaddress ( "label" "address_type" ) +getrawchangeaddress ( "address_type" ) +getreceivedbyaddress "address" ( minconf include_immature_coinbase ) +getreceivedbylabel "label" ( minconf include_immature_coinbase ) +gettransaction "txid" ( include_watchonly verbose ) +getunconfirmedbalance +getwalletinfo +importaddress "address" ( "label" rescan p2sh ) +importdescriptors requests +importmulti requests ( options ) +importprivkey "privkey" ( "label" rescan ) +importprunedfunds "rawtransaction" "txoutproof" +importpubkey "pubkey" ( "label" rescan ) +importwallet "filename" +keypoolrefill ( newsize ) +listaddressgroupings +listdescriptors ( private ) +listlabels ( "purpose" ) +listlockunspent +listreceivedbyaddress ( minconf include_empty include_watchonly "address_filter" include_immature_coinbase ) +listreceivedbylabel ( minconf include_empty include_watchonly include_immature_coinbase ) +listsinceblock ( "blockhash" target_confirmations include_watchonly include_removed include_change "label" ) +listtransactions ( "label" count skip include_watchonly ) +listunspent ( minconf maxconf ["address",...] include_unsafe query_options ) +listwalletdir +listwallets +loadwallet "filename" ( load_on_startup ) +lockunspent unlock ( [{"txid":"hex","vout":n},...] persistent ) +migratewallet ( "wallet_name" "passphrase" ) +newkeypool +psbtbumpfee "txid" ( options ) +removeprunedfunds "txid" +rescanblockchain ( start_height stop_height ) +restorewallet "wallet_name" "backup_file" ( load_on_startup ) +send [{"address":amount,...},{"data":"hex"},...] ( conf_target "estimate_mode" fee_rate options ) +sendall ["address",{"address":amount,...},...] ( conf_target "estimate_mode" fee_rate options ) +sendmany ( "" ) {"address":amount,...} ( minconf "comment" ["address",...] replaceable conf_target "estimate_mode" fee_rate verbose ) +sendtoaddress "address" amount ( "comment" "comment_to" subtractfeefromamount replaceable conf_target "estimate_mode" avoid_reuse fee_rate verbose ) +sethdseed ( newkeypool "seed" ) +setlabel "address" "label" +settxfee amount +setwalletflag "flag" ( value ) +signmessage "address" "message" +signrawtransactionwithwallet "hexstring" ( [{"txid":"hex","vout":n,"scriptPubKey":"hex","redeemScript":"hex","witnessScript":"hex","amount":amount},...] "sighashtype" ) +simulaterawtransaction ( ["rawtx",...] {"include_watchonly":bool,...} ) +unloadwallet ( "wallet_name" load_on_startup ) +upgradewallet ( version ) +walletcreatefundedpsbt ( [{"txid":"hex","vout":n,"sequence":n,"weight":n},...] ) [{"address":amount,...},{"data":"hex"},...] ( locktime options bip32derivs ) +walletdisplayaddress "address" +walletlock +walletpassphrase "passphrase" timeout +walletpassphrasechange "oldpassphrase" "newpassphrase" +walletprocesspsbt "psbt" ( sign "sighashtype" bip32derivs finalize ) + +== Zmq == +getzmqnotifications diff --git a/regtest/Cargo.toml b/regtest/Cargo.toml index 7560dd1..61f33f0 100644 --- a/regtest/Cargo.toml +++ b/regtest/Cargo.toml @@ -35,13 +35,14 @@ anyhow = "1.0.66" # Please note, in this crate the version features are mutally exclusive. # -# - `cargo test --all-features` is the same as `cargo test --features=v27_1` -# - `cargo test --no-default-features` uses `v27_1` also. +# - `cargo test --all-features` is the same as `cargo test --features=v28_0` +# - `cargo test --no-default-features` uses `v28_0` also. [features] # download is not supposed to be used directly only through selecting one of the version feature "download" = ["bitcoin_hashes", "flate2", "tar", "minreq", "zip"] # We support all minor releases (but only the latest patch release). +"28_0" = ["download", "27_1"] "27_1" = ["download", "27_0"] "27_0" = ["download", "26_2"] "26_2" = ["download", "26_1"] diff --git a/regtest/sha256/bitcoin-core-28.0-SHA256SUMS b/regtest/sha256/bitcoin-core-28.0-SHA256SUMS new file mode 100644 index 0000000..89bc82a --- /dev/null +++ b/regtest/sha256/bitcoin-core-28.0-SHA256SUMS @@ -0,0 +1 @@ +TODO: TBA diff --git a/regtest/src/client_versions.rs b/regtest/src/client_versions.rs index 82c40be..b17af3c 100644 --- a/regtest/src/client_versions.rs +++ b/regtest/src/client_versions.rs @@ -6,7 +6,11 @@ /// up to handle such oddity. /// -#[cfg(feature = "27_1")] +#[cfg(feature = "28_0")] +#[allow(unused_imports)] // Not all users need the json types. +pub use bitcoind_json_rpc_client::{client_sync::v28::{Client, AddressType}, json::v28 as json}; + +#[cfg(all(feature = "27_1", not(feature = "28_0")))] #[allow(unused_imports)] // Not all users need the json types. pub use bitcoind_json_rpc_client::{client_sync::v27::{Client, AddressType}, json::v27 as json}; @@ -91,6 +95,6 @@ pub use bitcoind_json_rpc_client::{client_sync::v18::{Client, AddressType}, json pub use bitcoind_json_rpc_client::{client_sync::v17::{Client, AddressType}, json::v17 as json}; // To make --no-default-features work we have to re-export a the types, use most recent version same as we do for all features. -#[cfg(all(not(feature = "27_1"), not(feature = "27_0"), not(feature = "26_2"), not(feature = "26_1"), not(feature = "26_0"), not(feature = "25_2"), not(feature = "25_1"), not(feature = "25_0"), not(feature = "24_2"),not(feature = "24_1"), not(feature = "24_0_1"), not(feature = "23_2"), not(feature = "23_1"), not(feature = "23_0"), not(feature = "22_1"), not(feature = "22_0"), not(feature = "0_21_2"), not(feature = "0_20_2"), not(feature = "0_19_1"), not(feature = "0_18_1"), not(feature = "0_17_1")))] +#[cfg(all(not(feature = "28_0"), not(feature = "27_1"), not(feature = "27_0"), not(feature = "26_2"), not(feature = "26_1"), not(feature = "26_0"), not(feature = "25_2"), not(feature = "25_1"), not(feature = "25_0"), not(feature = "24_2"),not(feature = "24_1"), not(feature = "24_0_1"), not(feature = "23_2"), not(feature = "23_1"), not(feature = "23_0"), not(feature = "22_1"), not(feature = "22_0"), not(feature = "0_21_2"), not(feature = "0_20_2"), not(feature = "0_19_1"), not(feature = "0_18_1"), not(feature = "0_17_1")))] #[allow(unused_imports)] // Not all users need the json types. -pub use bitcoind_json_rpc_client::{client_sync::v27::{Client, AddressType}, json::v27 as json}; +pub use bitcoind_json_rpc_client::{client_sync::v28::{Client, AddressType}, json::v28 as json}; diff --git a/regtest/src/versions.rs b/regtest/src/versions.rs index 33cedfd..ad5d894 100644 --- a/regtest/src/versions.rs +++ b/regtest/src/versions.rs @@ -1,4 +1,7 @@ -#[cfg(feature = "27_1")] +#[cfg(feature = "28_0")] +pub const VERSION: &str = "28.0"; + +#[cfg(all(feature = "27_1", not(feature = "28_0")))] pub const VERSION: &str = "27.1"; #[cfg(all(feature = "27_0", not(feature = "27_1")))] @@ -62,6 +65,6 @@ pub const VERSION: &str = "0.18.1"; pub const VERSION: &str = "0.17.1"; // To make --no-default-features work we have to enable some feature, use most recent version same as for default. -#[cfg(all(not(feature = "27_1"), not(feature = "27_0"), not(feature = "26_2"), not(feature = "26_1"), not(feature = "26_0"), not(feature = "25_2"), not(feature = "25_1"), not(feature = "25_0"), not(feature = "24_2"),not(feature = "24_1"), not(feature = "24_0_1"), not(feature = "23_2"), not(feature = "23_1"), not(feature = "23_0"), not(feature = "22_1"), not(feature = "22_0"), not(feature = "0_21_2"), not(feature = "0_20_2"), not(feature = "0_19_1"), not(feature = "0_18_1"), not(feature = "0_17_1")))] +#[cfg(all(not(feature = "28_0"), not(feature = "27_1"), not(feature = "27_0"), not(feature = "26_2"), not(feature = "26_1"), not(feature = "26_0"), not(feature = "25_2"), not(feature = "25_1"), not(feature = "25_0"), not(feature = "24_2"),not(feature = "24_1"), not(feature = "24_0_1"), not(feature = "23_2"), not(feature = "23_1"), not(feature = "23_0"), not(feature = "22_1"), not(feature = "22_0"), not(feature = "0_21_2"), not(feature = "0_20_2"), not(feature = "0_19_1"), not(feature = "0_18_1"), not(feature = "0_17_1")))] #[allow(dead_code)] // for --no-default-features -pub const VERSION: &str = "27.1"; +pub const VERSION: &str = "28.0";