Bitcoin Forum

Economy => Services => Topic started by: d4n13 on July 14, 2015, 11:42:34 PM



Title: [Unconfirmed TXs] non-profit transaction rescue service (starting at 0.003 BTC)
Post by: d4n13 on July 14, 2015, 11:42:34 PM
Service
I'm offering this service to pay for a developers bounty on CPFP (not for my own profit).

Why?
I have seen a number of threads from people complaining about unconfirmed transactions.  There is a way to pull these transactions out of the mempool with a degree of technical skill.  I'm willing to put my effort to work to craft the proper transaction to pull these unconfirmed transactions out of the mempool.  The cost for this is based on the unconfirmed transaction size, but will start at 3 mBTC (0.003 BTC).  All proceeds will be paid into the bounty to have CPFP integrated into one of the major wallets.  Basic process follows.

Disclaimer:
Users of this service will be required to sign the provided transaction.  On some wallet applications this is strait forward, on other wallet applications it is not.  I'll help out however I can, but I will not sign the CPFP transaction, nor will I accept any private keys to do this.  Please keep your private keys private.

Minimum Donation Schedule
____TX_Size____
____Min_Donation____
<1 KB - 5 KB
3 mBTC
>5 KB - 10 KB
4 mBTC
>10 KB - 15 KB
5 mBTC

Turn around time
About what you would expect from a volunteer.  I should be making transactions once a day, then send them back to you to sign.  I'll probably code the transactions between 01:00 UTC and 05:00 UTC, but no guarantees.  Once you sign the transaction you (or I) can submit it to the Eligius pool who will be doing the block.  They usually get about one block every 5 hours.

Contribute to the CPFP bounty anyway
If you would just like to see some client wallet implement a "Rescue Transaction" button using CPFP, feel free to the CPFP address.  Every mBTC helps...

What is Child Pays for Parent (CPFP)
I tried to explain it here (https://github.com/d4n13/bips/blob/master/bip-00nn.mediawiki) before I knew what it was.

Transactions in bitcoin are actually chained together.  Each transaction has an input and output.  New input links to old output.  So lets call the transaction you want to rescue the "parent".  To employ a CPFP rescue attempt, we create a new transaction ("child") that spends (links to) the parents outputs.  This new child transaction will be coded with generous fees.  When a CPFP miner like Eligius sees the pair of transactions, they are scooped up and included in the block.  So adding the high fee "child" transaction pulls the "parent" out of the mempool.

Sign me up!!
If have a transaction that is stuck that you want to rescue, here is how you proceed.
  • Post to this thread that you need a rescue.
  • Provide your transaction ID (either in your post, or in a PM to me)
  • Declare how much you want to contribute to the CPFP bounty (either in your post or via PM)
  • I'll take the transaction info and generated a raw transaction and send it to you via PM
  • Inspect the transaction with the transaction decoder (https://blockchain.info/decode-tx) to ensure your comfort
  • Verify that you see your address, the donation address, and the TX you are rescuing in the decode.
  • Sign the transaction with your bitcoin client, or any other method you choose
  • Either submit the transaction yourself, or PM me and I'll send it for you

What is a raw transaction, and how do I sign it?
I'll post a HowTo below to discuss how to sign raw transactions on various clients.

Is this a scam?
No... the "rescue transaction" will have the donation in it.  Your donation only goes through if the rescue works.  The donation address is also a 2-3 multisig address, so I can't unlock the funds myself.

Wait... where's the donation address?
I'm gathering some info to generate it shortly... stay tuned... for now just let me know if you need help, I'll work the rest out with you shortly.


Title: Re: [Unconfirmed TXs] non-profit transaction rescue service (starting at 0.003 BTC)
Post by: d4n13 on July 14, 2015, 11:44:42 PM
How to Sign Raw Transactions

    Bitcoin-Qt: https://bitcoin.org/en/developer-reference#signrawtransaction
    MultiBit HD: You can't https://groups.google.com/forum/#!topic/bitcoin-multibit/KQn2X7TfY3E
    Armory: https://bitcoinarmory.com/tutorials/armory-advanced-features/offline-wallets/
    Electrum: https://electrum.orain.org/wiki/Frequently_Asked_Questions#Can_Electrum_create_and_sign_raw_transactions.3F
    mSigma: Code sighting... https://github.com/ciphrex/mSIGNA/blob/master/src/mainwindow.cpp#L420
    bither: Code sighting... https://github.com/bither/bither-desktop-java/blob/master/src/main/java/net/bither/viewsystem/froms/ColdDefaultPanel.java#L36
    Other: https://bitcoin.stackexchange.com/questions/13034/is-there-a-user-friendly-tool-for-creating-and-signing-raw-transactions
    Genric https://brainwallet.org/#tx

Others in a bit


Title: Re: [Unconfirmed TXs] non-profit transaction rescue service (starting at 0.003 BTC)
Post by: d4n13 on July 14, 2015, 11:45:17 PM
References:
  • My old BIP proposal (http://lists.linuxfoundation.org/pipermail/bitcoin-dev/2015-July/009304.html)
  • My "reference" implementation using Bitcoin-RPC and Python (https://gist.github.com/d4n13/db762a50c6fa5049ff63)
  • CPFP thread on dev-bitcoin (http://lists.linuxfoundation.org/pipermail/bitcoin-dev/2015-July/009375.html)
  • Bounty fundraising campaign thread (https://bitcointalk.org/index.php?topic=1123441.0)
  • Bounty offered to developers (https://bitcointalk.org/index.php?topic=1123464.0)
  • RBF (different technique) thread (https://bitcointalk.org/index.php?topic=179612.0)


Title: Re: [Unconfirmed TXs] non-profit transaction rescue service (starting at 0.003 BTC)
Post by: turvarya on July 15, 2015, 06:38:04 AM
Since I heard about CPFP, I wonder, if it doesn't enable easier double spends.
Does the receiving address have to stay the same? Couldn't that be changed pretty quick, should miners go rough?


Title: Re: [Unconfirmed TXs] non-profit transaction rescue service (starting at 0.003 BTC)
Post by: d4n13 on July 15, 2015, 06:46:21 AM
Since I heard about CPFP, I wonder, if it doesn't enable easier double spends.
Does the receiving address have to stay the same? Couldn't that be changed pretty quick, should miners go rough?
Any change address can be used.  It's just the nature of me trying to do this second hand.  Since any change address I generated will be useless to the person trying to get the TX out of hock.  My script recycles address so that I don't have to ask for a list of addresses from people.

Just makes it simpler for me to hand (python) code the TX... no other reason


Title: Re: [Unconfirmed TXs] non-profit transaction rescue service (starting at 0.003 BTC)
Post by: pooya87 on July 16, 2015, 06:34:18 AM
interesting service.
for signing raw transactions you can add brainwallet to the list too.
https://brainwallet.org/#tx


Title: Re: [Unconfirmed TXs] non-profit transaction rescue service (starting at 0.003 BTC)
Post by: d4n13 on July 16, 2015, 03:45:13 PM
interesting service.
for signing raw transactions you can add brainwallet to the list too.
https://brainwallet.org/#tx
Signing appears to be broken in latest branch...
https://github.com/brainwallet/brainwallet.github.io/issues/80


Title: Re: [Unconfirmed TXs] non-profit transaction rescue service (starting at 0.003 BTC)
Post by: turvarya on July 16, 2015, 04:41:40 PM
Since I heard about CPFP, I wonder, if it doesn't enable easier double spends.
Does the receiving address have to stay the same? Couldn't that be changed pretty quick, should miners go rough?
Any change address can be used.  It's just the nature of me trying to do this second hand.  Since any change address I generated will be useless to the person trying to get the TX out of hock.  My script recycles address so that I don't have to ask for a list of addresses from people.

Just makes it simpler for me to hand (python) code the TX... no other reason
That didn't answer my question, or maybe I just didn't understand it.

So, let's say we have address A (1BTC) which sends to address B(merchant: 0.7 BTC) and address C(change 0.2BTC) so it's 0.1 BTC fee.
So, can I change receiving address B? Or can I just say, there is less going to C, so the fee gets higher, but then I also could say there is less going to B, so the merchant gets less money.


Title: Re: [Unconfirmed TXs] non-profit transaction rescue service (starting at 0.003 BTC)
Post by: d4n13 on July 16, 2015, 07:03:19 PM
So, let's say we have address A (1BTC) which sends to address B(merchant: 0.7 BTC) and address C(change 0.2BTC) so it's 0.1 BTC fee.
So, can I change receiving address B? Or can I just say, there is less going to C, so the fee gets higher, but then I also could say there is less going to B, so the merchant gets less money.

You don't replace anything, you just sweep your change address (C) (if you own the change addr) back to itself.  If your the recipient (B) who wants to sweep a transaction they you just sweep the receipt address

Code:
CPFP initiated from Change address (C)
====== Unconfirmed TX ======|== CPFP TX ===
{ A: 1.00 } -> { B: 0.70 }  |
            \> { C: 0.20 } -|-> { C: 0.01 }
               Fee: 0.10        Fee: 0.19

==OR==

CPFP initiated from Recieving address (B)
====== Unconfirmed TX ======|== CPFP TX ===
{ A: 1.00 } -> { B: 0.70 } -|-> { B: 0.51 }
            \> { C: 0.20 }  |
               Fee: 0.10        Fee: 0.19

Examples of this in action:
Unconfirmed TX (https://tradeblock.com/blockchain/tx/358762a9f2fcbd141eae29a8df82a822930428605f4a033e53baaaa377d3df4a)
CPFP TX (https://tradeblock.com/blockchain/tx/8ef3eec72db231feedc1d5e1e5b24f36e290c94344f86822202378320f8380d9)

Again... this is a hack... If you want to do it right you generate a new address for each and every transaction always and forever and ever and ever... ;)

I'm handing out free lunch here... guess I wasn't worried too much about overcooking the chicken...


Title: Re: [Unconfirmed TXs] non-profit transaction rescue service (starting at 0.003 BTC)
Post by: d4n13 on July 17, 2015, 04:44:08 AM
interesting service.
for signing raw transactions you can add brainwallet to the list too.
https://brainwallet.org/#tx
I've been playing with PyBitcoinTools (https://github.com/vbuterin/pybitcointools) and it looks like it might be a good generic transaction signing service.

I've open-sourced (lol) the way I'm making the CPFP transactions... so anyone can make their own if they don't want to make the donation.
Use PyBitcoin to make CPFP transaction with tip to bounty (https://gist.github.com/d4n13/579df081ca42ec956506)

Anyway... I'll start cutting transactions tomorrow... cheers.


Title: Re: [Unconfirmed TXs] non-profit transaction rescue service (starting at 0.003 BTC)
Post by: d4n13 on July 17, 2015, 05:05:58 AM
I have tested this on testnet and looks real good...

Unsigned CPFP txID: 504658563f231e71f79312e96da2cc13e779875ac262269b1b8f9f04e527dfc9 (https://bitcointalk.org/index.php?topic=1125454.msg11891983#msg11891983)
Code:
0100000001c9df27e5049f8f1b9b2662c25a8779e713cca26de91293f7711e233f565846500000000000ffffffff02c0912100000000001976a9148c3279620a52d619ebcd35ae291be00ba70f425788ac605b03000000000017a914948c74ad2e6cbc753812ebba1dc05f0bd088fbfa8700000000

To sign and send using PyBitcoinTools (https://github.com/vbuterin/pybitcointools), do the following
Code:
pybtctool signall $rawtx $privkey | pybtctool -s send
Where $rawtx and $privkey are replaced with the appropriate strings.


Title: Re: [Unconfirmed TXs] non-profit transaction rescue service (starting at 0.003 BTC)
Post by: turvarya on July 17, 2015, 06:21:09 AM
So, let's say we have address A (1BTC) which sends to address B(merchant: 0.7 BTC) and address C(change 0.2BTC) so it's 0.1 BTC fee.
So, can I change receiving address B? Or can I just say, there is less going to C, so the fee gets higher, but then I also could say there is less going to B, so the merchant gets less money.

You don't replace anything, you just sweep your change address (C) (if you own the change addr) back to itself.  If your the recipient (B) who wants to sweep a transaction they you just sweep the receipt address

Code:
CPFP initiated from Change address (C)
====== Unconfirmed TX ======|== CPFP TX ===
{ A: 1.00 } -> { B: 0.70 }  |
            \> { C: 0.20 } -|-> { C: 0.01 }
               Fee: 0.10        Fee: 0.19

==OR==

CPFP initiated from Recieving address (B)
====== Unconfirmed TX ======|== CPFP TX ===
{ A: 1.00 } -> { B: 0.70 } -|-> { B: 0.51 }
            \> { C: 0.20 }  |
               Fee: 0.10        Fee: 0.19

Examples of this in action:
Unconfirmed TX (https://tradeblock.com/blockchain/tx/358762a9f2fcbd141eae29a8df82a822930428605f4a033e53baaaa377d3df4a)
CPFP TX (https://tradeblock.com/blockchain/tx/8ef3eec72db231feedc1d5e1e5b24f36e290c94344f86822202378320f8380d9)

Again... this is a hack... If you want to do it right you generate a new address for each and every transaction always and forever and ever and ever... ;)

I'm handing out free lunch here... guess I wasn't worried too much about overcooking the chicken...
OK, thanks, that makes sense.
But what if, there is no C or C is just too small to give a good additional fee? Is there a workaround for that?


Title: Re: [Unconfirmed TXs] non-profit transaction rescue service (starting at 0.003 BTC)
Post by: d4n13 on July 17, 2015, 08:42:40 AM
if C is to small then I have no easy way to get the tx for them.  they will have to do it themselves.



Title: Re: [Unconfirmed TXs] non-profit transaction rescue service (starting at 0.003 BTC)
Post by: arnuschky on July 26, 2015, 10:23:19 PM

The link to your reference implementation is broken, BTW. If anyone is interested: here's the link to the PR that implements CPFP for bitcoin core.