elements/src/test/fuzz
fanquake 7ef2d4ee4d
Merge bitcoin/bitcoin#28244: Break up script/standard.{h/cpp}
91d924ede1 Rename script/standard.{cpp/h} to script/solver.{cpp/h} (Andrew Chow)
bacdb2e208 Clean up script/standard.{h/cpp} includes (Andrew Chow)
f3c9078b4c Clean up things that include script/standard.h (Andrew Chow)
8bbe257bac MOVEONLY: Move datacarrier defaults to policy.h (Andrew Chow)
7a172c76d2 Move CTxDestination to its own file (Andrew Chow)
145f36ec81 Move Taproot{SpendData/Builder} to signingprovider.{h/cpp} (Andrew Chow)
86ea8bed54 Move CScriptID to script.{h/cpp} (Andrew Chow)
b81ebff0d9 Remove ScriptHash from CScriptID constructor (Andrew Chow)
cba69dda3d Move MANDATORY_SCRIPT_VERIFY_FLAGS from script/standard.h to policy/policy.h (Anthony Towns)

Pull request description:

  Some future work needs to touch things in script/standard.{h/cpp}, however it is unclear if it is safe to do so as they are included in several different places that could effect standardness and consensus. It contains a mix of policy parameters, consensus parameters, and utilities only used by the wallet. This PR breaks up the various components and renames the files to clearly separate everything.

  * `CTxDestination` is moved to a new file `src/addresstype.{cpp/h}`
  * `TaprootSpendData` and `TaprootBuilder` (and their utility functions and structs) are moved to `SigningProvider` as these are used only during signing.
  * `CScriptID` is moved to `script/script.h` to be next to `CScript`.
  * `MANDATORY_SCRIPT_VERIFY_FLAGS` is moved to `interpreter.h`
  * The parameters `DEFAULT_ACCEPT_DATACARRIER` and `MAX_OP_RETURN_RELAY` are moved to `policy.h`
  * `standard.{cpp/h}` is renamed to `solver.{cpp/h}` since that's all that's left in the file after the above moves

ACKs for top commit:
  Sjors:
    ACK 91d924ede1
  ajtowns:
    ACK 91d924ede1
  MarcoFalke:
    ACK 91d924ede1 😇
  murchandamus:
    ACK 91d924ede1
  darosior:
    Code review ACK 91d924ede1.
  theStack:
    Code-review ACK 91d924ede1

Tree-SHA512: d347439890c652081f6a303d99b2bde6c371c96e7f4127c5db469764a17d39981f19884679ba883e28b733fde6142351dd8288c7bc61c379b7eefe7fa7acca1a
2023-08-17 12:54:16 +01:00
..
util mempool_entry: add mempool entry sequence number 2023-08-03 13:42:45 +10:00
addition_overflow.cpp scripted-diff: Bump copyright headers 2022-12-24 23:49:50 +00:00
addrman.cpp Merge bitcoin/bitcoin#27918: fuzz: addrman, avoid ConsumeDeserializable when possible 2023-08-03 17:32:46 +01: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 scripted-diff: Use new FUZZ_TARGET macro everywhere 2023-07-13 20:37:14 +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
bip324.cpp refactor: add missing headers for BIP324 ciphersuite 2023-08-15 07:30:48 +05:30
bitdeque.cpp scripted-diff: Use new FUZZ_TARGET macro everywhere 2023-07-13 20:37:14 +02:00
block.cpp scripted-diff: Use new FUZZ_TARGET macro everywhere 2023-07-13 20:37:14 +02:00
block_header.cpp fuzz: Link all targets once 2020-12-10 07:15:42 +01:00
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 fuzz: coins_view: remove an incorrect assertion 2023-08-11 18:11:07 +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 fuzz: use ConnmanTestMsg in connman 2023-07-22 13:42:17 -03:00
crypto.cpp refactor: use Span for SipHash::Write 2023-07-17 13:27:46 +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 crypto: add FSChaCha20, a rekeying wrapper around ChaCha20 2023-07-26 16:55:05 -04:00
crypto_common.cpp fuzz: Link all targets once 2020-12-10 07:15:42 +01:00
crypto_diff_fuzz_chacha20.cpp crypto: Implement RFC8439-compatible variant of ChaCha20 2023-07-07 17:16:27 -04:00
crypto_hkdf_hmac_sha256_l32.cpp scripted-diff: Bump copyright headers 2021-12-30 19:36:57 +02:00
crypto_poly1305.cpp Switch all callers from poly1305_auth to Poly1305 class 2023-07-12 22:43:55 -04:00
cuckoocache.cpp scripted-diff: Bump copyright headers 2021-12-30 19:36:57 +02:00
decode_tx.cpp scripted-diff: Bump copyright headers 2020-12-31 09:45:41 +01:00
descriptor_parse.cpp script: update flake8 to 6.1.0 2023-07-31 12:14:06 -06:00
deserialize.cpp scripted-diff: Use new FUZZ_TARGET macro everywhere 2023-07-13 20:37:14 +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: Accept options in FUZZ_TARGET macro 2023-07-13 20:37:05 +02:00
fuzz.h scripted-diff: Use new FUZZ_TARGET macro everywhere 2023-07-13 20:37:14 +02:00
FuzzedDataProvider.h fuzz: Bump FuzzedDataProvider.h 2023-07-17 09:39:52 +02:00
golomb_rice.cpp refactor: use Span for SipHash::Write 2023-07-17 13:27:46 +02:00
headerssync.cpp scripted-diff: Use new FUZZ_TARGET macro everywhere 2023-07-13 20:37: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 scripted-diff: Use new FUZZ_TARGET macro everywhere 2023-07-13 20:37:14 +02:00
integer.cpp Clean up things that include script/standard.h 2023-08-14 17:38:27 -04:00
key.cpp Rename script/standard.{cpp/h} to script/solver.{cpp/h} 2023-08-14 17:39:49 -04:00
key_io.cpp scripted-diff: Use new FUZZ_TARGET macro everywhere 2023-07-13 20:37: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 Merge bitcoin/bitcoin#27746: Rework validation logic for assumeutxo 2023-07-31 16:18:20 -04: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 scripted-diff: Use new FUZZ_TARGET macro everywhere 2023-07-13 20:37:14 +02:00
mini_miner.cpp scripted-diff: Use new FUZZ_TARGET macro everywhere 2023-07-13 20:37:14 +02:00
miniscript.cpp Merge bitcoin/bitcoin#27997: Descriptors: rule out unspendable miniscript descriptors 2023-07-17 19:16:09 -04: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: Use new FUZZ_TARGET macro everywhere 2023-07-13 20:37:14 +02:00
net_permissions.cpp scripted-diff: Bump copyright headers 2022-12-24 23:49:50 +00:00
netaddress.cpp net, refactor: pass reference for peer address in GetReachabilityFrom 2023-06-05 11:02:47 -04:00
netbase_dns_lookup.cpp p2p, refactor: return std::optional<CNetAddr> in LookupHost 2023-05-26 13:41:07 -03:00
node_eviction.cpp scripted-diff: Bump copyright headers 2022-12-24 23:49:50 +00:00
p2p_transport_serialization.cpp scripted-diff: Use new FUZZ_TARGET macro everywhere 2023-07-13 20:37: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 scripted-diff: Bump copyright headers 2020-12-31 09:45:41 +01:00
parse_univalue.cpp refactor: Revert addition of univalue sighash string check 2023-07-27 09:36:05 +02:00
partially_downloaded_block.cpp scripted-diff: Use new FUZZ_TARGET macro everywhere 2023-07-13 20:37:14 +02:00
policy_estimator.cpp scripted-diff: Use new FUZZ_TARGET macro everywhere 2023-07-13 20:37:14 +02:00
policy_estimator_io.cpp scripted-diff: Use new FUZZ_TARGET macro everywhere 2023-07-13 20:37:14 +02:00
poolresource.cpp Add PoolResource fuzzer 2023-03-23 19:38:38 +01:00
pow.cpp scripted-diff: Use new FUZZ_TARGET macro everywhere 2023-07-13 20:37:14 +02:00
prevector.cpp Use DataStream where possible 2023-01-26 10:44:05 +01:00
primitives_transaction.cpp fuzz: Link all targets once 2020-12-10 07:15:42 +01:00
process_message.cpp scripted-diff: Use new FUZZ_TARGET macro everywhere 2023-07-13 20:37:14 +02:00
process_messages.cpp scripted-diff: Use new FUZZ_TARGET macro everywhere 2023-07-13 20:37:14 +02:00
protocol.cpp fuzz: Link all targets once 2020-12-10 07:15:42 +01:00
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 fuzz: Link all targets once 2020-12-10 07:15:42 +01:00
rbf.cpp scripted-diff: Use new FUZZ_TARGET macro everywhere 2023-07-13 20:37:14 +02:00
rolling_bloom_filter.cpp scripted-diff: Move bloom to src/common 2021-10-05 11:10:37 +02:00
rpc.cpp Add importmempool RPC 2023-08-07 11:33:34 +02:00
script.cpp Rename script/standard.{cpp/h} to script/solver.{cpp/h} 2023-08-14 17:39:49 -04:00
script_assets_test_minimizer.cpp fuzz: Accept options in FUZZ_TARGET macro 2023-07-13 20:37:05 +02:00
script_bitcoin_consensus.cpp fuzz: Link all targets once 2020-12-10 07:15:42 +01:00
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 scripted-diff: Use new FUZZ_TARGET macro everywhere 2023-07-13 20:37:14 +02:00
script_interpreter.cpp fuzz: Link all targets once 2020-12-10 07:15:42 +01:00
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: Use new FUZZ_TARGET macro everywhere 2023-07-13 20:37:14 +02:00
script_sign.cpp scripted-diff: Use new FUZZ_TARGET macro everywhere 2023-07-13 20:37:14 +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 fuzz: Link all targets once 2020-12-10 07:15:42 +01:00
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 scripted-diff: Use new FUZZ_TARGET macro everywhere 2023-07-13 20:37:14 +02:00
socks5.cpp scripted-diff: Use new FUZZ_TARGET macro everywhere 2023-07-13 20:37:14 +02:00
span.cpp fuzz: Link all targets once 2020-12-10 07:15:42 +01:00
spanparsing.cpp scripted-diff: Bump copyright headers 2020-12-31 09:45:41 +01:00
string.cpp Merge bitcoin/bitcoin#27576: kernel: Remove args, settings, chainparams, chainparamsbase from kernel library 2023-06-09 14:58:49 -04:00
strprintf.cpp fuzz: Remove strprintf test cases that are known to fail 2021-05-09 10:25:21 +02:00
system.cpp scripted-diff: Use new FUZZ_TARGET macro everywhere 2023-07-13 20:37:14 +02:00
timedata.cpp scripted-diff: Bump copyright headers 2021-12-30 19:36:57 +02:00
torcontrol.cpp scripted-diff: Use new FUZZ_TARGET macro everywhere 2023-07-13 20:37:14 +02:00
transaction.cpp scripted-diff: Use new FUZZ_TARGET macro everywhere 2023-07-13 20:37: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 scripted-diff: Use new FUZZ_TARGET macro everywhere 2023-07-13 20:37:14 +02:00
txorphan.cpp scripted-diff: Use new FUZZ_TARGET macro everywhere 2023-07-13 20:37:14 +02: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 Clean up things that include script/standard.h 2023-08-14 17:38:27 -04:00
utxo_snapshot.cpp scripted-diff: Use new FUZZ_TARGET macro everywhere 2023-07-13 20:37:14 +02:00
utxo_total_supply.cpp [fuzz] Only check duplicate coinbase script when block was valid 2023-06-03 15:37:11 +02:00
validation_load_mempool.cpp refactor: Add and use kernel::ImportMempoolOptions 2023-08-07 11:32:34 +02:00
versionbits.cpp scripted-diff: Use new FUZZ_TARGET macro everywhere 2023-07-13 20:37:14 +02:00