Skip to content

Commit e13e862

Browse files
authored
Merge pull request rust-bitcoin#64 from tcharding/02-13-verify
Finish off updating docs and verify infrastructure
2 parents 74a6b44 + e32e31f commit e13e862

File tree

16 files changed

+1905
-560
lines changed

16 files changed

+1905
-560
lines changed

contrib/update-lock-files.sh

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -6,6 +6,6 @@ set -euo pipefail
66

77
for file in Cargo-minimal.lock Cargo-recent.lock; do
88
cp --force "$file" Cargo.lock
9-
cargo check
9+
cargo check --all-features
1010
cp --force Cargo.lock "$file"
1111
done

integration_test/tests/wallet.rs

Lines changed: 3 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -44,6 +44,9 @@ pub fn bump_fee() {
4444
pub fn create_wallet() {
4545
// Implicitly tests `createwallet` because we create the default wallet.
4646
let _ = Node::new_with_default_wallet();
47+
48+
// TODO: We are not currently testing the `warnings` field. This field was changed from an
49+
// optional `String` to an optional vector of strings in v25. Needs testing.
4750
}
4851

4952
#[test]

node/Cargo.toml

Lines changed: 6 additions & 8 deletions
Original file line numberDiff line numberDiff line change
@@ -31,15 +31,13 @@ tar = { version = "0.4", optional = true }
3131
minreq = { version = "2.9.1", default-features = false, features = ["https"], optional = true }
3232
zip = { version = "0.6", optional = true }
3333

34-
# Please note, in this crate the version features are mutally exclusive.
34+
# Please note, it is expected that a single version feature will be enabled however if you enable
35+
# multiple the highest version number will take precedence.
3536
#
36-
# - `cargo test --features=27_2,download` to download Bitcoin Core binary v27.
37-
# - `cargo test --all-features` is the same as `cargo test --features=download,v28_0`
38-
# - `cargo test --features=28_0` to use `bitcoind`.
39-
#
40-
# If you do not enable `download` then you must configure the bitcoind binary by `bitcoind` in your
41-
# path or using `BITCOIND_EXE=/path/to/bitcoind`. Note also that the feature enabled should match
42-
# the version from `bitcoind --version`.
37+
# - `cargo test --features=27_2,download` to download Bitcoin Core binary `v27.2`.
38+
# - `cargo test --features=28_0` to use `bitcoind` from the host environment.
39+
# - `cargo test --all-features`: Same as using latest version e.g., `cargo test --features=20_0,download`
40+
# - `cargo test`: Does not work, you MUST enable a version feature.
4341
[features]
4442
download = ["anyhow", "bitcoin_hashes", "flate2", "tar", "minreq", "zip"]
4543

node/src/lib.rs

Lines changed: 1 addition & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -577,8 +577,7 @@ mod test {
577577
use tempfile::TempDir;
578578

579579
use super::*;
580-
use crate::P2P;
581-
use crate::{exe_path, get_available_port, Conf, Node, LOCAL_IP};
580+
use crate::{exe_path, get_available_port, Conf, Node, LOCAL_IP, P2P};
582581

583582
#[test]
584583
fn test_local_ip() {

types/src/v26/mod.rs

Lines changed: 265 additions & 182 deletions
Large diffs are not rendered by default.

types/src/v27/mod.rs

Lines changed: 265 additions & 182 deletions
Large diffs are not rendered by default.

types/src/v28/mod.rs

Lines changed: 267 additions & 184 deletions
Large diffs are not rendered by default.

verify/rpc-api-v26.txt

Lines changed: 172 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,172 @@
1+
== Blockchain ==
2+
dumptxoutset "path"
3+
getbestblockhash
4+
getblock "blockhash" ( verbosity )
5+
getblockchaininfo
6+
getblockcount
7+
getblockfilter "blockhash" ( "filtertype" )
8+
getblockfrompeer "blockhash" peer_id
9+
getblockhash height
10+
getblockheader "blockhash" ( verbose )
11+
getblockstats hash_or_height ( stats )
12+
getchainstates
13+
getchaintips
14+
getchaintxstats ( nblocks "blockhash" )
15+
getdeploymentinfo ( "blockhash" )
16+
getdifficulty
17+
getmempoolancestors "txid" ( verbose )
18+
getmempooldescendants "txid" ( verbose )
19+
getmempoolentry "txid"
20+
getmempoolinfo
21+
getrawmempool ( verbose mempool_sequence )
22+
gettxout "txid" n ( include_mempool )
23+
gettxoutproof ["txid",...] ( "blockhash" )
24+
gettxoutsetinfo ( "hash_type" hash_or_height use_index )
25+
gettxspendingprevout [{"txid":"hex","vout":n},...]
26+
importmempool "filepath" ( options )
27+
loadtxoutset "path"
28+
preciousblock "blockhash"
29+
pruneblockchain height
30+
savemempool
31+
scanblocks "action" ( [scanobjects,...] start_height stop_height "filtertype" options )
32+
scantxoutset "action" ( [scanobjects,...] )
33+
verifychain ( checklevel nblocks )
34+
verifytxoutproof "proof"
35+
36+
== Control ==
37+
getmemoryinfo ( "mode" )
38+
getrpcinfo
39+
help ( "command" )
40+
logging ( ["include_category",...] ["exclude_category",...] )
41+
stop
42+
uptime
43+
44+
== Mining ==
45+
getblocktemplate {"mode":"str","capabilities":["str",...],"rules":["segwit","str",...],"longpollid":"str","data":"hex"}
46+
getmininginfo
47+
getnetworkhashps ( nblocks height )
48+
getprioritisedtransactions
49+
prioritisetransaction "txid" ( dummy ) fee_delta
50+
submitblock "hexdata" ( "dummy" )
51+
submitheader "hexdata"
52+
53+
== Network ==
54+
addnode "node" "command" ( v2transport )
55+
clearbanned
56+
disconnectnode ( "address" nodeid )
57+
getaddednodeinfo ( "node" )
58+
getaddrmaninfo
59+
getconnectioncount
60+
getnettotals
61+
getnetworkinfo
62+
getnodeaddresses ( count "network" )
63+
getpeerinfo
64+
listbanned
65+
ping
66+
setban "subnet" "command" ( bantime absolute )
67+
setnetworkactive state
68+
69+
== Rawtransactions ==
70+
analyzepsbt "psbt"
71+
combinepsbt ["psbt",...]
72+
combinerawtransaction ["hexstring",...]
73+
converttopsbt "hexstring" ( permitsigdata iswitness )
74+
createpsbt [{"txid":"hex","vout":n,"sequence":n},...] [{"address":amount,...},{"data":"hex"},...] ( locktime replaceable )
75+
createrawtransaction [{"txid":"hex","vout":n,"sequence":n},...] [{"address":amount,...},{"data":"hex"},...] ( locktime replaceable )
76+
decodepsbt "psbt"
77+
decoderawtransaction "hexstring" ( iswitness )
78+
decodescript "hexstring"
79+
descriptorprocesspsbt "psbt" ["",{"desc":"str","range":n or [n,n]},...] ( "sighashtype" bip32derivs finalize )
80+
finalizepsbt "psbt" ( extract )
81+
fundrawtransaction "hexstring" ( options iswitness )
82+
getrawtransaction "txid" ( verbosity "blockhash" )
83+
joinpsbts ["psbt",...]
84+
sendrawtransaction "hexstring" ( maxfeerate maxburnamount )
85+
signrawtransactionwithkey "hexstring" ["privatekey",...] ( [{"txid":"hex","vout":n,"scriptPubKey":"hex","redeemScript":"hex","witnessScript":"hex","amount":amount},...] "sighashtype" )
86+
submitpackage ["rawtx",...]
87+
testmempoolaccept ["rawtx",...] ( maxfeerate )
88+
utxoupdatepsbt "psbt" ( ["",{"desc":"str","range":n or [n,n]},...] )
89+
90+
== Signer ==
91+
enumeratesigners
92+
93+
== Util ==
94+
createmultisig nrequired ["key",...] ( "address_type" )
95+
deriveaddresses "descriptor" ( range )
96+
estimatesmartfee conf_target ( "estimate_mode" )
97+
getdescriptorinfo "descriptor"
98+
getindexinfo ( "index_name" )
99+
signmessagewithprivkey "privkey" "message"
100+
validateaddress "address"
101+
verifymessage "address" "signature" "message"
102+
103+
== Wallet ==
104+
abandontransaction "txid"
105+
abortrescan
106+
addmultisigaddress nrequired ["key",...] ( "label" "address_type" )
107+
backupwallet "destination"
108+
bumpfee "txid" ( options )
109+
createwallet "wallet_name" ( disable_private_keys blank "passphrase" avoid_reuse descriptors load_on_startup external_signer )
110+
dumpprivkey "address"
111+
dumpwallet "filename"
112+
encryptwallet "passphrase"
113+
getaddressesbylabel "label"
114+
getaddressinfo "address"
115+
getbalance ( "dummy" minconf include_watchonly avoid_reuse )
116+
getbalances
117+
getnewaddress ( "label" "address_type" )
118+
getrawchangeaddress ( "address_type" )
119+
getreceivedbyaddress "address" ( minconf include_immature_coinbase )
120+
getreceivedbylabel "label" ( minconf include_immature_coinbase )
121+
gettransaction "txid" ( include_watchonly verbose )
122+
getunconfirmedbalance
123+
getwalletinfo
124+
importaddress "address" ( "label" rescan p2sh )
125+
importdescriptors requests
126+
importmulti requests ( options )
127+
importprivkey "privkey" ( "label" rescan )
128+
importprunedfunds "rawtransaction" "txoutproof"
129+
importpubkey "pubkey" ( "label" rescan )
130+
importwallet "filename"
131+
keypoolrefill ( newsize )
132+
listaddressgroupings
133+
listdescriptors ( private )
134+
listlabels ( "purpose" )
135+
listlockunspent
136+
listreceivedbyaddress ( minconf include_empty include_watchonly "address_filter" include_immature_coinbase )
137+
listreceivedbylabel ( minconf include_empty include_watchonly include_immature_coinbase )
138+
listsinceblock ( "blockhash" target_confirmations include_watchonly include_removed include_change "label" )
139+
listtransactions ( "label" count skip include_watchonly )
140+
listunspent ( minconf maxconf ["address",...] include_unsafe query_options )
141+
listwalletdir
142+
listwallets
143+
loadwallet "filename" ( load_on_startup )
144+
lockunspent unlock ( [{"txid":"hex","vout":n},...] persistent )
145+
migratewallet ( "wallet_name" "passphrase" )
146+
newkeypool
147+
psbtbumpfee "txid" ( options )
148+
removeprunedfunds "txid"
149+
rescanblockchain ( start_height stop_height )
150+
restorewallet "wallet_name" "backup_file" ( load_on_startup )
151+
send [{"address":amount,...},{"data":"hex"},...] ( conf_target "estimate_mode" fee_rate options )
152+
sendall ["address",{"address":amount,...},...] ( conf_target "estimate_mode" fee_rate options )
153+
sendmany ( "" ) {"address":amount,...} ( minconf "comment" ["address",...] replaceable conf_target "estimate_mode" fee_rate verbose )
154+
sendtoaddress "address" amount ( "comment" "comment_to" subtractfeefromamount replaceable conf_target "estimate_mode" avoid_reuse fee_rate verbose )
155+
sethdseed ( newkeypool "seed" )
156+
setlabel "address" "label"
157+
settxfee amount
158+
setwalletflag "flag" ( value )
159+
signmessage "address" "message"
160+
signrawtransactionwithwallet "hexstring" ( [{"txid":"hex","vout":n,"scriptPubKey":"hex","redeemScript":"hex","witnessScript":"hex","amount":amount},...] "sighashtype" )
161+
simulaterawtransaction ( ["rawtx",...] {"include_watchonly":bool,...} )
162+
unloadwallet ( "wallet_name" load_on_startup )
163+
upgradewallet ( version )
164+
walletcreatefundedpsbt ( [{"txid":"hex","vout":n,"sequence":n,"weight":n},...] ) [{"address":amount,...},{"data":"hex"},...] ( locktime options bip32derivs )
165+
walletdisplayaddress "address"
166+
walletlock
167+
walletpassphrase "passphrase" timeout
168+
walletpassphrasechange "oldpassphrase" "newpassphrase"
169+
walletprocesspsbt "psbt" ( sign "sighashtype" bip32derivs finalize )
170+
171+
== Zmq ==
172+
getzmqnotifications

verify/rpc-api-v27.txt

Lines changed: 172 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,172 @@
1+
== Blockchain ==
2+
dumptxoutset "path"
3+
getbestblockhash
4+
getblock "blockhash" ( verbosity )
5+
getblockchaininfo
6+
getblockcount
7+
getblockfilter "blockhash" ( "filtertype" )
8+
getblockfrompeer "blockhash" peer_id
9+
getblockhash height
10+
getblockheader "blockhash" ( verbose )
11+
getblockstats hash_or_height ( stats )
12+
getchainstates
13+
getchaintips
14+
getchaintxstats ( nblocks "blockhash" )
15+
getdeploymentinfo ( "blockhash" )
16+
getdifficulty
17+
getmempoolancestors "txid" ( verbose )
18+
getmempooldescendants "txid" ( verbose )
19+
getmempoolentry "txid"
20+
getmempoolinfo
21+
getrawmempool ( verbose mempool_sequence )
22+
gettxout "txid" n ( include_mempool )
23+
gettxoutproof ["txid",...] ( "blockhash" )
24+
gettxoutsetinfo ( "hash_type" hash_or_height use_index )
25+
gettxspendingprevout [{"txid":"hex","vout":n},...]
26+
importmempool "filepath" ( options )
27+
loadtxoutset "path"
28+
preciousblock "blockhash"
29+
pruneblockchain height
30+
savemempool
31+
scanblocks "action" ( [scanobjects,...] start_height stop_height "filtertype" options )
32+
scantxoutset "action" ( [scanobjects,...] )
33+
verifychain ( checklevel nblocks )
34+
verifytxoutproof "proof"
35+
36+
== Control ==
37+
getmemoryinfo ( "mode" )
38+
getrpcinfo
39+
help ( "command" )
40+
logging ( ["include_category",...] ["exclude_category",...] )
41+
stop
42+
uptime
43+
44+
== Mining ==
45+
getblocktemplate {"mode":"str","capabilities":["str",...],"rules":["segwit","str",...],"longpollid":"str","data":"hex"}
46+
getmininginfo
47+
getnetworkhashps ( nblocks height )
48+
getprioritisedtransactions
49+
prioritisetransaction "txid" ( dummy ) fee_delta
50+
submitblock "hexdata" ( "dummy" )
51+
submitheader "hexdata"
52+
53+
== Network ==
54+
addnode "node" "command" ( v2transport )
55+
clearbanned
56+
disconnectnode ( "address" nodeid )
57+
getaddednodeinfo ( "node" )
58+
getaddrmaninfo
59+
getconnectioncount
60+
getnettotals
61+
getnetworkinfo
62+
getnodeaddresses ( count "network" )
63+
getpeerinfo
64+
listbanned
65+
ping
66+
setban "subnet" "command" ( bantime absolute )
67+
setnetworkactive state
68+
69+
== Rawtransactions ==
70+
analyzepsbt "psbt"
71+
combinepsbt ["psbt",...]
72+
combinerawtransaction ["hexstring",...]
73+
converttopsbt "hexstring" ( permitsigdata iswitness )
74+
createpsbt [{"txid":"hex","vout":n,"sequence":n},...] [{"address":amount,...},{"data":"hex"},...] ( locktime replaceable )
75+
createrawtransaction [{"txid":"hex","vout":n,"sequence":n},...] [{"address":amount,...},{"data":"hex"},...] ( locktime replaceable )
76+
decodepsbt "psbt"
77+
decoderawtransaction "hexstring" ( iswitness )
78+
decodescript "hexstring"
79+
descriptorprocesspsbt "psbt" ["",{"desc":"str","range":n or [n,n]},...] ( "sighashtype" bip32derivs finalize )
80+
finalizepsbt "psbt" ( extract )
81+
fundrawtransaction "hexstring" ( options iswitness )
82+
getrawtransaction "txid" ( verbosity "blockhash" )
83+
joinpsbts ["psbt",...]
84+
sendrawtransaction "hexstring" ( maxfeerate maxburnamount )
85+
signrawtransactionwithkey "hexstring" ["privatekey",...] ( [{"txid":"hex","vout":n,"scriptPubKey":"hex","redeemScript":"hex","witnessScript":"hex","amount":amount},...] "sighashtype" )
86+
submitpackage ["rawtx",...]
87+
testmempoolaccept ["rawtx",...] ( maxfeerate )
88+
utxoupdatepsbt "psbt" ( ["",{"desc":"str","range":n or [n,n]},...] )
89+
90+
== Signer ==
91+
enumeratesigners
92+
93+
== Util ==
94+
createmultisig nrequired ["key",...] ( "address_type" )
95+
deriveaddresses "descriptor" ( range )
96+
estimatesmartfee conf_target ( "estimate_mode" )
97+
getdescriptorinfo "descriptor"
98+
getindexinfo ( "index_name" )
99+
signmessagewithprivkey "privkey" "message"
100+
validateaddress "address"
101+
verifymessage "address" "signature" "message"
102+
103+
== Wallet ==
104+
abandontransaction "txid"
105+
abortrescan
106+
addmultisigaddress nrequired ["key",...] ( "label" "address_type" )
107+
backupwallet "destination"
108+
bumpfee "txid" ( options )
109+
createwallet "wallet_name" ( disable_private_keys blank "passphrase" avoid_reuse descriptors load_on_startup external_signer )
110+
dumpprivkey "address"
111+
dumpwallet "filename"
112+
encryptwallet "passphrase"
113+
getaddressesbylabel "label"
114+
getaddressinfo "address"
115+
getbalance ( "dummy" minconf include_watchonly avoid_reuse )
116+
getbalances
117+
getnewaddress ( "label" "address_type" )
118+
getrawchangeaddress ( "address_type" )
119+
getreceivedbyaddress "address" ( minconf include_immature_coinbase )
120+
getreceivedbylabel "label" ( minconf include_immature_coinbase )
121+
gettransaction "txid" ( include_watchonly verbose )
122+
getunconfirmedbalance
123+
getwalletinfo
124+
importaddress "address" ( "label" rescan p2sh )
125+
importdescriptors requests
126+
importmulti requests ( options )
127+
importprivkey "privkey" ( "label" rescan )
128+
importprunedfunds "rawtransaction" "txoutproof"
129+
importpubkey "pubkey" ( "label" rescan )
130+
importwallet "filename"
131+
keypoolrefill ( newsize )
132+
listaddressgroupings
133+
listdescriptors ( private )
134+
listlabels ( "purpose" )
135+
listlockunspent
136+
listreceivedbyaddress ( minconf include_empty include_watchonly "address_filter" include_immature_coinbase )
137+
listreceivedbylabel ( minconf include_empty include_watchonly include_immature_coinbase )
138+
listsinceblock ( "blockhash" target_confirmations include_watchonly include_removed include_change "label" )
139+
listtransactions ( "label" count skip include_watchonly )
140+
listunspent ( minconf maxconf ["address",...] include_unsafe query_options )
141+
listwalletdir
142+
listwallets
143+
loadwallet "filename" ( load_on_startup )
144+
lockunspent unlock ( [{"txid":"hex","vout":n},...] persistent )
145+
migratewallet ( "wallet_name" "passphrase" )
146+
newkeypool
147+
psbtbumpfee "txid" ( options )
148+
removeprunedfunds "txid"
149+
rescanblockchain ( start_height stop_height )
150+
restorewallet "wallet_name" "backup_file" ( load_on_startup )
151+
send [{"address":amount,...},{"data":"hex"},...] ( conf_target "estimate_mode" fee_rate options )
152+
sendall ["address",{"address":amount,...},...] ( conf_target "estimate_mode" fee_rate options )
153+
sendmany ( "" ) {"address":amount,...} ( minconf "comment" ["address",...] replaceable conf_target "estimate_mode" fee_rate verbose )
154+
sendtoaddress "address" amount ( "comment" "comment_to" subtractfeefromamount replaceable conf_target "estimate_mode" avoid_reuse fee_rate verbose )
155+
sethdseed ( newkeypool "seed" )
156+
setlabel "address" "label"
157+
settxfee amount
158+
setwalletflag "flag" ( value )
159+
signmessage "address" "message"
160+
signrawtransactionwithwallet "hexstring" ( [{"txid":"hex","vout":n,"scriptPubKey":"hex","redeemScript":"hex","witnessScript":"hex","amount":amount},...] "sighashtype" )
161+
simulaterawtransaction ( ["rawtx",...] {"include_watchonly":bool,...} )
162+
unloadwallet ( "wallet_name" load_on_startup )
163+
upgradewallet ( version )
164+
walletcreatefundedpsbt ( [{"txid":"hex","vout":n,"sequence":n,"weight":n},...] ) [{"address":amount,...},{"data":"hex"},...] ( locktime options bip32derivs )
165+
walletdisplayaddress "address"
166+
walletlock
167+
walletpassphrase "passphrase" timeout
168+
walletpassphrasechange "oldpassphrase" "newpassphrase"
169+
walletprocesspsbt "psbt" ( sign "sighashtype" bip32derivs finalize )
170+
171+
== Zmq ==
172+
getzmqnotifications

0 commit comments

Comments
 (0)