Post
Topic
Board Development & Technical Discussion
Merits 1 from 1 user
Re: createrawtransaction and danger of creating unspendable output
by
bizeodal
on 31/10/2024, 18:05:01 UTC
⭐ Merited by potatotom (1)
overcome the missing CPFP in bitcoin core

Have not tried this ...
CPFP is implemented in Core via the include_unsafe parameter in the fundrawtransaction, send and walletcreatefundedpsbt RPCs
This could be simpler than using createrawtransaction

Merchant-initiated CPFP is a good idea, if you don't mind paying the fee the customer failed to pay, and if you're careful not to pay so much that the fee wipes out the payment - eg when fee rates surge to 600 Sat/vbyte for a few blocks as happened recently

Your CPFP strategy is unlikely to make unspendable transactions in the way you're describing. Testnet is useful to discover consensus-unspendable transactions (bad scripts, and various size limits). Testnet mostly ignores policy rules which might make a transaction policy-unspendable on Mainnet. You can configure a testnet node to implement policy rules, or use Signet instead. Policy rules restrict non-standard transactions, and minor things like large OP_RETURNs or multiple OP_RETURNs. But it's unlikely any of those issues apply to the consolidation/CPFP transactions you're planning to make

cf https://github.com/bitcoin/bitcoin/pull/21359