Pages:
Author

Topic: A complete idiot's guide to child pays for parent? (Read 18853 times)

full member
Activity: 210
Merit: 104
“Create Your Decentralized Life”
Wrote a Python script to make CPFP transactions..

[HowTo] Use PyBitcoinTools to make CPFP transaction with tip to bounty Thread
full member
Activity: 210
Merit: 104
“Create Your Decentralized Life”
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
newbie
Activity: 8
Merit: 0
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!
full member
Activity: 210
Merit: 104
“Create Your Decentralized Life”
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
full member
Activity: 210
Merit: 104
“Create Your Decentralized Life”
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.
full member
Activity: 210
Merit: 104
“Create Your Decentralized Life”
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
staff
Activity: 3458
Merit: 6793
Just writing some code
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.
newbie
Activity: 8
Merit: 0
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.
staff
Activity: 3458
Merit: 6793
Just writing some code
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.
newbie
Activity: 8
Merit: 0
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.
staff
Activity: 3458
Merit: 6793
Just writing some code
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.
newbie
Activity: 8
Merit: 0
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?
staff
Activity: 3458
Merit: 6793
Just writing some code
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.
legendary
Activity: 1260
Merit: 1019
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.
newbie
Activity: 8
Merit: 0
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?
newbie
Activity: 8
Merit: 0
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.
sr. member
Activity: 475
Merit: 252
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.
sr. member
Activity: 475
Merit: 252
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.
newbie
Activity: 8
Merit: 0
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?
staff
Activity: 3458
Merit: 6793
Just writing some code
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
Pages:
Jump to: