Bitcoin Forum
April 24, 2024, 10:07:59 AM *
News: Latest Bitcoin Core release: 27.0 [Torrent]
 
   Home   Help Search Login Register More  
Pages: [1] 2 »  All
  Print  
Author Topic: A complete idiot's guide to child pays for parent?  (Read 18799 times)
sleeptalkerz (OP)
Newbie
*
Offline Offline

Activity: 8
Merit: 0


View Profile
July 12, 2015, 01:17:01 AM
 #1

So I have multiple pending transactions in Electrum that have been sitting with zero confirmations for four days now. I've had other transactions go through since then, but on these I apparently didn't use enough of a transaction fee. On another site, someone suggested I try "child pays for parent" and pointed me to https://bitcointalk.org/index.php?topic=729535.msg8251404#msg8251404. Now, I'm a total newbie, just started with bitcoin like a week ago. I sorta understand the concept being described in that post, but I'm not sure I follow the process. It's just vague enough to be confusing to someone who doesn't know what they're doing. For example, right away in step 1, it refers to a different transaction than the one the OP of that thread originally asked about. What's the connection there, and why does it come into play later as well in step 3 where there are now three transactions involved? And in step 2, do I have to send it back to the original sending address, or literally just any other address?

The person referring me here didn't know enough to help me further, so I thought I'd come to the source. Basically, it would be amazing if someone could give me an idiot proof blow-by-blow of the process. Maybe I could follow it better using using one of my pending transactions as an example, like this one: https://blockchain.info/tx/d98144e300e6a119ed54a47df73c3ead075d00f1fb2417f952c4dcd4ad6752fe 
1713953279
Hero Member
*
Offline Offline

Posts: 1713953279

View Profile Personal Message (Offline)

Ignore
1713953279
Reply with quote  #2

1713953279
Report to moderator
1713953279
Hero Member
*
Offline Offline

Posts: 1713953279

View Profile Personal Message (Offline)

Ignore
1713953279
Reply with quote  #2

1713953279
Report to moderator
"This isn't the kind of software where we can leave so many unresolved bugs that we need a tracker for them." -- Satoshi
Advertised sites are not endorsed by the Bitcoin Forum. They may be unsafe, untrustworthy, or illegal in your jurisdiction.
1713953279
Hero Member
*
Offline Offline

Posts: 1713953279

View Profile Personal Message (Offline)

Ignore
1713953279
Reply with quote  #2

1713953279
Report to moderator
1713953279
Hero Member
*
Offline Offline

Posts: 1713953279

View Profile Personal Message (Offline)

Ignore
1713953279
Reply with quote  #2

1713953279
Report to moderator
1713953279
Hero Member
*
Offline Offline

Posts: 1713953279

View Profile Personal Message (Offline)

Ignore
1713953279
Reply with quote  #2

1713953279
Report to moderator
achow101
Moderator
Legendary
*
Offline Offline

Activity: 3374
Merit: 6535


Just writing some code


View Profile WWW
July 12, 2015, 02:55:48 AM
 #2

This is the general principle of CPFP, and it may not be entirely correct.

Step 1: Find the txid of your unconfirmed transaction
Step 2: Calculate the fee for the unconfirmed transaction with a fee of 0.0001 BTC/Kb
Step 3: Create a transaction that spends the unconfirmed transaction to another Bitcoin address. Include in its fee the recommended fee and the fee you calculated in step 2. (e.g. fee of 0.0001 BTC for both transactions means 0.0002 BTC fee in this new one)
Step 4: Sign the new transaction.
Step 5: Push the transaction to the network. It is recommended to use http://eligius.st/~wizkid057/newstats/pushtxn.php because the mining pool Eligius is one of the only pools to implement CPFP. This will push straight to them and the rest of the network.
Step 6: Wait for someone, probably Eligius, to mine a block and include both of your transactions. This could take a couple hours since Eligius has a small percentage of the hashrate of the network.

Congrats! You now have two confirmed transactions

sleeptalkerz (OP)
Newbie
*
Offline Offline

Activity: 8
Merit: 0


View Profile
July 12, 2015, 03:40:10 AM
 #3

Thanks for the reply. I kinda get the idea, but I'm hoping for instruction that takes no knowledge for granted. In other words, explain like I'm 5. Some things are unclear to me, like when you say "Step 3: Create a transaction that spends the unconfirmed transaction to another Bitcoin address.", I assume you mean from sending from the receiving end of the original pending transaction, right? Can this be an address from the same wallet (for the receiving wallet in Electrum, I have 5 different receiving addresses, but I think they're all the same wallet?), or does it have to be the exact address the pending transaction was sent to? Furthermore, in step four, how do you sign the transaction and send it through Eligius? In Electrum, it only allows me to simply send to another wallet address, but I don't see any options to do anything more specific than that. I couldn't find an answer through Google. Or do I have to use something other than Electrum?
dabura667
Sr. Member
****
Offline Offline

Activity: 475
Merit: 252


View Profile
July 12, 2015, 05:22:59 AM
 #4

Step 2: Calculate the fee for the unconfirmed transaction with a fee of 0.0001 BTC/Kb

If you want them to be confirmed quickly, with all this congestion I would recommend 0.001 BTC/kB

Including 0.0001 BTC x number of transactions will not get you confirmed for a while.

My Tip Address:
1DXcHTJS2DJ3xDoxw22wCt11FeAsgfzdBU
dabura667
Sr. Member
****
Offline Offline

Activity: 475
Merit: 252


View Profile
July 12, 2015, 05:43:38 AM
 #5

Represent the number of "multiple pending transactions" you mention as x.

Calculate the fee as:

Code:
(x+1) x 0.001

Let's call the number of this result y.

Now do the following: (Make sure the preferences states to "Check transaction before broadcasting")

1. In the "Addresses" tab click the arrow next to "Change" to show your change addresses.
2. Find the Address in your change addresses which contains the change from your MOST RECENT UNCONFIRMED TRANSACTION. (Find this by right clicking the transaction and checking the details window and look at the addresses and amounts of BTC at the bottom window to find your change address)
3. Right click the change address in your "Addresses" tab, and click "Send From." This will take you to the send tab.
4. Set the Fee box to y that we calculated. The unit is BTC.
5. Send the remainder of the bitcoins in that address to another address of yours.
6. Click Button to sign and check transaction. (There should be no error, as it is not being sent)
7. On the check transaction window, Click save. Then save the file somewhere.
8. Open the file, and find the looooong string of hex characters between quotes.
9. Copy the string (like 01000000bef39df829...00000000)
10. Paste it into http://eligius.st/~wizkid057/newstats/pushtxn.php but wait on clicking the button.
11. Click "Broadcast" on the Electrum transaction checking window.
12. Wait about 20 seconds. (or if an error message pops up in Electrum, just go straight to the next step)
13. Click "OK" on the website to push the transaction.

If the website gives an error like "already in mempool" or something like that, then your transaction propagated fine... but if not, then you'll probably have to wait until Eligius mines a block.

This will confirm all your transactions at once.

My Tip Address:
1DXcHTJS2DJ3xDoxw22wCt11FeAsgfzdBU
sleeptalkerz (OP)
Newbie
*
Offline Offline

Activity: 8
Merit: 0


View Profile
July 13, 2015, 01:05:16 AM
 #6

Thanks. I think I understand a little more what I'm supposed to do. The issue I'm facing at the moment is related to the particular client I'm using, I think. In the Electrum client that I'm sending from, I see the option in the preferences to "Check transaction before broadcasting," so I know what I'm looking for, but I don't see that option in the version of Electrum that's on the receiving end of the pending transactions. The original transactions were from a wallet on one computer to a wallet on another, and the second computer is using the Linux Electrum client, which apparently doesn't have this option? Hopefully that makes sense. Long story short, I don't see any option for signing or checking transactions or exporting them. All it appears I'm able to do, as far as I can tell, is send a transaction directly using the "send" button.
sleeptalkerz (OP)
Newbie
*
Offline Offline

Activity: 8
Merit: 0


View Profile
July 13, 2015, 05:25:13 AM
 #7

Is it at all possible to do a child pays for parent type thing from the sending wallet of a pending transaction, or can it only be done from the recipient?
amaclin
Legendary
*
Offline Offline

Activity: 1260
Merit: 1019


View Profile
July 13, 2015, 08:26:25 AM
 #8

Step 3: Create and sign a transaction that spends the unconfirmed transaction to another Bitcoin address.
This is possible only if your "parent" transaction moved funds to you.
achow101
Moderator
Legendary
*
Offline Offline

Activity: 3374
Merit: 6535


Just writing some code


View Profile WWW
July 13, 2015, 02:37:35 PM
 #9

Thanks. I think I understand a little more what I'm supposed to do. The issue I'm facing at the moment is related to the particular client I'm using, I think. In the Electrum client that I'm sending from, I see the option in the preferences to "Check transaction before broadcasting," so I know what I'm looking for, but I don't see that option in the version of Electrum that's on the receiving end of the pending transactions. The original transactions were from a wallet on one computer to a wallet on another, and the second computer is using the Linux Electrum client, which apparently doesn't have this option? Hopefully that makes sense. Long story short, I don't see any option for signing or checking transactions or exporting them. All it appears I'm able to do, as far as I can tell, is send a transaction directly using the "send" button.
You will have to do it through the console and console commands. This is more difficult, but allows it to be done. Unfortunately, it seems like Electrum doesn't allow you to choose which transactions to spend so you need to find the txids and use console commands to create and sign the transaction.

sleeptalkerz (OP)
Newbie
*
Offline Offline

Activity: 8
Merit: 0


View Profile
July 13, 2015, 07:48:51 PM
 #10

How would I go about that? Trying some Googling now, but this may be over my head.

Also, the receiving wallet isn't showing these pending transactions anymore. They disappeared from the transaction history there, but they're still stuck on pending in the sending wallet. What does that mean?
achow101
Moderator
Legendary
*
Offline Offline

Activity: 3374
Merit: 6535


Just writing some code


View Profile WWW
July 13, 2015, 08:00:31 PM
 #11

How would I go about that? Trying some Googling now, but this may be over my head.

Also, the receiving wallet isn't showing these pending transactions anymore. They disappeared from the transaction history there, but they're still stuck on pending in the sending wallet. What does that mean?
Can you see the transaction in block explorers like blockchain.info or blockr.io? Check a couple of them. If the transactions aren't there, that means that the Bitcoin network has "forgotten" your transaction and it is essentially as if it never existed. Switch your client to another server since the transaction is probably in its cache, and then, just resend your transaction with a higher fee and it will be confirmed.

sleeptalkerz (OP)
Newbie
*
Offline Offline

Activity: 8
Merit: 0


View Profile
July 13, 2015, 08:21:40 PM
 #12

How would I go about that? Trying some Googling now, but this may be over my head.

Also, the receiving wallet isn't showing these pending transactions anymore. They disappeared from the transaction history there, but they're still stuck on pending in the sending wallet. What does that mean?
Can you see the transaction in block explorers like blockchain.info or blockr.io? Check a couple of them. If the transactions aren't there, that means that the Bitcoin network has "forgotten" your transaction and it is essentially as if it never existed. Switch your client to another server since the transaction is probably in its cache, and then, just resend your transaction with a higher fee and it will be confirmed.

Yes, I checked 5 block explorers, and the transactions do still appear on Blockchain.info, Insight, TradeBlock and Blocktrail, but they don't exist on Blockr.io. On Blockr.io I get "this transaction is unknown." So what does that indicate? I tried switching servers anyway, but it did nothing.
achow101
Moderator
Legendary
*
Offline Offline

Activity: 3374
Merit: 6535


Just writing some code


View Profile WWW
July 13, 2015, 09:00:29 PM
 #13

How would I go about that? Trying some Googling now, but this may be over my head.

Also, the receiving wallet isn't showing these pending transactions anymore. They disappeared from the transaction history there, but they're still stuck on pending in the sending wallet. What does that mean?
Can you see the transaction in block explorers like blockchain.info or blockr.io? Check a couple of them. If the transactions aren't there, that means that the Bitcoin network has "forgotten" your transaction and it is essentially as if it never existed. Switch your client to another server since the transaction is probably in its cache, and then, just resend your transaction with a higher fee and it will be confirmed.

Yes, I checked 5 block explorers, and the transactions do still appear on Blockchain.info, Insight, TradeBlock and Blocktrail, but they don't exist on Blockr.io. On Blockr.io I get "this transaction is unknown." So what does that indicate? I tried switching servers anyway, but it did nothing.
That means that your transaction was not forgotten by the network. If you want to use CPFP, you need to use Electrum console commands, specifically createrawtx.

sleeptalkerz (OP)
Newbie
*
Offline Offline

Activity: 8
Merit: 0


View Profile
July 13, 2015, 09:36:20 PM
 #14

How would I go about that? Trying some Googling now, but this may be over my head.

Also, the receiving wallet isn't showing these pending transactions anymore. They disappeared from the transaction history there, but they're still stuck on pending in the sending wallet. What does that mean?
Can you see the transaction in block explorers like blockchain.info or blockr.io? Check a couple of them. If the transactions aren't there, that means that the Bitcoin network has "forgotten" your transaction and it is essentially as if it never existed. Switch your client to another server since the transaction is probably in its cache, and then, just resend your transaction with a higher fee and it will be confirmed.

Yes, I checked 5 block explorers, and the transactions do still appear on Blockchain.info, Insight, TradeBlock and Blocktrail, but they don't exist on Blockr.io. On Blockr.io I get "this transaction is unknown." So what does that indicate? I tried switching servers anyway, but it did nothing.
That means that your transaction was not forgotten by the network. If you want to use CPFP, you need to use Electrum console commands, specifically createrawtx.

Do you know how to do that by any chance? In searching for help, I'm not really finding any info on how to actually use Electrum console commands, and whatever info I have found is way above my pay grade, so to speak.
achow101
Moderator
Legendary
*
Offline Offline

Activity: 3374
Merit: 6535


Just writing some code


View Profile WWW
July 14, 2015, 01:34:45 AM
 #15

How would I go about that? Trying some Googling now, but this may be over my head.

Also, the receiving wallet isn't showing these pending transactions anymore. They disappeared from the transaction history there, but they're still stuck on pending in the sending wallet. What does that mean?
Can you see the transaction in block explorers like blockchain.info or blockr.io? Check a couple of them. If the transactions aren't there, that means that the Bitcoin network has "forgotten" your transaction and it is essentially as if it never existed. Switch your client to another server since the transaction is probably in its cache, and then, just resend your transaction with a higher fee and it will be confirmed.

Yes, I checked 5 block explorers, and the transactions do still appear on Blockchain.info, Insight, TradeBlock and Blocktrail, but they don't exist on Blockr.io. On Blockr.io I get "this transaction is unknown." So what does that indicate? I tried switching servers anyway, but it did nothing.
That means that your transaction was not forgotten by the network. If you want to use CPFP, you need to use Electrum console commands, specifically createrawtx.

Do you know how to do that by any chance? In searching for help, I'm not really finding any info on how to actually use Electrum console commands, and whatever info I have found is way above my pay grade, so to speak.
I don't know how to do it in electrum, but I can do it in Bitcoin Core. For a small fee, I could create the transaction for you then you sign it on electrum (I can tell you how to do that) and then one of us can broadcast it.

d4n13
Full Member
***
Offline Offline

Activity: 210
Merit: 101


“Create Your Decentralized Life”


View Profile
July 14, 2015, 04:02:21 AM
 #16

This is possible only if your "parent" transaction moved funds to you.
Usually either the sender or the receiver can perform CPFP, since USUALLY they both have UTXOs in the transaction.

A "normal" transaction will look like this.

$SenderAddr -> { $RecieverAddr, $SenderChange }

So the TXN can be "pulled" out of the mempool by either the sender spending $SenderChange, or the receiver spending $RecieverAddr.

I would really love to see some wallet maker add a "CPFP This" button.  I've asked for as much and hopefully one of the wallets will consider doing this in 2015.  There are some bounties put on similar requests.

https://github.com/d4n13/bips/blob/master/bip-00nn.mediawiki

d4n13
Full Member
***
Offline Offline

Activity: 210
Merit: 101


“Create Your Decentralized Life”


View Profile
July 14, 2015, 04:32:46 AM
 #17

A "normal" transaction will look like this.

$SenderAddr -> { $RecieverAddr, $SenderChange }
Also a CPFP transaction would look like this (depending on who was doing the pulling)

Sender: $SenderChange -> $SenderChange

-or-

Reciever: $RecieverAddr -> $RecieverAddr

Paying straight back to the address your pulling is the ELI5 way to do it.  Those deeper in the tech would prefer to make a fresh Addr for each and every transaction.

d4n13
Full Member
***
Offline Offline

Activity: 210
Merit: 101


“Create Your Decentralized Life”


View Profile
July 14, 2015, 04:34:30 PM
 #18

This is not really ELI5, but below you will find a python script that creates a CPFP transaction
https://gist.github.com/d4n13/db762a50c6fa5049ff63

This will also give you the raw HEX transaction data to submit to Eligius

sleeptalkerz (OP)
Newbie
*
Offline Offline

Activity: 8
Merit: 0


View Profile
July 15, 2015, 06:36:50 PM
 #19

Wow  Tongue, so I finally able to get my Electrum updated, which was a whole thing (long story). After that I was able to follow the steps above to create a transaction and push it to Eligius. I didn't think it worked because it took about 12 hours, but finally the transactions went through. Thanks for the guidance everyone!
d4n13
Full Member
***
Offline Offline

Activity: 210
Merit: 101


“Create Your Decentralized Life”


View Profile
July 15, 2015, 09:41:21 PM
 #20

Wow  Tongue, so I finally able to get my Electrum updated, which was a whole thing (long story). After that I was able to follow the steps above to create a transaction and push it to Eligius. I didn't think it worked because it took about 12 hours, but finally the transactions went through. Thanks for the guidance everyone!
Yes Eligius is doing right by me... rescued my 188 hr old TX

Pages: [1] 2 »  All
  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!