Bitcoin Forum
May 11, 2024, 09:22:31 PM *
News: Latest Bitcoin Core release: 27.0 [Torrent]
 
   Home   Help Search Login Register More  
Pages: [1]
  Print  
Author Topic: I want to know more about child pay for parent  (Read 179 times)
MrcMrc (OP)
Member
**
Offline Offline

Activity: 518
Merit: 45


View Profile
January 23, 2021, 10:07:13 AM
Merited by ranochigo (2), Oshosondy (2), NeuroticFish (1)
 #1

I have been reading recently about child pay for parent but it is not easy to understand, I have known little about it and bring the ones I do not know to this forum for explanations. I know if I have confirmed transactions, I can be able to send a transaction and if the transaction is not  confirmed on time I can use child pay for parent. But what about if I have no bitcoin again after making the parent transaction but not confirmed, later bitcoin was transfer to my wallet and got confirmed, can I use it for the child transaction?

██   ██████████████         1xBit.com     |     BENEFIT SEASON          ██████████████  ██
7 B T C   W E L C O M E   B O N U S
██                       P L A Y   N O W                       ██
1715462551
Hero Member
*
Offline Offline

Posts: 1715462551

View Profile Personal Message (Offline)

Ignore
1715462551
Reply with quote  #2

1715462551
Report to moderator
According to NIST and ECRYPT II, the cryptographic algorithms used in Bitcoin are expected to be strong until at least 2030. (After that, it will not be too difficult to transition to different algorithms.)
Advertised sites are not endorsed by the Bitcoin Forum. They may be unsafe, untrustworthy, or illegal in your jurisdiction.
1715462551
Hero Member
*
Offline Offline

Posts: 1715462551

View Profile Personal Message (Offline)

Ignore
1715462551
Reply with quote  #2

1715462551
Report to moderator
1715462551
Hero Member
*
Offline Offline

Posts: 1715462551

View Profile Personal Message (Offline)

Ignore
1715462551
Reply with quote  #2

1715462551
Report to moderator
1715462551
Hero Member
*
Offline Offline

Posts: 1715462551

View Profile Personal Message (Offline)

Ignore
1715462551
Reply with quote  #2

1715462551
Report to moderator
ranochigo
Legendary
*
Offline Offline

Activity: 2968
Merit: 4179



View Profile
January 23, 2021, 10:14:56 AM
Last edit: January 23, 2021, 10:25:56 AM by ranochigo
Merited by NeuroticFish (1)
 #2

Child pay for parent involves two transactions.

The parent transaction is unconfirmed.

A -> B
   -> C   Fees: 1 sat/vbyte 142 bytes

B is the address that you're sending to and C is the address that you control which is the change address. Unfortunately, your fee rate is too low and it remains unconfirmed.

Since you have the ability to spend output C, you can create a transaction which spends it with a larger than proportionate fee (say 20sat/vbyte).
Child transaction:

C -> D Fees: 20 sat/vbyte 299 bytes

Total fees: 142sat+ 5980sat
Fee rate: 13.8sat/vbyte

If you combine both of the size and fees together to get the fee rates, it should be fairly high.  If the combined fee/size is sufficiently high, miners are incentivized to mine both of your transaction so as to obtain the transaction fees for both.

To answer your question: Depends. As illustrated, miners are incentivized with CPFP only if you're spending an output from the unconfirmed transaction so they would confirm both to collect all the fees. CPFP requires you to include at least one output from the unconfirmed transaction. If possible, enable opt-in RBF.
 

CPFP is not the most ideal method to bump fee. Spending C entails the fact that you also have to pay for the cost to spend that output and thus incurs an additional fee ontop of your current fees. In comparison, Replace-By-Fee is better as you can just replace the original transaction with a higher fee rate for it to be confirmed. There are cases where CPFP is useful, if you're not the sender and/or if you didn't enable RBF.

.
.HUGE.
▄██████████▄▄
▄█████████████████▄
▄█████████████████████▄
▄███████████████████████▄
▄█████████████████████████▄
███████▌██▌▐██▐██▐████▄███
████▐██▐████▌██▌██▌██▌██
█████▀███▀███▀▐██▐██▐█████

▀█████████████████████████▀

▀███████████████████████▀

▀█████████████████████▀

▀█████████████████▀

▀██████████▀▀
█▀▀▀▀











█▄▄▄▄
▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀
.
CASINSPORTSBOOK
▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄
▀▀▀▀█











▄▄▄▄█
MrcMrc (OP)
Member
**
Offline Offline

Activity: 518
Merit: 45


View Profile
January 23, 2021, 10:30:16 AM
 #3

Which means it is not that child pay for parent has lower fee, it is just like increasing the fee for the child transaction above normal rate in a way to make it normal rate for the two transactions so that miners can process the transaction at one time. Thanks for the answer, I now know that if the change address is not having sufficient bitcoin amount, I can not do child pay for parent. That is why I make a transaction with low fee but it is not yet confirmed, I later receive bitcoin from someone, thinking I can use child pay for parent, but the second transaction is now confirmed while the first transaction is not yet confirmed.

██   ██████████████         1xBit.com     |     BENEFIT SEASON          ██████████████  ██
7 B T C   W E L C O M E   B O N U S
██                       P L A Y   N O W                       ██
ranochigo
Legendary
*
Offline Offline

Activity: 2968
Merit: 4179



View Profile
January 23, 2021, 10:32:24 AM
 #4

Thanks for the answer, I now know that if the change address is not having sufficient bitcoin amount, I can not do child pay for parent.
You can. Just make sure that your wallet includes at least one of the outputs from that specific transaction, and you'll be able to do CPFP even if you spend the other confirmed output as well.

.
.HUGE.
▄██████████▄▄
▄█████████████████▄
▄█████████████████████▄
▄███████████████████████▄
▄█████████████████████████▄
███████▌██▌▐██▐██▐████▄███
████▐██▐████▌██▌██▌██▌██
█████▀███▀███▀▐██▐██▐█████

▀█████████████████████████▀

▀███████████████████████▀

▀█████████████████████▀

▀█████████████████▀

▀██████████▀▀
█▀▀▀▀











█▄▄▄▄
▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀
.
CASINSPORTSBOOK
▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄
▀▀▀▀█











▄▄▄▄█
MrcMrc (OP)
Member
**
Offline Offline

Activity: 518
Merit: 45


View Profile
January 23, 2021, 10:47:42 AM
Merited by Oshosondy (2)
 #5

Thanks for the answer, I now know that if the change address is not having sufficient bitcoin amount, I can not do child pay for parent.
You can. Just make sure that your wallet includes at least one of the outputs from that specific transaction, and you'll be able to do CPFP even if you spend the other confirmed output as well.
Thank younfir this good answers. Please let us take this as an examples:

1. Supposing I have 0.0002btc, I sent the whole 0.0002btc to wallet B with low fee, if wallet A receive 0.001btc later. Wallet A can not do child pay for parent because no bitcoin to change address because all the bitcoin (0.0002btc) were sent.

2. But if wallet A has 0.00002btc, sent 0.000019btc with low fee, wallet A change address will receive 0.00001btc. Later wallet a receive 0.01btc from another wallet, because of the 0.00001btc received by wallet A change address, wallet A can do child pay for parent?

██   ██████████████         1xBit.com     |     BENEFIT SEASON          ██████████████  ██
7 B T C   W E L C O M E   B O N U S
██                       P L A Y   N O W                       ██
ranochigo
Legendary
*
Offline Offline

Activity: 2968
Merit: 4179



View Profile
January 23, 2021, 10:48:51 AM
 #6

1. Supposing I have 0.0002btc, I sent the whole 0.0002btc to wallet B with low fee, if wallet A receive 0.001btc later. Wallet A can not do child pay for parent because no bitcoin to change address because all the bitcoin (0.0002btc) were sent.
Correct.
2. But if wallet A has 0.00002btc, sent 0.000019btc with low fee, wallet A change address will receive 0.00001btc. Later wallet a receive 0.01btc from another wallet, because of the 0.00001btc received by wallet A change address, wallet A can do child pay for parent?
Correct. As long as you control at least one of the outputs in that unconfirmed transaction. The amount is a bit wrong as the change should be 0.000001BTC and that's a dust but it's not a problem since most wallets will not include a dust output.

.
.HUGE.
▄██████████▄▄
▄█████████████████▄
▄█████████████████████▄
▄███████████████████████▄
▄█████████████████████████▄
███████▌██▌▐██▐██▐████▄███
████▐██▐████▌██▌██▌██▌██
█████▀███▀███▀▐██▐██▐█████

▀█████████████████████████▀

▀███████████████████████▀

▀█████████████████████▀

▀█████████████████▀

▀██████████▀▀
█▀▀▀▀











█▄▄▄▄
▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀
.
CASINSPORTSBOOK
▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄
▀▀▀▀█











▄▄▄▄█
MrcMrc (OP)
Member
**
Offline Offline

Activity: 518
Merit: 45


View Profile
January 23, 2021, 10:56:51 AM
 #7

Thanks for your meritable answers, you explained what is very difficult for me to understand online in just few minutes. I believe I now know all about child pay for parent and when to use it.

██   ██████████████         1xBit.com     |     BENEFIT SEASON          ██████████████  ██
7 B T C   W E L C O M E   B O N U S
██                       P L A Y   N O W                       ██
HCP
Legendary
*
Offline Offline

Activity: 2086
Merit: 4316

<insert witty quote here>


View Profile
January 23, 2021, 11:24:15 PM
 #8

One important thing you seem to be missing is that "Child Pays For Parent" can only be executed by a wallet that has received one of the outputs from the unconfirmed transaction.

So for:

Case 1:
Code:
InputFromWalletA -----> ReceiveAddressWalletB

Only WalletB can execute the CPFP... as it is the only wallet with a "child"


Case 2:
Code:
InputFromWalletA -----> ReceiveAddressWalletB
                   |--> ChangeAddressWalletA

Either WalletA or WalletB (or Both) can attempt to execute CPFP... as they both have "children" from the transaction.

█████████████████████████
████▐██▄█████████████████
████▐██████▄▄▄███████████
████▐████▄█████▄▄████████
████▐█████▀▀▀▀▀███▄██████
████▐███▀████████████████
████▐█████████▄█████▌████
████▐██▌█████▀██████▌████
████▐██████████▀████▌████
█████▀███▄█████▄███▀█████
███████▀█████████▀███████
██████████▀███▀██████████
█████████████████████████
.
BC.GAME
▄▄░░░▄▀▀▄████████
▄▄▄
██████████████
█████░░▄▄▄▄████████
▄▄▄▄▄▄▄▄▄██▄██████▄▄▄▄████
▄███▄█▄▄██████████▄████▄████
███████████████████████████▀███
▀████▄██▄██▄░░░░▄████████████
▀▀▀█████▄▄▄███████████▀██
███████████████████▀██
███████████████████▄██
▄███████████████████▄██
█████████████████████▀██
██████████████████████▄
.
..CASINO....SPORTS....RACING..
█░░░░░░█░░░░░░█
▀███▀░░▀███▀░░▀███▀
▀░▀░░░░▀░▀░░░░▀░▀
░░░░░░░░░░░░
▀██████████
░░░░░███░░░░
░░█░░░███▄█░░░
░░██▌░░███░▀░░██▌
░█░██░░███░░░█░██
░█▀▀▀█▌░███░░█▀▀▀█▌
▄█▄░░░██▄███▄█▄░░▄██▄
▄███▄
░░░░▀██▄▀


▄▄████▄▄
▄███▀▀███▄
██████████
▀███▄░▄██▀
▄▄████▄▄░▀█▀▄██▀▄▄████▄▄
▄███▀▀▀████▄▄██▀▄███▀▀███▄
███████▄▄▀▀████▄▄▀▀███████
▀███▄▄███▀░░░▀▀████▄▄▄███▀
▀▀████▀▀████████▀▀████▀▀
MrcMrc (OP)
Member
**
Offline Offline

Activity: 518
Merit: 45


View Profile
January 25, 2021, 09:14:00 AM
 #9

One important thing you seem to be missing is that "Child Pays For Parent" can only be executed by a wallet that has received one of the outputs from the unconfirmed transaction.
Thanks for this, I also know about receiver's address to be able to use child pay for parent, it can not work with wallets that can not spend unconfirmed, which can make it useless in such wallet, but unlike wallets that can spend unconfirmed transactions, it will work perfectly. Unlike the sender's address that even if the wallet can not spend unconfirmed transaction, it will still be able to use child pay for parent but if and only if one of the child address containing the parents unspent transaction that is sent to the wallet back during the parent transaction.

██   ██████████████         1xBit.com     |     BENEFIT SEASON          ██████████████  ██
7 B T C   W E L C O M E   B O N U S
██                       P L A Y   N O W                       ██
bob123
Legendary
*
Offline Offline

Activity: 1624
Merit: 2481



View Profile WWW
January 25, 2021, 09:41:19 AM
 #10

[...] it can not work with wallets that can not spend unconfirmed, which can make it useless in such wallet [...]

Then switching to a wallet which gives you the option would be a solution.
Even if you insist on using a wallet which doesn't provide that option such as horrible web wallets (honestly, who still uses web wallets? It is 2021 already) for example, exporting the private key and importing it into a proper wallet would be sufficient to create a CPFP transaction.

Pmalek
Legendary
*
Offline Offline

Activity: 2758
Merit: 7137



View Profile
January 26, 2021, 10:43:31 AM
 #11

Although the users above have explained it quite well, but since you are interested in the topic, I would suggest you take a look at the tutorial that
mocacinno posted on CPFP transactions > https://bitcointalk.org/index.php?topic=5285192.0

It's main focus is on how to perform a CPFP transaction on Electrum, but it's an excellent resource nevertheless.

.
.BLACKJACK ♠ FUN.
█████████
██████████████
████████████
█████████████████
████████████████▄▄
░█████████████▀░▀▀
██████████████████
░██████████████
████████████████
░██████████████
████████████
███████████████░██
██████████
CRYPTO CASINO &
SPORTS BETTING
▄▄███████▄▄
▄███████████████▄
███████████████████
█████████████████████
███████████████████████
█████████████████████████
█████████████████████████
█████████████████████████
███████████████████████
█████████████████████
███████████████████
▀███████████████▀
█████████
.
Pages: [1]
  Print  
 
Jump to:  

Powered by MySQL Powered by PHP Powered by SMF 1.1.19 | SMF © 2006-2009, Simple Machines Valid XHTML 1.0! Valid CSS!