Bitcoin Forum
June 01, 2024, 03:31:34 PM *
News: Latest Bitcoin Core release: 27.0 [Torrent]
 
   Home   Help Search Login Register More  
Pages: [1]
  Print  
Author Topic: CPFP bitcoin transaction.  (Read 211 times)
Oshosondy (OP)
Legendary
*
Offline Offline

Activity: 1470
Merit: 1145


Gamble responsibly


View Profile
August 26, 2020, 10:14:15 PM
Merited by suchmoon (4), o_e_l_e_o (2), ABCbits (1), Husna QA (1), Heisenberg_Hunter (1)
 #1

I have been studying about bitcoin and wallet technically so far, I have already know how to use replace by fee (rbf), it was very simple for me. But I do not get how to use child pay for parent (cpfp). That is why I want to ask the question here, for you people help me out. Maybe I am just getting it wrong.

For instance, if I transfer bitcoin from bitcoin core wallet with a very low amount of fee but the transaction did not get a single confirmation, normally I can use rbf to pump the fee.

But if I want to make another payment to another bitcoin address, if I use higher fee that can make my transaction to be confirmed fast. Is that cpfp? So that my first transaction will be confirmed at the same time with the second transaction.

Or cpfp only work if I transfer bitcoin again to the previous address but with a higher fee that can make both to be confirmed on time?

██
██
██
██
██
██
██
██
██
██
██
██
██
... LIVECASINO.io    Play Live Games with up to 20% cashback!...██
██
██
██
██
██
██
██
██
██
██
██
██
HCP
Legendary
*
Offline Offline

Activity: 2086
Merit: 4316

<insert witty quote here>


View Profile
August 26, 2020, 11:07:24 PM
Merited by suchmoon (4), hugeblack (2), o_e_l_e_o (2), ABCbits (1), Husna QA (1)
 #2

For CPFP to work... you need to spending one of the outputs of the previous unconfirmed transaction.

Ie.

UnconfirmedTransaction1:
Code:
InputA ---> RecipientAddressA
        |-> ChangeAddressB

So, you need to be spending the outputs that went to RecipientAddressA or ChangeAddressB in the CPFP transaction... ie the "children" of the transaction... which means you need to be the recipient of the original transaction, or the owner of any change address that was used.


So, with the above scenario, the receiver could setup a CPFP like this:
Code:
RecipientAddressA ---> OutputX

or the original sender could spend their unconfirmed change like this:
Code:
ChangeAddressB ---> OutputY


Basically, you can only do CPFP if you have received unconfirmed coins... you cannot use CPFP if you were just the sender and didn't get any change:
Code:
SenderA ---> ReceiverB

In this scenerio... only ReceiverB can do CPFP... as they're the only "child" Wink

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


▄▄████▄▄
▄███▀▀███▄
██████████
▀███▄░▄██▀
▄▄████▄▄░▀█▀▄██▀▄▄████▄▄
▄███▀▀▀████▄▄██▀▄███▀▀███▄
███████▄▄▀▀████▄▄▀▀███████
▀███▄▄███▀░░░▀▀████▄▄▄███▀
▀▀████▀▀████████▀▀████▀▀
nc50lc
Legendary
*
Offline Offline

Activity: 2436
Merit: 5666


Self-proclaimed Genius


View Profile
August 27, 2020, 03:51:03 AM
 #3

So that my first transaction will be confirmed at the same time with the second transaction.
-snip-
Yes, the parent and child must be included is the same block if the child has higher fee than the parent.
Since the child has a high fee but can't be mined without the parent, miners will take the parent in consideration when prioritizing the transaction(s).

Miners will compute the total fee-rate based from the total paid fee and size of the parent & children.
Worth reading: Wiki: Miner fees - CPFP

█▀▀▀











█▄▄▄
▀▀▀▀▀▀▀▀▀▀▀
e
▄▄▄▄▄▄▄▄▄▄▄
█████████████
████████████▄███
██▐███████▄█████▀
█████████▄████▀
███▐████▄███▀
████▐██████▀
█████▀█████
███████████▄
████████████▄
██▄█████▀█████▄
▄█████████▀█████▀
███████████▀██▀
████▀█████████
▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀
c.h.
▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄
▀▀▀█











▄▄▄█
▄██████▄▄▄
█████████████▄▄
███████████████
███████████████
███████████████
███████████████
███░░█████████
███▌▐█████████
█████████████
███████████▀
██████████▀
████████▀
▀██▀▀
Oshosondy (OP)
Legendary
*
Offline Offline

Activity: 1470
Merit: 1145


Gamble responsibly


View Profile
August 31, 2020, 09:24:15 AM
 #4

I have read about CPFP very well, I now understand how it works. The output from the previous transaction which remain on the wallet balance can only be used to make a transaction that will help to make the low fee unconfirmed parent transactions to be confirmed along the child (new) transactions.

██
██
██
██
██
██
██
██
██
██
██
██
██
... LIVECASINO.io    Play Live Games with up to 20% cashback!...██
██
██
██
██
██
██
██
██
██
██
██
██
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!