0
0
Fork 0
mirror of https://github.com/bitcoin/bitcoin.git synced 2025-02-24 12:41:41 -05:00
bitcoin-bitcoin-core/src/test/fuzz
glozow 2aff9a36c3
Merge bitcoin/bitcoin#30352: policy: Add PayToAnchor(P2A), OP_1 <0x4e73> as a standard output script for spending
75648cea5a test: add P2A ProduceSignature coverage (Greg Sanders)
7998ce6b20 Add release note for P2A output feature (Greg Sanders)
71c9b02a04 test: add P2A coverage for decodescript (Greg Sanders)
1349e9ec15 test: Add anchor mempool acceptance test (Greg Sanders)
9d89209937 policy: stop 3rd party wtxid malleability of anchor spend (Greg Sanders)
b60aaf8b23 policy: make anchor spend standard (Greg Sanders)
455fca86cf policy: Add OP_1 <0x4e73> as a standard output type (Greg Sanders)

Pull request description:

  This is a sub-feature taken out of the original proposal for ephemeral anchors #30239

  This PR makes *spending* of `OP_1 <0x4e73>` (i.e. `bc1pfeessrawgf`) standard. Creation of this output type is already standard.

  Any future witness output types are considered relay-standard to create, but not to spend. This preserves upgrade hooks, such as a completely new output type for a softfork such as BIP341.  It also gives us a bit of room to use a new output type for policy uses.

  This particular sized witness program has no other known use-cases (https://bitcoin.stackexchange.com/a/110664/17078), s it affords insufficient cryptographic security for a secure commitment to data, such as a script or a public key. This makes this type of output "keyless", or unauthenticated.

  As a witness program, the `scriptSig` of the input MUST be blank, by BIP141. This helps ensure txid-stability of the spending transaction, which may be required for smart contracting wallets. If we do not use segwit, a miner can simply insert an `OP_NOP` in the `scriptSig` without effecting the result of program execution.

  An additional relay restriction is to disallow non-empty witness data, which an adversary may use to penalize the "honest" transactor when RBF'ing the transaction due to the incremental fee requirement of RBF rules.

  The intended use-case for this output type is to "anchor" the transaction with a spending child to bring exogenous CPFP fees into the transaction package, encouraging the inclusion of the package in a block. The minimal size of creation and spending of this output makes it an attractive contrast to outputs like `p2sh(OP_TRUE)` and `p2wsh(OP_TRUE)` which
  are significantly larger in vbyte terms.

  Combined with TRUC transactions which limits the size of child transactions significantly, this is an attractive option for presigned transactions that need to be fee-bumped after the fact.

ACKs for top commit:
  sdaftuar:
    utACK 75648cea5a
  theStack:
    re-ACK 75648cea5a
  ismaelsadeeq:
    re-ACK 75648cea5a via [diff](e7ce6dc070..75648cea5a)
  glozow:
    ACK 75648cea5a
  tdb3:
    ACK 75648cea5a

Tree-SHA512: d529de23d20857e6cdb40fa611d0446b49989eaafed06c28280e8fd1897f1ed8d89a4eabbec1bbf8df3d319910066c3dbbba5a70a87ff0b2967d5205db32ad1e
2024-08-02 15:49:44 +01:00
..
util Fix lint-spelling warnings 2024-07-22 13:59:42 +02:00
addition_overflow.cpp build, msvc: Build fuzz.exe binary 2024-04-18 10:27:25 +01:00
addrman.cpp random: replace construct/assign with explicit Reseed() 2024-07-01 12:39:57 -04:00
asmap.cpp
asmap_direct.cpp
autofile.cpp fuzz: AutoFile with XOR 2023-11-14 17:41:54 +01:00
banman.cpp fuzz: extend ConsumeNetAddr() to return I2P and CJDNS addresses 2024-01-23 11:49:32 +01:00
base_encode_decode.cpp util: Move util/string.h functions to util namespace 2024-05-16 10:16:08 -05:00
bech32.cpp
bip324.cpp random: convert XoRoShiRo128PlusPlus into full RNG 2024-07-01 10:26:46 -04:00
bitdeque.cpp fuzz: Avoid timeout in bitdeque 2023-12-06 15:44:38 +01:00
bitset.cpp random: convert XoRoShiRo128PlusPlus into full RNG 2024-07-01 10:26:46 -04:00
block.cpp fuzz: Drop unused version from fuzz input format 2023-11-30 11:27:21 +01:00
block_header.cpp
blockfilter.cpp
bloom_filter.cpp Use ParamsWrapper for witness serialization 2023-11-14 08:45:30 +10:00
buffered_file.cpp streams: Base BufferedFile on AutoFile instead of CAutoFile 2023-11-18 00:15:22 +10:00
chain.cpp chain: Rename HaveTxsDownloaded to HaveNumChainTxs 2023-10-06 19:43:32 +02:00
checkqueue.cpp refactor: Make CCheckQueue constructor start worker threads 2023-10-03 10:52:15 +01:00
cluster_linearize.cpp clusterlin: permit passing in existing linearization to Linearize 2024-07-25 10:16:40 -04:00
coins_view.cpp fuzz: Use BasicTestingSetup for coins_view target 2024-07-19 13:37:35 +02:00
coinscache_sim.cpp Use Txid in COutpoint 2023-11-21 13:15:44 +00:00
connman.cpp fuzz: fix connman initialization 2024-01-09 15:15:36 -03:00
crypto.cpp refactor: use Span for SipHash::Write 2023-07-17 13:27:46 +02:00
crypto_aes256.cpp
crypto_aes256cbc.cpp
crypto_chacha20.cpp random: convert XoRoShiRo128PlusPlus into full RNG 2024-07-01 10:26:46 -04:00
crypto_chacha20poly1305.cpp Add fuzz test for FSChaCha20Poly1305 2024-07-15 18:26:45 +05:30
crypto_common.cpp
crypto_diff_fuzz_chacha20.cpp crypto: require key on ChaCha20 initialization 2023-08-17 15:31:27 -04:00
crypto_hkdf_hmac_sha256_l32.cpp
crypto_poly1305.cpp fuzz: support std::byte in Consume{Fixed,Variable}LengthByteVector 2023-08-17 15:31:56 -04:00
cuckoocache.cpp
decode_tx.cpp
descriptor_parse.cpp fuzz: limit the number of nested wrappers in descriptors 2024-07-14 17:47:40 +02:00
deserialize.cpp assumeutxo: Add network magic ctor param to SnapshotMetadata 2024-05-24 18:44:02 +02:00
eval_script.cpp Adapt to libsecp256k1 API changes 2022-12-13 15:08:24 -05:00
fee_rate.cpp
feefrac.cpp Add fuzz test for FeeFrac 2024-03-18 10:32:00 -04:00
feeratediagram.cpp Avoid explicitly computing diagram; compare based on chunks 2024-04-22 09:36:36 -04:00
fees.cpp util: move fees.h and error.h to common/messages.h 2024-05-16 10:16:08 -05:00
flatfile.cpp Refactor: Remove unused FlatFilePos::SetNull 2023-03-21 13:54:11 +01:00
float.cpp Remove unused version.h include 2023-11-30 11:28:19 +01:00
fuzz.cpp Merge bitcoin/bitcoin#30263: build: Bump clang minimum supported version to 16 2024-07-08 16:20:17 +01:00
fuzz.h fuzz: Use std::span in FuzzBufferType 2024-06-12 15:21:31 +02:00
FuzzedDataProvider.h doc: fix typos 2023-11-07 10:21:51 +09:00
golomb_rice.cpp refactor: SpanReader without nVersion 2023-11-28 12:42:07 +01:00
headerssync.cpp Rename CalculateHeadersWork to CalculateClaimedHeadersWork 2024-03-05 10:01:24 -05:00
hex.cpp fuzz: increase FromHex() coverage 2024-07-31 16:47:38 +01:00
http_request.cpp refactor: Remove call to ShutdownRequested from HTTPRequest 2023-12-04 15:39:15 -04:00
i2p.cpp netbase: extend CreateSock() to support creating arbitrary sockets 2024-06-14 14:23:50 +02:00
integer.cpp util: Move util/string.h functions to util namespace 2024-05-16 10:16:08 -05:00
key.cpp refactor: remove unused CKey::Negate method 2024-06-03 16:59:43 +02:00
key_io.cpp test: Use ECC_Context helper in bench and fuzz tests 2024-05-09 15:56:04 +02:00
kitchen_sink.cpp util: add TransactionError includes and namespace declarations 2024-05-16 10:16:08 -05:00
load_external_block_file.cpp blockstorage: switch from CAutoFile to AutoFile 2023-11-18 03:01:03 +10:00
locale.cpp util: Move util/string.h functions to util namespace 2024-05-16 10:16:08 -05:00
merkleblock.cpp refactor: Use Txid in CMerkleBlock 2023-11-28 17:49:41 +01:00
message.cpp util: move util/message to common/signmessage 2024-05-16 11:16:08 -04:00
mini_miner.cpp fuzz: mini_miner_selection fixups. 2024-07-09 17:22:57 +01:00
miniscript.cpp tests, fuzz: use new NUMS_H const 2024-05-14 11:44:33 +02:00
minisketch.cpp [fuzz] Improve fuzzing stability for minisketch harness 2023-12-14 20:10:21 +00:00
muhash.cpp refactor: disable self-assign warning for tests 2024-06-06 14:14:08 +00:00
multiplication_overflow.cpp build, msvc: Build fuzz.exe binary 2024-04-18 10:27:25 +01:00
net.cpp fuzz: add target for local addresses 2024-02-29 14:13:58 -03:00
net_permissions.cpp Merge bitcoin/bitcoin#27114: p2p: Allow whitelisting manual connections 2024-03-12 12:59:02 -04:00
netaddress.cpp fuzz: extend ConsumeNetAddr() to return I2P and CJDNS addresses 2024-01-23 11:49:32 +01:00
netbase_dns_lookup.cpp p2p: return CSubNet in LookupSubNet 2023-05-30 16:27:21 -03:00
node_eviction.cpp scripted-diff: Bump copyright headers 2022-12-24 23:49:50 +00:00
p2p_handshake.cpp [fuzz] Harness for version handshake 2024-07-31 13:25:52 +01:00
p2p_transport_serialization.cpp random: convert XoRoShiRo128PlusPlus into full RNG 2024-07-01 10:26:46 -04:00
package_eval.cpp scripted-diff: change names from V3 to TRUC 2024-07-02 12:06:07 +01:00
parse_hd_keypath.cpp Switch hardened derivation marker to h in descriptors 2023-04-04 18:33:08 +02:00
parse_numbers.cpp
parse_script.cpp
parse_univalue.cpp fuzz: Limit parse_univalue input length 2024-07-19 15:39:02 +02:00
partially_downloaded_block.cpp Merge bitcoin/bitcoin#30237: test: Add Compact Block Encoding test ReceiveWithExtraTransactions covering non-empty extra_txn 2024-07-01 14:11:52 +01:00
policy_estimator.cpp test: change m_submitted_in_package input to fuzz data provider boolean 2024-01-02 12:41:01 +01:00
policy_estimator_io.cpp fuzz: Remove FuzzedAutoFileProvider 2023-11-14 17:41:26 +01:00
poolresource.cpp random: convert XoRoShiRo128PlusPlus into full RNG 2024-07-01 10:26:46 -04: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 Use ParamsWrapper for witness serialization 2023-11-14 08:45:30 +10:00
process_message.cpp test: [refactor] Pass TestOpts 2024-07-08 16:11:15 +02:00
process_messages.cpp test: [refactor] Pass TestOpts 2024-07-08 16:11:15 +02:00
protocol.cpp
psbt.cpp Remove unused version.h include 2023-11-30 11:28:19 +01:00
random.cpp random: drop ad-hoc Shuffle in favor of std::shuffle 2024-07-06 09:06:36 -04:00
rbf.cpp fuzz: have package_rbf always make small txns 2024-06-18 10:19:41 -04:00
rolling_bloom_filter.cpp
rpc.cpp test: [refactor] Pass TestOpts 2024-07-08 16:11:15 +02:00
script.cpp policy: Add OP_1 <0x4e73> as a standard output type 2024-07-30 14:06:58 -04:00
script_assets_test_minimizer.cpp util: Move util/string.h functions to util namespace 2024-05-16 10:16:08 -05:00
script_descriptor_cache.cpp
script_flags.cpp Fix IWYU for the script_flags fuzz target 2023-11-23 17:57:53 +01:00
script_format.cpp scripted-diff: Use new FUZZ_TARGET macro everywhere 2023-07-13 20:37:14 +02:00
script_interpreter.cpp Use ParamsWrapper for witness serialization 2023-11-14 08:45:30 +10:00
script_ops.cpp
script_parsing.cpp util: Move util/string.h functions to util namespace 2024-05-16 10:16:08 -05:00
script_sigcache.cpp fuzz: Deglobalize signature cache in sigcache test 2024-07-19 17:17:02 +02:00
script_sign.cpp test: Use ECC_Context helper in bench and fuzz tests 2024-05-09 15:56:04 +02:00
scriptnum_ops.cpp
secp256k1_ec_seckey_import_export_der.cpp
secp256k1_ecdsa_signature_parse_der_lax.cpp test: Use ECC_Context helper in bench and fuzz tests 2024-05-09 15:56:04 +02: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 Use ParamsWrapper for witness serialization 2023-11-14 08:45:30 +10:00
socks5.cpp netbase: use reliable send() during SOCKS5 handshake 2023-10-31 18:19:37 +01:00
span.cpp
string.cpp util: Catch translation string errors at compile time 2024-07-10 09:40:47 +02:00
strprintf.cpp
system.cpp scripted-diff: Use new FUZZ_TARGET macro everywhere 2023-07-13 20:37:14 +02:00
timeoffsets.cpp refactor: remove warnings globals 2024-06-13 11:20:49 +01:00
torcontrol.cpp scripted-diff: Use new FUZZ_TARGET macro everywhere 2023-07-13 20:37:14 +02:00
transaction.cpp fuzz: Drop unused version from fuzz input format 2023-11-30 11:27:21 +01:00
tx_in.cpp Remove unused version.h include 2023-11-30 11:28:19 +01:00
tx_out.cpp Remove unused version.h include 2023-11-30 11:28:19 +01:00
tx_pool.cpp scripted-diff: change names from V3 to TRUC 2024-07-02 12:06:07 +01:00
txorphan.cpp fuzz: Speed up PickValue in txorphan 2024-07-23 10:37:58 +02:00
txrequest.cpp
util.cpp policy: Add OP_1 <0x4e73> as a standard output type 2024-07-30 14:06:58 -04:00
util.h Remove unused version.h include 2023-11-30 11:28:19 +01:00
utxo_snapshot.cpp test: Add arguments for creating a slimmer setup 2024-07-19 13:37:31 +02:00
utxo_total_supply.cpp test: [refactor] Pass TestOpts 2024-07-08 16:11:15 +02:00
validation_load_mempool.cpp mempool: move LoadMempool/DumpMempool to node 2024-06-26 22:47:09 +00:00
vecdeque.cpp random: convert XoRoShiRo128PlusPlus into full RNG 2024-07-01 10:26:46 -04:00
versionbits.cpp scripted-diff: Use new FUZZ_TARGET macro everywhere 2023-07-13 20:37:14 +02:00