bitcoin/src/test/fuzz
Andrew Chow 22139f6e83
Merge bitcoin/bitcoin#25796: rpc: add descriptorprocesspsbt rpc
1bce12acd3 test: add test for `descriptorprocesspsbt` RPC (ishaanam)
fb2a3a70e8 rpc: add descriptorprocesspsbt rpc (ishaanam)

Pull request description:

  This PR implements an RPC called `descriptorprocesspsbt`. This RPC is based off of `walletprocesspsbt`, but instead of interacting with the wallet to update, sign and finalize a psbt, it instead accepts an array of output descriptors and uses that information along with information from the mempool, txindex, and the utxo set to do so. `utxoupdatepsbt` also updates a psbt in this manner, but doesn't sign or finalize it. Because of this overlap, a helper function that is added in this PR is called by both `utxoupdatepsbt` and `descriptorprocesspsbt`. Whether or not the helper function signs a psbt is dictated by if the HidingSigningProvider passed to it contains any private information. There is also a test added in this PR for this new RPC that uses p2wsh, p2wpkh, and legacy outputs.
  Edit: see https://github.com/bitcoin/bitcoin/pull/25796#issuecomment-1228830963

ACKs for top commit:
  achow101:
    re-ACK 1bce12acd3
  instagibbs:
    reACK 1bce12acd3

Tree-SHA512: e1d0334739943e71f2ee68b4db7637ebe725da62e7aa4be071f71c7196d2a5970a31ece96d91e372d34454cde8509e95ab0eebd2c8edb94f7d5a781a84f8fc5d
2023-05-22 11:28:11 -04:00
..
util scripted-diff: Bump copyright headers 2022-12-24 23:49:50 +00:00
addition_overflow.cpp scripted-diff: Bump copyright headers 2022-12-24 23:49:50 +00:00
addrman.cpp refactor: Replace string chain name constants with ChainTypes 2023-05-09 15:49:14 +02:00
asmap.cpp [netgroupman] Add GetMappedAS() and GetGroup() 2022-04-20 14:35:52 +01:00
asmap_direct.cpp scripted-diff: Bump copyright headers 2021-12-30 19:36:57 +02:00
autofile.cpp scripted-diff: Bump copyright headers 2022-12-24 23:49:50 +00:00
banman.cpp move-only: Extract common/args and common/config.cpp from util/system 2023-04-19 10:48:30 +02:00
base_encode_decode.cpp Merge bitcoin/bitcoin#26691: Update secp256k1 subtree to libsecp256k1 version 0.2.0 2023-01-13 09:40:57 +00:00
bech32.cpp scripted-diff: Bump copyright headers 2021-12-30 19:36:57 +02:00
bitdeque.cpp fuzz: Avoid timeout in bitdeque fuzz target 2022-09-05 15:38:33 +02:00
block.cpp refactor: Replace string chain name constants with ChainTypes 2023-05-09 15:49:14 +02:00
block_header.cpp
blockfilter.cpp scripted-diff: Bump copyright headers 2021-12-30 19:36:57 +02:00
bloom_filter.cpp fuzz: replace every fuzzer-controlled loop with a LIMITED_WHILE loop 2021-11-12 19:51:55 +00:00
buffered_file.cpp util: improve streams.h:FindByte() performance 2023-05-05 06:03:17 -06:00
chain.cpp scripted-diff: Bump copyright headers 2022-12-24 23:49:50 +00:00
checkqueue.cpp refactor: Use move semantics in CCheckQueue::Loop 2023-03-21 13:04:21 +00:00
coins_view.cpp scripted-diff: Remove unused chainparamsbase includes 2023-05-09 15:49:19 +02:00
coinscache_sim.cpp Exercise non-DIRTY spent coins in caches in fuzz test 2023-02-03 10:33:31 -05:00
connman.cpp scripted-diff: Remove unused chainparamsbase includes 2023-05-09 15:49:19 +02:00
crypto.cpp fuzz: Use LIMITED_WHILE instead of limit_max_ops 2021-08-21 19:25:33 +02:00
crypto_aes256.cpp scripted-diff: Bump copyright headers 2021-12-30 19:36:57 +02:00
crypto_aes256cbc.cpp scripted-diff: Bump copyright headers 2021-12-30 19:36:57 +02:00
crypto_chacha20.cpp Only support 32-byte keys in ChaCha20{,Aligned} 2023-01-30 18:12:21 -05:00
crypto_chacha20_poly1305_aead.cpp Move AdditionOverflow to util, Add CheckedAdd with unit tests 2021-12-17 10:46:39 +01:00
crypto_common.cpp
crypto_diff_fuzz_chacha20.cpp Inline ChaCha20 32-byte specific constants 2023-01-30 18:12:21 -05:00
crypto_hkdf_hmac_sha256_l32.cpp scripted-diff: Bump copyright headers 2021-12-30 19:36:57 +02:00
crypto_poly1305.cpp
cuckoocache.cpp scripted-diff: Bump copyright headers 2021-12-30 19:36:57 +02:00
decode_tx.cpp
descriptor_parse.cpp refactor: Replace string chain name constants with ChainTypes 2023-05-09 15:49:14 +02:00
deserialize.cpp move-only: Extract common/args and common/config.cpp from util/system 2023-04-19 10:48:30 +02:00
eval_script.cpp Adapt to libsecp256k1 API changes 2022-12-13 15:08:24 -05:00
fee_rate.cpp scripted-diff: Bump copyright headers 2021-12-30 19:36:57 +02:00
fees.cpp scripted-diff: Bump copyright headers 2021-12-30 19:36:57 +02:00
flatfile.cpp Refactor: Remove unused FlatFilePos::SetNull 2023-03-21 13:54:11 +01:00
float.cpp scripted-diff: Bump copyright headers 2021-12-30 19:36:57 +02:00
fuzz.cpp fuzz: Print error message when FUZZ is missing 2023-05-22 10:02:29 +02:00
fuzz.h fuzz: Use LIMITED_WHILE instead of limit_max_ops 2021-08-21 19:25:33 +02:00
FuzzedDataProvider.h
golomb_rice.cpp scripted-diff: Bump copyright headers 2022-12-24 23:49:50 +00:00
headerssync.cpp refactor: Replace string chain name constants with ChainTypes 2023-05-09 15:49:14 +02:00
hex.cpp Merge bitcoin/bitcoin#26691: Update secp256k1 subtree to libsecp256k1 version 0.2.0 2023-01-13 09:40:57 +00:00
http_request.cpp Merge bitcoin/bitcoin#25619: net: avoid overriding non-virtual ToString() in CService and use better naming 2023-02-17 13:34:40 -05:00
i2p.cpp move-only: Extract common/args and common/config.cpp from util/system 2023-04-19 10:48:30 +02:00
integer.cpp refactor: Replace string chain name constants with ChainTypes 2023-05-09 15:49:14 +02:00
key.cpp scripted-diff: Remove unused chainparamsbase includes 2023-05-09 15:49:19 +02:00
key_io.cpp refactor: Replace string chain name constants with ChainTypes 2023-05-09 15:49:14 +02:00
kitchen_sink.cpp make ParseOutputType return a std::optional<OutputType> 2021-08-04 19:20:32 +08:00
load_external_block_file.cpp refactor: Make mapBlocksUnknownParent local, and rename it 2022-07-18 12:06:14 -06:00
locale.cpp scripted-diff: Bump copyright headers 2021-12-30 19:36:57 +02:00
merkleblock.cpp fuzz: replace every fuzzer-controlled loop with a LIMITED_WHILE loop 2021-11-12 19:51:55 +00:00
message.cpp refactor: Replace string chain name constants with ChainTypes 2023-05-09 15:49:14 +02:00
mini_miner.cpp [fuzz] Add MiniMiner target + diff fuzz against BlockAssembler 2023-04-06 15:15:39 -04:00
miniscript.cpp ci: use clang-16 in tidy task 2023-04-05 11:43:42 +01:00
minisketch.cpp Add src/node/* code to node:: namespace 2022-01-06 22:14:16 -05:00
muhash.cpp fuzz: Cleanup muhash fuzz target 2021-09-22 10:39:08 +02:00
multiplication_overflow.cpp scripted-diff: Bump copyright headers 2021-12-30 19:36:57 +02:00
net.cpp scripted-diff: Remove unused chainparamsbase includes 2023-05-09 15:49:19 +02:00
net_permissions.cpp scripted-diff: Bump copyright headers 2022-12-24 23:49:50 +00:00
netaddress.cpp Merge bitcoin/bitcoin#25619: net: avoid overriding non-virtual ToString() in CService and use better naming 2023-02-17 13:34:40 -05:00
netbase_dns_lookup.cpp scripted-diff: Bump copyright headers 2022-12-24 23:49:50 +00:00
node_eviction.cpp scripted-diff: Bump copyright headers 2022-12-24 23:49:50 +00:00
p2p_transport_serialization.cpp refactor: Replace string chain name constants with ChainTypes 2023-05-09 15:49:14 +02:00
parse_hd_keypath.cpp Switch hardened derivation marker to h in descriptors 2023-04-04 18:33:08 +02:00
parse_numbers.cpp scripted-diff: Bump copyright headers 2021-12-30 19:36:57 +02:00
parse_script.cpp
parse_univalue.cpp refactor: Replace string chain name constants with ChainTypes 2023-05-09 15:49:14 +02:00
partially_downloaded_block.cpp [fuzz] Assert that omitting missing transactions always fails block reconstruction 2023-01-23 17:29:41 +01:00
policy_estimator.cpp scripted-diff: Bump copyright headers 2022-12-24 23:49:50 +00:00
policy_estimator_io.cpp scripted-diff: Bump copyright headers 2022-12-24 23:49:50 +00:00
poolresource.cpp Add PoolResource fuzzer 2023-03-23 19:38:38 +01:00
pow.cpp refactor: Replace string chain name constants with ChainTypes 2023-05-09 15:49:14 +02:00
prevector.cpp Use DataStream where possible 2023-01-26 10:44:05 +01:00
primitives_transaction.cpp
process_message.cpp refactor: Replace string chain name constants with ChainTypes 2023-05-09 15:49:14 +02:00
process_messages.cpp refactor: Replace string chain name constants with ChainTypes 2023-05-09 15:49:14 +02:00
protocol.cpp
psbt.cpp Merge bitcoin/bitcoin#26691: Update secp256k1 subtree to libsecp256k1 version 0.2.0 2023-01-13 09:40:57 +00:00
random.cpp
rbf.cpp scripted-diff: Bump copyright headers 2022-12-24 23:49:50 +00:00
rolling_bloom_filter.cpp scripted-diff: Move bloom to src/common 2021-10-05 11:10:37 +02:00
rpc.cpp Merge bitcoin/bitcoin#25796: rpc: add descriptorprocesspsbt rpc 2023-05-22 11:28:11 -04:00
script.cpp refactor: Replace string chain name constants with ChainTypes 2023-05-09 15:49:14 +02:00
script_assets_test_minimizer.cpp Merge bitcoin/bitcoin#26691: Update secp256k1 subtree to libsecp256k1 version 0.2.0 2023-01-13 09:40:57 +00:00
script_bitcoin_consensus.cpp
script_descriptor_cache.cpp scripted-diff: Bump copyright headers 2021-12-30 19:36:57 +02:00
script_flags.cpp Adapt to libsecp256k1 API changes 2022-12-13 15:08:24 -05:00
script_format.cpp refactor: Replace string chain name constants with ChainTypes 2023-05-09 15:49:14 +02:00
script_interpreter.cpp
script_ops.cpp fuzz: replace every fuzzer-controlled loop with a LIMITED_WHILE loop 2021-11-12 19:51:55 +00:00
script_sigcache.cpp scripted-diff: Remove unused chainparamsbase includes 2023-05-09 15:49:19 +02:00
script_sign.cpp scripted-diff: Remove unused chainparamsbase includes 2023-05-09 15:49:19 +02:00
scriptnum_ops.cpp fuzz: replace every fuzzer-controlled loop with a LIMITED_WHILE loop 2021-11-12 19:51:55 +00:00
secp256k1_ec_seckey_import_export_der.cpp
secp256k1_ecdsa_signature_parse_der_lax.cpp Adapt to libsecp256k1 API changes 2022-12-13 15:08:24 -05:00
signature_checker.cpp Merge bitcoin/bitcoin#26691: Update secp256k1 subtree to libsecp256k1 version 0.2.0 2023-01-13 09:40:57 +00:00
signet.cpp refactor: Replace string chain name constants with ChainTypes 2023-05-09 15:49:14 +02:00
socks5.cpp net: Use steady clock in InterruptibleRecv 2023-04-04 12:33:49 +02:00
span.cpp
spanparsing.cpp
string.cpp move-only: Extract common/args and common/config.cpp from util/system 2023-04-19 10:48:30 +02:00
strprintf.cpp fuzz: Remove strprintf test cases that are known to fail 2021-05-09 10:25:21 +02:00
system.cpp refactor: Replace string chain name constants with ChainTypes 2023-05-09 15:49:14 +02:00
timedata.cpp scripted-diff: Bump copyright headers 2021-12-30 19:36:57 +02:00
torcontrol.cpp fuzz: replace every fuzzer-controlled loop with a LIMITED_WHILE loop 2021-11-12 19:51:55 +00:00
transaction.cpp refactor: Replace string chain name constants with ChainTypes 2023-05-09 15:49:14 +02:00
tx_in.cpp Use DataStream where possible 2023-01-26 10:44:05 +01:00
tx_out.cpp Use DataStream where possible 2023-01-26 10:44:05 +01:00
tx_pool.cpp test: Add util to mine invalid blocks 2023-05-02 17:17:06 +02:00
txorphan.cpp Merge bitcoin/bitcoin#26551: p2p: Track orphans by who provided them 2023-01-26 10:36:18 +00:00
txrequest.cpp scripted-diff: Bump copyright headers 2021-12-30 19:36:57 +02:00
util.cpp scripted-diff: Bump copyright headers 2022-12-24 23:49:50 +00:00
util.h scripted-diff: Remove unused chainparamsbase includes 2023-05-09 15:49:19 +02:00
utxo_snapshot.cpp refactor: Replace string chain name constants with ChainTypes 2023-05-09 15:49:14 +02:00
utxo_total_supply.cpp refactor: Replace string chain name constants with ChainTypes 2023-05-09 15:49:14 +02:00
validation_load_mempool.cpp scripted-diff: Remove unused chainparamsbase includes 2023-05-09 15:49:19 +02:00
versionbits.cpp refactor: Replace string chain name constants with ChainTypes 2023-05-09 15:49:14 +02:00