Monday, November 25, 2024

consumer – Is it attainable to spend unconfirmed UTXO?

Is it attainable to create transaction with enter being an unconfirmed UTXO?

The consensus guidelines allow a transaction that spends an output created throughout the identical block. That is not spending an unconfirmed UTXO, but when two unconfirmed transactions exist with one chaining off the opposite, then they are often mined concurrently.

The P2P protocol guidelines additionally allow propagation of unconfirmed transactions which spend unconfirmed outputs, so such chains do truly get relayed throughout the community, and make it to miners.

If sure, what occurs, if such a transaction has a better price than the price of the transaction, that created the unconfirmed UTXO? Will this transaction fail, as a result of it was included into the block forward of the UTXO transaction? Or will or not it’s delayed, till the UTXO transaction is confirmed?

The block constructing and relay code in Bitcoin Core does take the charges of such chains under consideration even utilizing a precept often called child-pays-for-parent (CPFP). If a descendant transaction pays a better feerate than its mother or father, the 2 might get handled as a gaggle, the place the full price is unfold over the full dimension, nearly bumping the feerate of the mother or father.

And the way a lot of this “chaining” are you able to do? (use unconfirmed UTXO from a tx, which makes use of unconfirmed UTXO and so forth and so forth.) Is there a restrict?

The currently-implemented default coverage guidelines in Bitcoin Core allow a transaction to have as much as 25 unconfirmed descendants within the mempool (together with itself), and as much as 25 unconfirmed ancestors (together with itself). As well as, there are limits on the full dimension (in vbytes) of those mixed ancestor and descendant units.

Be aware that every one of that is prone to change with cluster mempool.

Related Articles

LEAVE A REPLY

Please enter your comment!
Please enter your name here

Latest Articles