* Re: [Bitcoin-development] Cost savings by using replace-by-fee, 30-90% @ 2015-05-26 18:43 Raystonn 2015-05-26 20:12 ` Allen Piscitello 0 siblings, 1 reply; 15+ messages in thread From: Raystonn @ 2015-05-26 18:43 UTC (permalink / raw) To: Allen Piscitello; +Cc: Bitcoin Dev [-- Attachment #1: Type: text/html, Size: 7392 bytes --] ^ permalink raw reply [flat|nested] 15+ messages in thread
* Re: [Bitcoin-development] Cost savings by using replace-by-fee, 30-90% 2015-05-26 18:43 [Bitcoin-development] Cost savings by using replace-by-fee, 30-90% Raystonn @ 2015-05-26 20:12 ` Allen Piscitello 0 siblings, 0 replies; 15+ messages in thread From: Allen Piscitello @ 2015-05-26 20:12 UTC (permalink / raw) To: Raystonn; +Cc: Bitcoin Dev [-- Attachment #1: Type: text/plain, Size: 5670 bytes --] I am not the one presenting this as some kind of novel attack on transactions in general. On Tue, May 26, 2015 at 1:43 PM, Raystonn <raystonn@hotmail.com> wrote: > Trust, regulation, law, and the threat of force. Are you serious? > On 26 May 2015 11:38 am, Allen Piscitello <allen.piscitello@gmail.com> > wrote: > > What prevents you from writing a bad check using today's systems? > > On Tue, May 26, 2015 at 1:22 PM, Danny Thorpe <danny.thorpe@gmail.com> > wrote: > > What prevents RBF from being used for fraudulent payment reversals? > > Pay 1BTC to Alice for hard goods, then after you receive the goods > broadcast a double spend of that transaction to pay Alice nothing? Your > only cost is the higher network fee of the 2nd tx. > > Thanks, > -Danny > > On Mon, May 25, 2015 at 5:10 PM, Peter Todd <pete@petertodd.org> wrote: > > On Tue, May 26, 2015 at 12:03:09AM +0200, Mike Hearn wrote: > > CPFP also solves it just fine. > > CPFP is a significantly more expensive way of paying fees than RBF, > particularly for the use-case of defragmenting outputs, with cost > savings ranging from 30% to 90% > > > Case 1: CPFP vs. RBF for increasing the fee on a single tx > ---------------------------------------------------------- > > Creating an spending a P2PKH output uses 34 bytes of txout, and 148 > bytes of txin, 182 bytes total. > > Let's suppose I have a 1 BTC P2PKH output and I want to pay 0.1 BTC to > Alice. This results in a 1in/2out transaction t1 that's 226 bytes in size. > I forget to click on the "priority fee" option, so it goes out with the > minimum fee of 2.26uBTC. Whoops! I use CPFP to spend that output, > creating a new transaction t2 that's 192 bytes in size. I want to pay > 1mBTC/KB for a fast confirmation, so I'm now paying 418uBTC of > transaction fees. > > On the other hand, had I use RBF, my wallet would have simply > rebroadcast t1 with the change address decreased. The rules require you > to pay 2.26uBTC for the bandwidth consumed broadcasting it, plus the new > fee level, or 218uBTC of fees in total. > > Cost savings: 48% > > > Case 2: Paying multiple recipients in succession > ------------------------------------------------ > > Suppose that after I pay Alice, I also decide to pay Bob for his hard > work demonstrating cryptographic protocols. I need to create a new > transaction t2 spending t1's change address. Normally t2 would be > another 226 bytes in size, resulting in 226uBTC additional fees. > > With RBF on the other hand I can simply double-spend t1 with a > transaction paying both Alice and Bob. This new transaction is 260 bytes > in size. I have to pay 2.6uBTC additional fees to pay for the bandwidth > consumed broadcasting it, resulting in an additional 36uBTC of fees. > > Cost savings: 84% > > > Case 3: Paying multiple recipients from a 2-of-3 multisig wallet > ---------------------------------------------------------------- > > The above situation gets even worse with multisig. t1 in the multisig > case is 367 bytes; t2 another 367 bytes, costing an additional 367uBTC > in fees. With RBF we rewrite t1 with an additional output, resulting in > a 399 byte transaction, with just 36uBTC in additional fees. > > Cost savings: 90% > > > Case 4: Dust defragmentation > ---------------------------- > > My wallet has a two transaction outputs that it wants to combine into > one for the purpose of UTXO defragmentation. It broadcasts transaction > t1 with two inputs and one output, size 340 bytes, paying zero fees. > > Prior to the transaction confirming I find I need to spend those funds > for a priority transaction at the 1mBTC/KB fee level. This transaction, > t2a, has one input and two outputs, 226 bytes in size. However it needs > to pay fees for both transactions at once, resulting in a combined total > fee of 556uBTC. If this situation happens frequently, defragmenting > UTXOs is likely to cost more in additional fees than it saves. > > With RBF I'd simply doublespend t1 with a 2-in-2-out transaction 374 > bytes in size, paying 374uBTC. Even better, if one of the two inputs is > sufficiently large to cover my costs I can doublespend t1 with a > 1-in-2-out tx just 226 bytes in size, paying 226uBTC. > > Cost savings: 32% to 59%, or even infinite if defragmentation w/o RBF > costs you more than you save > > -- > 'peter'[:-1]@petertodd.org > 0000000000000000134ce6577d4122094479f548b997baf84367eaf0c190bc9f > > > ------------------------------------------------------------------------------ > One dashboard for servers and applications across Physical-Virtual-Cloud > Widest out-of-the-box monitoring support with 50+ applications > Performance metrics, stats and reports that give you Actionable Insights > Deep dive visibility with transaction tracing using APM Insight. > http://ad.doubleclick.net/ddm/clk/290420510;117567292;y > _______________________________________________ > Bitcoin-development mailing list > Bitcoin-development@lists.sourceforge.net > https://lists.sourceforge.net/lists/listinfo/bitcoin-development > > > > > ------------------------------------------------------------------------------ > One dashboard for servers and applications across Physical-Virtual-Cloud > Widest out-of-the-box monitoring support with 50+ applications > Performance metrics, stats and reports that give you Actionable Insights > Deep dive visibility with transaction tracing using APM Insight. > http://ad.doubleclick.net/ddm/clk/290420510;117567292;y > _______________________________________________ > Bitcoin-development mailing list > Bitcoin-development@lists.sourceforge.net > https://lists.sourceforge.net/lists/listinfo/bitcoin-development > > > [-- Attachment #2: Type: text/html, Size: 7806 bytes --] ^ permalink raw reply [flat|nested] 15+ messages in thread
* [Bitcoin-development] A suggestion for reducing the size of the UTXO database @ 2015-05-09 17:09 Jim Phillips 2015-05-25 18:44 ` Mike Hearn 0 siblings, 1 reply; 15+ messages in thread From: Jim Phillips @ 2015-05-09 17:09 UTC (permalink / raw) To: bitcoin-development [-- Attachment #1: Type: text/plain, Size: 2877 bytes --] Forgive me if this idea has been suggested before, but I made this suggestion on reddit and I got some feedback recommending I also bring it to this list -- so here goes. I wonder if there isn't perhaps a simpler way of dealing with UTXO growth. What if, rather than deal with the issue at the protocol level, we deal with it at the source of the problem -- the wallets. Right now, the typical wallet selects only the minimum number of unspent outputs when building a transaction. The goal is to keep the transaction size to a minimum so that the fee stays low. Consequently, lots of unspent outputs just don't get used, and are left lying around until some point in the future. What if we started designing wallets to consolidate unspent outputs? When selecting unspent outputs for a transaction, rather than choosing just the minimum number from a particular address, why not select them ALL? Take all of the UTXOs from a particular address or wallet, send however much needs to be spent to the payee, and send the rest back to the same address or a change address as a single output? Through this method, we should wind up shrinking the UTXO database over time rather than growing it with each transaction. Obviously, as Bitcoin gains wider adoption, the UTXO database will grow, simply because there are 7 billion people in the world, and eventually a good percentage of them will have one or more wallets with spendable bitcoin. But this idea could limit the growth at least. The vast majority of users are running one of a handful of different wallet apps: Core, Electrum; Armory; Mycelium; Breadwallet; Coinbase; Circle; Blockchain.info; and maybe a few others. The developers of all these wallets have a vested interest in the continued usefulness of Bitcoin, and so should not be opposed to changing their UTXO selection algorithms to one that reduces the UTXO database instead of growing it. From the miners perspective, even though these types of transactions would be larger, the fee could stay low. Miners actually benefit from them in that it reduces the amount of storage they need to dedicate to holding the UTXO. So miners are incentivized to mine these types of transactions with a higher priority despite a low fee. Relays could also get in on the action and enforce this type of behavior by refusing to relay or deprioritizing the relay of transactions that don't use all of the available UTXOs from the addresses used as inputs. Relays are not only the ones who benefit the most from a reduction of the UTXO database, they're also in the best position to promote good behavior. -- *James G. Phillips IV* <https://plus.google.com/u/0/113107039501292625391/posts> *"Don't bunt. Aim out of the ball park. Aim for the company of immortals." -- David Ogilvy* *This message was created with 100% recycled electrons. Please think twice before printing.* [-- Attachment #2: Type: text/html, Size: 3558 bytes --] ^ permalink raw reply [flat|nested] 15+ messages in thread
* Re: [Bitcoin-development] A suggestion for reducing the size of the UTXO database 2015-05-09 17:09 [Bitcoin-development] A suggestion for reducing the size of the UTXO database Jim Phillips @ 2015-05-25 18:44 ` Mike Hearn 2015-05-25 21:26 ` Peter Todd 0 siblings, 1 reply; 15+ messages in thread From: Mike Hearn @ 2015-05-25 18:44 UTC (permalink / raw) To: Jim Phillips; +Cc: Bitcoin Dev [-- Attachment #1: Type: text/plain, Size: 1165 bytes --] Wallets are incentivised to do a better job with defragmentation already, as if you have lots of tiny UTXOs then your fees end up being huge when trying to make a payment. The reason they largely don't is just one of manpower. Nobody is working on it. As a wallet developer myself, one way I'd like to see this issue be fixed by making free transactions more reliable. Then wallets can submit free transactions to the network to consolidate UTXOs together, e.g. at night when the user is sleeping. They would then fit into whatever space is available in the block during periods of low demand, like on Sunday. If we don't do this then wallets won't automatically defragment, as we'd be unable to explain to the user why their money is slowly leaking out of their wallet without them doing anything. Trying to explain the existing transaction fees is hard enough already ("I thought bitcoin doesn't have banks" etc). There is another way: as the fee is based on a rounded 1kb calculation, if you go into the next fee band adding some more outputs and making a bigger change output becomes "free" for another output or two. But wallets don't exploit this today. [-- Attachment #2: Type: text/html, Size: 1483 bytes --] ^ permalink raw reply [flat|nested] 15+ messages in thread
* Re: [Bitcoin-development] A suggestion for reducing the size of the UTXO database 2015-05-25 18:44 ` Mike Hearn @ 2015-05-25 21:26 ` Peter Todd 2015-05-25 22:03 ` Mike Hearn 0 siblings, 1 reply; 15+ messages in thread From: Peter Todd @ 2015-05-25 21:26 UTC (permalink / raw) To: Mike Hearn; +Cc: Bitcoin Dev [-- Attachment #1: Type: text/plain, Size: 1384 bytes --] On Mon, May 25, 2015 at 08:44:18PM +0200, Mike Hearn wrote: > Wallets are incentivised to do a better job with defragmentation already, > as if you have lots of tiny UTXOs then your fees end up being huge when > trying to make a payment. > > The reason they largely don't is just one of manpower. Nobody is working on > it. > > As a wallet developer myself, one way I'd like to see this issue be fixed > by making free transactions more reliable. Then wallets can submit free > transactions to the network to consolidate UTXOs together, e.g. at night > when the user is sleeping. They would then fit into whatever space is > available in the block during periods of low demand, like on Sunday. This can cause problems as until those transactions confirm, even more of the user's outputs are unavailable for spending, causing confusion as to why they can't send their full balance. It's also inefficient, as in the case where the user does try to send a small payment that could be satisfied by one or more of these small UTXO's, the wallet has to use a larger UTXO. With replace-by-fee however this problem goes away, as you can simply double-spend the pending defragmentation transactions instead if they are still unconfirmed when you need to use them. -- 'peter'[:-1]@petertodd.org 00000000000000000aa9033c06c10d6131eafa3754c3157d74c2267c1dd2ca35 [-- Attachment #2: Digital signature --] [-- Type: application/pgp-signature, Size: 650 bytes --] ^ permalink raw reply [flat|nested] 15+ messages in thread
* Re: [Bitcoin-development] A suggestion for reducing the size of the UTXO database 2015-05-25 21:26 ` Peter Todd @ 2015-05-25 22:03 ` Mike Hearn 2015-05-26 0:10 ` [Bitcoin-development] Cost savings by using replace-by-fee, 30-90% Peter Todd 0 siblings, 1 reply; 15+ messages in thread From: Mike Hearn @ 2015-05-25 22:03 UTC (permalink / raw) To: Peter Todd; +Cc: Bitcoin Dev [-- Attachment #1: Type: text/plain, Size: 31 bytes --] CPFP also solves it just fine. [-- Attachment #2: Type: text/html, Size: 52 bytes --] ^ permalink raw reply [flat|nested] 15+ messages in thread
* [Bitcoin-development] Cost savings by using replace-by-fee, 30-90% 2015-05-25 22:03 ` Mike Hearn @ 2015-05-26 0:10 ` Peter Todd 2015-05-26 18:22 ` Danny Thorpe 2015-05-26 20:30 ` joliver 0 siblings, 2 replies; 15+ messages in thread From: Peter Todd @ 2015-05-26 0:10 UTC (permalink / raw) To: Mike Hearn; +Cc: Bitcoin Dev [-- Attachment #1: Type: text/plain, Size: 3521 bytes --] On Tue, May 26, 2015 at 12:03:09AM +0200, Mike Hearn wrote: > CPFP also solves it just fine. CPFP is a significantly more expensive way of paying fees than RBF, particularly for the use-case of defragmenting outputs, with cost savings ranging from 30% to 90% Case 1: CPFP vs. RBF for increasing the fee on a single tx ---------------------------------------------------------- Creating an spending a P2PKH output uses 34 bytes of txout, and 148 bytes of txin, 182 bytes total. Let's suppose I have a 1 BTC P2PKH output and I want to pay 0.1 BTC to Alice. This results in a 1in/2out transaction t1 that's 226 bytes in size. I forget to click on the "priority fee" option, so it goes out with the minimum fee of 2.26uBTC. Whoops! I use CPFP to spend that output, creating a new transaction t2 that's 192 bytes in size. I want to pay 1mBTC/KB for a fast confirmation, so I'm now paying 418uBTC of transaction fees. On the other hand, had I use RBF, my wallet would have simply rebroadcast t1 with the change address decreased. The rules require you to pay 2.26uBTC for the bandwidth consumed broadcasting it, plus the new fee level, or 218uBTC of fees in total. Cost savings: 48% Case 2: Paying multiple recipients in succession ------------------------------------------------ Suppose that after I pay Alice, I also decide to pay Bob for his hard work demonstrating cryptographic protocols. I need to create a new transaction t2 spending t1's change address. Normally t2 would be another 226 bytes in size, resulting in 226uBTC additional fees. With RBF on the other hand I can simply double-spend t1 with a transaction paying both Alice and Bob. This new transaction is 260 bytes in size. I have to pay 2.6uBTC additional fees to pay for the bandwidth consumed broadcasting it, resulting in an additional 36uBTC of fees. Cost savings: 84% Case 3: Paying multiple recipients from a 2-of-3 multisig wallet ---------------------------------------------------------------- The above situation gets even worse with multisig. t1 in the multisig case is 367 bytes; t2 another 367 bytes, costing an additional 367uBTC in fees. With RBF we rewrite t1 with an additional output, resulting in a 399 byte transaction, with just 36uBTC in additional fees. Cost savings: 90% Case 4: Dust defragmentation ---------------------------- My wallet has a two transaction outputs that it wants to combine into one for the purpose of UTXO defragmentation. It broadcasts transaction t1 with two inputs and one output, size 340 bytes, paying zero fees. Prior to the transaction confirming I find I need to spend those funds for a priority transaction at the 1mBTC/KB fee level. This transaction, t2a, has one input and two outputs, 226 bytes in size. However it needs to pay fees for both transactions at once, resulting in a combined total fee of 556uBTC. If this situation happens frequently, defragmenting UTXOs is likely to cost more in additional fees than it saves. With RBF I'd simply doublespend t1 with a 2-in-2-out transaction 374 bytes in size, paying 374uBTC. Even better, if one of the two inputs is sufficiently large to cover my costs I can doublespend t1 with a 1-in-2-out tx just 226 bytes in size, paying 226uBTC. Cost savings: 32% to 59%, or even infinite if defragmentation w/o RBF costs you more than you save -- 'peter'[:-1]@petertodd.org 0000000000000000134ce6577d4122094479f548b997baf84367eaf0c190bc9f [-- Attachment #2: Digital signature --] [-- Type: application/pgp-signature, Size: 650 bytes --] ^ permalink raw reply [flat|nested] 15+ messages in thread
* Re: [Bitcoin-development] Cost savings by using replace-by-fee, 30-90% 2015-05-26 0:10 ` [Bitcoin-development] Cost savings by using replace-by-fee, 30-90% Peter Todd @ 2015-05-26 18:22 ` Danny Thorpe 2015-05-26 18:38 ` Allen Piscitello ` (3 more replies) 2015-05-26 20:30 ` joliver 1 sibling, 4 replies; 15+ messages in thread From: Danny Thorpe @ 2015-05-26 18:22 UTC (permalink / raw) To: Peter Todd; +Cc: Bitcoin Dev [-- Attachment #1: Type: text/plain, Size: 4553 bytes --] What prevents RBF from being used for fraudulent payment reversals? Pay 1BTC to Alice for hard goods, then after you receive the goods broadcast a double spend of that transaction to pay Alice nothing? Your only cost is the higher network fee of the 2nd tx. Thanks, -Danny On Mon, May 25, 2015 at 5:10 PM, Peter Todd <pete@petertodd.org> wrote: > On Tue, May 26, 2015 at 12:03:09AM +0200, Mike Hearn wrote: > > CPFP also solves it just fine. > > CPFP is a significantly more expensive way of paying fees than RBF, > particularly for the use-case of defragmenting outputs, with cost > savings ranging from 30% to 90% > > > Case 1: CPFP vs. RBF for increasing the fee on a single tx > ---------------------------------------------------------- > > Creating an spending a P2PKH output uses 34 bytes of txout, and 148 > bytes of txin, 182 bytes total. > > Let's suppose I have a 1 BTC P2PKH output and I want to pay 0.1 BTC to > Alice. This results in a 1in/2out transaction t1 that's 226 bytes in size. > I forget to click on the "priority fee" option, so it goes out with the > minimum fee of 2.26uBTC. Whoops! I use CPFP to spend that output, > creating a new transaction t2 that's 192 bytes in size. I want to pay > 1mBTC/KB for a fast confirmation, so I'm now paying 418uBTC of > transaction fees. > > On the other hand, had I use RBF, my wallet would have simply > rebroadcast t1 with the change address decreased. The rules require you > to pay 2.26uBTC for the bandwidth consumed broadcasting it, plus the new > fee level, or 218uBTC of fees in total. > > Cost savings: 48% > > > Case 2: Paying multiple recipients in succession > ------------------------------------------------ > > Suppose that after I pay Alice, I also decide to pay Bob for his hard > work demonstrating cryptographic protocols. I need to create a new > transaction t2 spending t1's change address. Normally t2 would be > another 226 bytes in size, resulting in 226uBTC additional fees. > > With RBF on the other hand I can simply double-spend t1 with a > transaction paying both Alice and Bob. This new transaction is 260 bytes > in size. I have to pay 2.6uBTC additional fees to pay for the bandwidth > consumed broadcasting it, resulting in an additional 36uBTC of fees. > > Cost savings: 84% > > > Case 3: Paying multiple recipients from a 2-of-3 multisig wallet > ---------------------------------------------------------------- > > The above situation gets even worse with multisig. t1 in the multisig > case is 367 bytes; t2 another 367 bytes, costing an additional 367uBTC > in fees. With RBF we rewrite t1 with an additional output, resulting in > a 399 byte transaction, with just 36uBTC in additional fees. > > Cost savings: 90% > > > Case 4: Dust defragmentation > ---------------------------- > > My wallet has a two transaction outputs that it wants to combine into > one for the purpose of UTXO defragmentation. It broadcasts transaction > t1 with two inputs and one output, size 340 bytes, paying zero fees. > > Prior to the transaction confirming I find I need to spend those funds > for a priority transaction at the 1mBTC/KB fee level. This transaction, > t2a, has one input and two outputs, 226 bytes in size. However it needs > to pay fees for both transactions at once, resulting in a combined total > fee of 556uBTC. If this situation happens frequently, defragmenting > UTXOs is likely to cost more in additional fees than it saves. > > With RBF I'd simply doublespend t1 with a 2-in-2-out transaction 374 > bytes in size, paying 374uBTC. Even better, if one of the two inputs is > sufficiently large to cover my costs I can doublespend t1 with a > 1-in-2-out tx just 226 bytes in size, paying 226uBTC. > > Cost savings: 32% to 59%, or even infinite if defragmentation w/o RBF > costs you more than you save > > -- > 'peter'[:-1]@petertodd.org > 0000000000000000134ce6577d4122094479f548b997baf84367eaf0c190bc9f > > > ------------------------------------------------------------------------------ > One dashboard for servers and applications across Physical-Virtual-Cloud > Widest out-of-the-box monitoring support with 50+ applications > Performance metrics, stats and reports that give you Actionable Insights > Deep dive visibility with transaction tracing using APM Insight. > http://ad.doubleclick.net/ddm/clk/290420510;117567292;y > _______________________________________________ > Bitcoin-development mailing list > Bitcoin-development@lists.sourceforge.net > https://lists.sourceforge.net/lists/listinfo/bitcoin-development > > [-- Attachment #2: Type: text/html, Size: 5608 bytes --] ^ permalink raw reply [flat|nested] 15+ messages in thread
* Re: [Bitcoin-development] Cost savings by using replace-by-fee, 30-90% 2015-05-26 18:22 ` Danny Thorpe @ 2015-05-26 18:38 ` Allen Piscitello 2015-05-26 18:42 ` Aaron Voisine ` (2 subsequent siblings) 3 siblings, 0 replies; 15+ messages in thread From: Allen Piscitello @ 2015-05-26 18:38 UTC (permalink / raw) To: Danny Thorpe; +Cc: Bitcoin Dev [-- Attachment #1: Type: text/plain, Size: 5438 bytes --] What prevents you from writing a bad check using today's systems? On Tue, May 26, 2015 at 1:22 PM, Danny Thorpe <danny.thorpe@gmail.com> wrote: > What prevents RBF from being used for fraudulent payment reversals? > > Pay 1BTC to Alice for hard goods, then after you receive the goods > broadcast a double spend of that transaction to pay Alice nothing? Your > only cost is the higher network fee of the 2nd tx. > > Thanks, > -Danny > > On Mon, May 25, 2015 at 5:10 PM, Peter Todd <pete@petertodd.org> wrote: > >> On Tue, May 26, 2015 at 12:03:09AM +0200, Mike Hearn wrote: >> > CPFP also solves it just fine. >> >> CPFP is a significantly more expensive way of paying fees than RBF, >> particularly for the use-case of defragmenting outputs, with cost >> savings ranging from 30% to 90% >> >> >> Case 1: CPFP vs. RBF for increasing the fee on a single tx >> ---------------------------------------------------------- >> >> Creating an spending a P2PKH output uses 34 bytes of txout, and 148 >> bytes of txin, 182 bytes total. >> >> Let's suppose I have a 1 BTC P2PKH output and I want to pay 0.1 BTC to >> Alice. This results in a 1in/2out transaction t1 that's 226 bytes in size. >> I forget to click on the "priority fee" option, so it goes out with the >> minimum fee of 2.26uBTC. Whoops! I use CPFP to spend that output, >> creating a new transaction t2 that's 192 bytes in size. I want to pay >> 1mBTC/KB for a fast confirmation, so I'm now paying 418uBTC of >> transaction fees. >> >> On the other hand, had I use RBF, my wallet would have simply >> rebroadcast t1 with the change address decreased. The rules require you >> to pay 2.26uBTC for the bandwidth consumed broadcasting it, plus the new >> fee level, or 218uBTC of fees in total. >> >> Cost savings: 48% >> >> >> Case 2: Paying multiple recipients in succession >> ------------------------------------------------ >> >> Suppose that after I pay Alice, I also decide to pay Bob for his hard >> work demonstrating cryptographic protocols. I need to create a new >> transaction t2 spending t1's change address. Normally t2 would be >> another 226 bytes in size, resulting in 226uBTC additional fees. >> >> With RBF on the other hand I can simply double-spend t1 with a >> transaction paying both Alice and Bob. This new transaction is 260 bytes >> in size. I have to pay 2.6uBTC additional fees to pay for the bandwidth >> consumed broadcasting it, resulting in an additional 36uBTC of fees. >> >> Cost savings: 84% >> >> >> Case 3: Paying multiple recipients from a 2-of-3 multisig wallet >> ---------------------------------------------------------------- >> >> The above situation gets even worse with multisig. t1 in the multisig >> case is 367 bytes; t2 another 367 bytes, costing an additional 367uBTC >> in fees. With RBF we rewrite t1 with an additional output, resulting in >> a 399 byte transaction, with just 36uBTC in additional fees. >> >> Cost savings: 90% >> >> >> Case 4: Dust defragmentation >> ---------------------------- >> >> My wallet has a two transaction outputs that it wants to combine into >> one for the purpose of UTXO defragmentation. It broadcasts transaction >> t1 with two inputs and one output, size 340 bytes, paying zero fees. >> >> Prior to the transaction confirming I find I need to spend those funds >> for a priority transaction at the 1mBTC/KB fee level. This transaction, >> t2a, has one input and two outputs, 226 bytes in size. However it needs >> to pay fees for both transactions at once, resulting in a combined total >> fee of 556uBTC. If this situation happens frequently, defragmenting >> UTXOs is likely to cost more in additional fees than it saves. >> >> With RBF I'd simply doublespend t1 with a 2-in-2-out transaction 374 >> bytes in size, paying 374uBTC. Even better, if one of the two inputs is >> sufficiently large to cover my costs I can doublespend t1 with a >> 1-in-2-out tx just 226 bytes in size, paying 226uBTC. >> >> Cost savings: 32% to 59%, or even infinite if defragmentation w/o RBF >> costs you more than you save >> >> -- >> 'peter'[:-1]@petertodd.org >> 0000000000000000134ce6577d4122094479f548b997baf84367eaf0c190bc9f >> >> >> ------------------------------------------------------------------------------ >> One dashboard for servers and applications across Physical-Virtual-Cloud >> Widest out-of-the-box monitoring support with 50+ applications >> Performance metrics, stats and reports that give you Actionable Insights >> Deep dive visibility with transaction tracing using APM Insight. >> http://ad.doubleclick.net/ddm/clk/290420510;117567292;y >> _______________________________________________ >> Bitcoin-development mailing list >> Bitcoin-development@lists.sourceforge.net >> https://lists.sourceforge.net/lists/listinfo/bitcoin-development >> >> > > > ------------------------------------------------------------------------------ > One dashboard for servers and applications across Physical-Virtual-Cloud > Widest out-of-the-box monitoring support with 50+ applications > Performance metrics, stats and reports that give you Actionable Insights > Deep dive visibility with transaction tracing using APM Insight. > http://ad.doubleclick.net/ddm/clk/290420510;117567292;y > _______________________________________________ > Bitcoin-development mailing list > Bitcoin-development@lists.sourceforge.net > https://lists.sourceforge.net/lists/listinfo/bitcoin-development > > [-- Attachment #2: Type: text/html, Size: 7019 bytes --] ^ permalink raw reply [flat|nested] 15+ messages in thread
* Re: [Bitcoin-development] Cost savings by using replace-by-fee, 30-90% 2015-05-26 18:22 ` Danny Thorpe 2015-05-26 18:38 ` Allen Piscitello @ 2015-05-26 18:42 ` Aaron Voisine 2015-05-26 18:47 ` Adam Back 2015-05-26 20:18 ` Matt Whitlock 3 siblings, 0 replies; 15+ messages in thread From: Aaron Voisine @ 2015-05-26 18:42 UTC (permalink / raw) To: Danny Thorpe; +Cc: Bitcoin Dev [-- Attachment #1: Type: text/plain, Size: 5472 bytes --] See the "first-seen-safe replace-by-fee" thread Aaron Voisine co-founder and CEO breadwallet.com On Tue, May 26, 2015 at 11:22 AM, Danny Thorpe <danny.thorpe@gmail.com> wrote: > What prevents RBF from being used for fraudulent payment reversals? > > Pay 1BTC to Alice for hard goods, then after you receive the goods > broadcast a double spend of that transaction to pay Alice nothing? Your > only cost is the higher network fee of the 2nd tx. > > Thanks, > -Danny > > On Mon, May 25, 2015 at 5:10 PM, Peter Todd <pete@petertodd.org> wrote: > >> On Tue, May 26, 2015 at 12:03:09AM +0200, Mike Hearn wrote: >> > CPFP also solves it just fine. >> >> CPFP is a significantly more expensive way of paying fees than RBF, >> particularly for the use-case of defragmenting outputs, with cost >> savings ranging from 30% to 90% >> >> >> Case 1: CPFP vs. RBF for increasing the fee on a single tx >> ---------------------------------------------------------- >> >> Creating an spending a P2PKH output uses 34 bytes of txout, and 148 >> bytes of txin, 182 bytes total. >> >> Let's suppose I have a 1 BTC P2PKH output and I want to pay 0.1 BTC to >> Alice. This results in a 1in/2out transaction t1 that's 226 bytes in size. >> I forget to click on the "priority fee" option, so it goes out with the >> minimum fee of 2.26uBTC. Whoops! I use CPFP to spend that output, >> creating a new transaction t2 that's 192 bytes in size. I want to pay >> 1mBTC/KB for a fast confirmation, so I'm now paying 418uBTC of >> transaction fees. >> >> On the other hand, had I use RBF, my wallet would have simply >> rebroadcast t1 with the change address decreased. The rules require you >> to pay 2.26uBTC for the bandwidth consumed broadcasting it, plus the new >> fee level, or 218uBTC of fees in total. >> >> Cost savings: 48% >> >> >> Case 2: Paying multiple recipients in succession >> ------------------------------------------------ >> >> Suppose that after I pay Alice, I also decide to pay Bob for his hard >> work demonstrating cryptographic protocols. I need to create a new >> transaction t2 spending t1's change address. Normally t2 would be >> another 226 bytes in size, resulting in 226uBTC additional fees. >> >> With RBF on the other hand I can simply double-spend t1 with a >> transaction paying both Alice and Bob. This new transaction is 260 bytes >> in size. I have to pay 2.6uBTC additional fees to pay for the bandwidth >> consumed broadcasting it, resulting in an additional 36uBTC of fees. >> >> Cost savings: 84% >> >> >> Case 3: Paying multiple recipients from a 2-of-3 multisig wallet >> ---------------------------------------------------------------- >> >> The above situation gets even worse with multisig. t1 in the multisig >> case is 367 bytes; t2 another 367 bytes, costing an additional 367uBTC >> in fees. With RBF we rewrite t1 with an additional output, resulting in >> a 399 byte transaction, with just 36uBTC in additional fees. >> >> Cost savings: 90% >> >> >> Case 4: Dust defragmentation >> ---------------------------- >> >> My wallet has a two transaction outputs that it wants to combine into >> one for the purpose of UTXO defragmentation. It broadcasts transaction >> t1 with two inputs and one output, size 340 bytes, paying zero fees. >> >> Prior to the transaction confirming I find I need to spend those funds >> for a priority transaction at the 1mBTC/KB fee level. This transaction, >> t2a, has one input and two outputs, 226 bytes in size. However it needs >> to pay fees for both transactions at once, resulting in a combined total >> fee of 556uBTC. If this situation happens frequently, defragmenting >> UTXOs is likely to cost more in additional fees than it saves. >> >> With RBF I'd simply doublespend t1 with a 2-in-2-out transaction 374 >> bytes in size, paying 374uBTC. Even better, if one of the two inputs is >> sufficiently large to cover my costs I can doublespend t1 with a >> 1-in-2-out tx just 226 bytes in size, paying 226uBTC. >> >> Cost savings: 32% to 59%, or even infinite if defragmentation w/o RBF >> costs you more than you save >> >> -- >> 'peter'[:-1]@petertodd.org >> 0000000000000000134ce6577d4122094479f548b997baf84367eaf0c190bc9f >> >> >> ------------------------------------------------------------------------------ >> One dashboard for servers and applications across Physical-Virtual-Cloud >> Widest out-of-the-box monitoring support with 50+ applications >> Performance metrics, stats and reports that give you Actionable Insights >> Deep dive visibility with transaction tracing using APM Insight. >> http://ad.doubleclick.net/ddm/clk/290420510;117567292;y >> _______________________________________________ >> Bitcoin-development mailing list >> Bitcoin-development@lists.sourceforge.net >> https://lists.sourceforge.net/lists/listinfo/bitcoin-development >> >> > > > ------------------------------------------------------------------------------ > One dashboard for servers and applications across Physical-Virtual-Cloud > Widest out-of-the-box monitoring support with 50+ applications > Performance metrics, stats and reports that give you Actionable Insights > Deep dive visibility with transaction tracing using APM Insight. > http://ad.doubleclick.net/ddm/clk/290420510;117567292;y > _______________________________________________ > Bitcoin-development mailing list > Bitcoin-development@lists.sourceforge.net > https://lists.sourceforge.net/lists/listinfo/bitcoin-development > > [-- Attachment #2: Type: text/html, Size: 7254 bytes --] ^ permalink raw reply [flat|nested] 15+ messages in thread
* Re: [Bitcoin-development] Cost savings by using replace-by-fee, 30-90% 2015-05-26 18:22 ` Danny Thorpe 2015-05-26 18:38 ` Allen Piscitello 2015-05-26 18:42 ` Aaron Voisine @ 2015-05-26 18:47 ` Adam Back 2015-05-26 20:18 ` Matt Whitlock 3 siblings, 0 replies; 15+ messages in thread From: Adam Back @ 2015-05-26 18:47 UTC (permalink / raw) To: Danny Thorpe; +Cc: Bitcoin Dev The general idea for replace by fee is that it would be restricted so as to make it safe, eg all the original addresses should receive no less bitcoin (more addresses can be added). The scorched earth game theory stuff (allowing removing recipients) is kind of orthogonal. Adam On 26 May 2015 at 19:22, Danny Thorpe <danny.thorpe@gmail.com> wrote: > What prevents RBF from being used for fraudulent payment reversals? > > Pay 1BTC to Alice for hard goods, then after you receive the goods broadcast > a double spend of that transaction to pay Alice nothing? Your only cost is > the higher network fee of the 2nd tx. > > Thanks, > -Danny > > On Mon, May 25, 2015 at 5:10 PM, Peter Todd <pete@petertodd.org> wrote: >> >> On Tue, May 26, 2015 at 12:03:09AM +0200, Mike Hearn wrote: >> > CPFP also solves it just fine. >> >> CPFP is a significantly more expensive way of paying fees than RBF, >> particularly for the use-case of defragmenting outputs, with cost >> savings ranging from 30% to 90% >> >> >> Case 1: CPFP vs. RBF for increasing the fee on a single tx >> ---------------------------------------------------------- >> >> Creating an spending a P2PKH output uses 34 bytes of txout, and 148 >> bytes of txin, 182 bytes total. >> >> Let's suppose I have a 1 BTC P2PKH output and I want to pay 0.1 BTC to >> Alice. This results in a 1in/2out transaction t1 that's 226 bytes in size. >> I forget to click on the "priority fee" option, so it goes out with the >> minimum fee of 2.26uBTC. Whoops! I use CPFP to spend that output, >> creating a new transaction t2 that's 192 bytes in size. I want to pay >> 1mBTC/KB for a fast confirmation, so I'm now paying 418uBTC of >> transaction fees. >> >> On the other hand, had I use RBF, my wallet would have simply >> rebroadcast t1 with the change address decreased. The rules require you >> to pay 2.26uBTC for the bandwidth consumed broadcasting it, plus the new >> fee level, or 218uBTC of fees in total. >> >> Cost savings: 48% >> >> >> Case 2: Paying multiple recipients in succession >> ------------------------------------------------ >> >> Suppose that after I pay Alice, I also decide to pay Bob for his hard >> work demonstrating cryptographic protocols. I need to create a new >> transaction t2 spending t1's change address. Normally t2 would be >> another 226 bytes in size, resulting in 226uBTC additional fees. >> >> With RBF on the other hand I can simply double-spend t1 with a >> transaction paying both Alice and Bob. This new transaction is 260 bytes >> in size. I have to pay 2.6uBTC additional fees to pay for the bandwidth >> consumed broadcasting it, resulting in an additional 36uBTC of fees. >> >> Cost savings: 84% >> >> >> Case 3: Paying multiple recipients from a 2-of-3 multisig wallet >> ---------------------------------------------------------------- >> >> The above situation gets even worse with multisig. t1 in the multisig >> case is 367 bytes; t2 another 367 bytes, costing an additional 367uBTC >> in fees. With RBF we rewrite t1 with an additional output, resulting in >> a 399 byte transaction, with just 36uBTC in additional fees. >> >> Cost savings: 90% >> >> >> Case 4: Dust defragmentation >> ---------------------------- >> >> My wallet has a two transaction outputs that it wants to combine into >> one for the purpose of UTXO defragmentation. It broadcasts transaction >> t1 with two inputs and one output, size 340 bytes, paying zero fees. >> >> Prior to the transaction confirming I find I need to spend those funds >> for a priority transaction at the 1mBTC/KB fee level. This transaction, >> t2a, has one input and two outputs, 226 bytes in size. However it needs >> to pay fees for both transactions at once, resulting in a combined total >> fee of 556uBTC. If this situation happens frequently, defragmenting >> UTXOs is likely to cost more in additional fees than it saves. >> >> With RBF I'd simply doublespend t1 with a 2-in-2-out transaction 374 >> bytes in size, paying 374uBTC. Even better, if one of the two inputs is >> sufficiently large to cover my costs I can doublespend t1 with a >> 1-in-2-out tx just 226 bytes in size, paying 226uBTC. >> >> Cost savings: 32% to 59%, or even infinite if defragmentation w/o RBF >> costs you more than you save >> >> -- >> 'peter'[:-1]@petertodd.org >> 0000000000000000134ce6577d4122094479f548b997baf84367eaf0c190bc9f >> >> >> ------------------------------------------------------------------------------ >> One dashboard for servers and applications across Physical-Virtual-Cloud >> Widest out-of-the-box monitoring support with 50+ applications >> Performance metrics, stats and reports that give you Actionable Insights >> Deep dive visibility with transaction tracing using APM Insight. >> http://ad.doubleclick.net/ddm/clk/290420510;117567292;y >> _______________________________________________ >> Bitcoin-development mailing list >> Bitcoin-development@lists.sourceforge.net >> https://lists.sourceforge.net/lists/listinfo/bitcoin-development >> > > > ------------------------------------------------------------------------------ > One dashboard for servers and applications across Physical-Virtual-Cloud > Widest out-of-the-box monitoring support with 50+ applications > Performance metrics, stats and reports that give you Actionable Insights > Deep dive visibility with transaction tracing using APM Insight. > http://ad.doubleclick.net/ddm/clk/290420510;117567292;y > _______________________________________________ > Bitcoin-development mailing list > Bitcoin-development@lists.sourceforge.net > https://lists.sourceforge.net/lists/listinfo/bitcoin-development > ^ permalink raw reply [flat|nested] 15+ messages in thread
* Re: [Bitcoin-development] Cost savings by using replace-by-fee, 30-90% 2015-05-26 18:22 ` Danny Thorpe ` (2 preceding siblings ...) 2015-05-26 18:47 ` Adam Back @ 2015-05-26 20:18 ` Matt Whitlock 3 siblings, 0 replies; 15+ messages in thread From: Matt Whitlock @ 2015-05-26 20:18 UTC (permalink / raw) To: Danny Thorpe; +Cc: bitcoin-development On Tuesday, 26 May 2015, at 11:22 am, Danny Thorpe wrote: > What prevents RBF from being used for fraudulent payment reversals? > > Pay 1BTC to Alice for hard goods, then after you receive the goods > broadcast a double spend of that transaction to pay Alice nothing? Your > only cost is the higher network fee of the 2nd tx. The "First-Seen-Safe" replace-by-fee presently being discussed on this list disallows fraudulent payment reversals, as it disallows a replacing transaction that pays less to any output script than the replaced transaction paid. ^ permalink raw reply [flat|nested] 15+ messages in thread
* Re: [Bitcoin-development] Cost savings by using replace-by-fee, 30-90% 2015-05-26 0:10 ` [Bitcoin-development] Cost savings by using replace-by-fee, 30-90% Peter Todd 2015-05-26 18:22 ` Danny Thorpe @ 2015-05-26 20:30 ` joliver 2015-05-26 20:56 ` Mark Friedenbach ` (2 more replies) 1 sibling, 3 replies; 15+ messages in thread From: joliver @ 2015-05-26 20:30 UTC (permalink / raw) To: bitcoin-development You're the Chief Scientist of __ViaCoin__ a alt with 30 second blocks and you have big banks as clients. Shit like replace-by-fee and leading the anti-scaling mob is for your clients, not Bitcoin. Get the fuck out. Peter Todd - 8930511 Canada Ltd. 1214-1423 Mississauga Valley Blvd. Mississauga ON L5A 4A5 Canada https://www.ic.gc.ca/app/scr/cc/CorporationsCanada/fdrlCrpDtls.html?corpId=8930511 On 2015-05-26 00:10, Peter Todd wrote: > On Tue, May 26, 2015 at 12:03:09AM +0200, Mike Hearn wrote: >> CPFP also solves it just fine. > > CPFP is a significantly more expensive way of paying fees than RBF, > particularly for the use-case of defragmenting outputs, with cost > savings ranging from 30% to 90% > > > Case 1: CPFP vs. RBF for increasing the fee on a single tx > ---------------------------------------------------------- > > Creating an spending a P2PKH output uses 34 bytes of txout, and 148 > bytes of txin, 182 bytes total. > > Let's suppose I have a 1 BTC P2PKH output and I want to pay 0.1 BTC to > Alice. This results in a 1in/2out transaction t1 that's 226 bytes in > size. > I forget to click on the "priority fee" option, so it goes out with the > minimum fee of 2.26uBTC. Whoops! I use CPFP to spend that output, > creating a new transaction t2 that's 192 bytes in size. I want to pay > 1mBTC/KB for a fast confirmation, so I'm now paying 418uBTC of > transaction fees. > > On the other hand, had I use RBF, my wallet would have simply > rebroadcast t1 with the change address decreased. The rules require you > to pay 2.26uBTC for the bandwidth consumed broadcasting it, plus the > new > fee level, or 218uBTC of fees in total. > > Cost savings: 48% > > > Case 2: Paying multiple recipients in succession > ------------------------------------------------ > > Suppose that after I pay Alice, I also decide to pay Bob for his hard > work demonstrating cryptographic protocols. I need to create a new > transaction t2 spending t1's change address. Normally t2 would be > another 226 bytes in size, resulting in 226uBTC additional fees. > > With RBF on the other hand I can simply double-spend t1 with a > transaction paying both Alice and Bob. This new transaction is 260 > bytes > in size. I have to pay 2.6uBTC additional fees to pay for the bandwidth > consumed broadcasting it, resulting in an additional 36uBTC of fees. > > Cost savings: 84% > > > Case 3: Paying multiple recipients from a 2-of-3 multisig wallet > ---------------------------------------------------------------- > > The above situation gets even worse with multisig. t1 in the multisig > case is 367 bytes; t2 another 367 bytes, costing an additional 367uBTC > in fees. With RBF we rewrite t1 with an additional output, resulting in > a 399 byte transaction, with just 36uBTC in additional fees. > > Cost savings: 90% > > > Case 4: Dust defragmentation > ---------------------------- > > My wallet has a two transaction outputs that it wants to combine into > one for the purpose of UTXO defragmentation. It broadcasts transaction > t1 with two inputs and one output, size 340 bytes, paying zero fees. > > Prior to the transaction confirming I find I need to spend those funds > for a priority transaction at the 1mBTC/KB fee level. This transaction, > t2a, has one input and two outputs, 226 bytes in size. However it needs > to pay fees for both transactions at once, resulting in a combined > total > fee of 556uBTC. If this situation happens frequently, defragmenting > UTXOs is likely to cost more in additional fees than it saves. > > With RBF I'd simply doublespend t1 with a 2-in-2-out transaction 374 > bytes in size, paying 374uBTC. Even better, if one of the two inputs is > sufficiently large to cover my costs I can doublespend t1 with a > 1-in-2-out tx just 226 bytes in size, paying 226uBTC. > > Cost savings: 32% to 59%, or even infinite if defragmentation w/o RBF > costs you more than you save > > ------------------------------------------------------------------------------ > One dashboard for servers and applications across > Physical-Virtual-Cloud > Widest out-of-the-box monitoring support with 50+ applications > Performance metrics, stats and reports that give you Actionable > Insights > Deep dive visibility with transaction tracing using APM Insight. > http://ad.doubleclick.net/ddm/clk/290420510;117567292;y > > _______________________________________________ > Bitcoin-development mailing list > Bitcoin-development@lists.sourceforge.net > https://lists.sourceforge.net/lists/listinfo/bitcoin-development ^ permalink raw reply [flat|nested] 15+ messages in thread
* Re: [Bitcoin-development] Cost savings by using replace-by-fee, 30-90% 2015-05-26 20:30 ` joliver @ 2015-05-26 20:56 ` Mark Friedenbach 2015-05-26 21:29 ` s7r 2015-05-26 22:29 ` Jeff Garzik 2 siblings, 0 replies; 15+ messages in thread From: Mark Friedenbach @ 2015-05-26 20:56 UTC (permalink / raw) To: joliver; +Cc: Bitcoin Development [-- Attachment #1: Type: text/plain, Size: 5176 bytes --] Please let's at least have some civility and decorum on this list. On Tue, May 26, 2015 at 1:30 PM, <joliver@airmail.cc> wrote: > You're the Chief Scientist of __ViaCoin__ a alt with 30 second blocks > and you have big banks as clients. Shit like replace-by-fee and leading > the anti-scaling mob is for your clients, not Bitcoin. Get the fuck out. > > Peter Todd - 8930511 Canada Ltd. > 1214-1423 Mississauga Valley Blvd. > Mississauga ON L5A 4A5 > Canada > > > https://www.ic.gc.ca/app/scr/cc/CorporationsCanada/fdrlCrpDtls.html?corpId=8930511 > > On 2015-05-26 00:10, Peter Todd wrote: > > On Tue, May 26, 2015 at 12:03:09AM +0200, Mike Hearn wrote: > >> CPFP also solves it just fine. > > > > CPFP is a significantly more expensive way of paying fees than RBF, > > particularly for the use-case of defragmenting outputs, with cost > > savings ranging from 30% to 90% > > > > > > Case 1: CPFP vs. RBF for increasing the fee on a single tx > > ---------------------------------------------------------- > > > > Creating an spending a P2PKH output uses 34 bytes of txout, and 148 > > bytes of txin, 182 bytes total. > > > > Let's suppose I have a 1 BTC P2PKH output and I want to pay 0.1 BTC to > > Alice. This results in a 1in/2out transaction t1 that's 226 bytes in > > size. > > I forget to click on the "priority fee" option, so it goes out with the > > minimum fee of 2.26uBTC. Whoops! I use CPFP to spend that output, > > creating a new transaction t2 that's 192 bytes in size. I want to pay > > 1mBTC/KB for a fast confirmation, so I'm now paying 418uBTC of > > transaction fees. > > > > On the other hand, had I use RBF, my wallet would have simply > > rebroadcast t1 with the change address decreased. The rules require you > > to pay 2.26uBTC for the bandwidth consumed broadcasting it, plus the > > new > > fee level, or 218uBTC of fees in total. > > > > Cost savings: 48% > > > > > > Case 2: Paying multiple recipients in succession > > ------------------------------------------------ > > > > Suppose that after I pay Alice, I also decide to pay Bob for his hard > > work demonstrating cryptographic protocols. I need to create a new > > transaction t2 spending t1's change address. Normally t2 would be > > another 226 bytes in size, resulting in 226uBTC additional fees. > > > > With RBF on the other hand I can simply double-spend t1 with a > > transaction paying both Alice and Bob. This new transaction is 260 > > bytes > > in size. I have to pay 2.6uBTC additional fees to pay for the bandwidth > > consumed broadcasting it, resulting in an additional 36uBTC of fees. > > > > Cost savings: 84% > > > > > > Case 3: Paying multiple recipients from a 2-of-3 multisig wallet > > ---------------------------------------------------------------- > > > > The above situation gets even worse with multisig. t1 in the multisig > > case is 367 bytes; t2 another 367 bytes, costing an additional 367uBTC > > in fees. With RBF we rewrite t1 with an additional output, resulting in > > a 399 byte transaction, with just 36uBTC in additional fees. > > > > Cost savings: 90% > > > > > > Case 4: Dust defragmentation > > ---------------------------- > > > > My wallet has a two transaction outputs that it wants to combine into > > one for the purpose of UTXO defragmentation. It broadcasts transaction > > t1 with two inputs and one output, size 340 bytes, paying zero fees. > > > > Prior to the transaction confirming I find I need to spend those funds > > for a priority transaction at the 1mBTC/KB fee level. This transaction, > > t2a, has one input and two outputs, 226 bytes in size. However it needs > > to pay fees for both transactions at once, resulting in a combined > > total > > fee of 556uBTC. If this situation happens frequently, defragmenting > > UTXOs is likely to cost more in additional fees than it saves. > > > > With RBF I'd simply doublespend t1 with a 2-in-2-out transaction 374 > > bytes in size, paying 374uBTC. Even better, if one of the two inputs is > > sufficiently large to cover my costs I can doublespend t1 with a > > 1-in-2-out tx just 226 bytes in size, paying 226uBTC. > > > > Cost savings: 32% to 59%, or even infinite if defragmentation w/o RBF > > costs you more than you save > > > > > ------------------------------------------------------------------------------ > > One dashboard for servers and applications across > > Physical-Virtual-Cloud > > Widest out-of-the-box monitoring support with 50+ applications > > Performance metrics, stats and reports that give you Actionable > > Insights > > Deep dive visibility with transaction tracing using APM Insight. > > http://ad.doubleclick.net/ddm/clk/290420510;117567292;y > > > > _______________________________________________ > > Bitcoin-development mailing list > > Bitcoin-development@lists.sourceforge.net > > https://lists.sourceforge.net/lists/listinfo/bitcoin-development > > > ------------------------------------------------------------------------------ > _______________________________________________ > Bitcoin-development mailing list > Bitcoin-development@lists.sourceforge.net > https://lists.sourceforge.net/lists/listinfo/bitcoin-development > [-- Attachment #2: Type: text/html, Size: 6795 bytes --] ^ permalink raw reply [flat|nested] 15+ messages in thread
* Re: [Bitcoin-development] Cost savings by using replace-by-fee, 30-90% 2015-05-26 20:30 ` joliver 2015-05-26 20:56 ` Mark Friedenbach @ 2015-05-26 21:29 ` s7r 2015-05-26 22:06 ` Adam Back 2015-05-27 1:25 ` Peter Todd 2015-05-26 22:29 ` Jeff Garzik 2 siblings, 2 replies; 15+ messages in thread From: s7r @ 2015-05-26 21:29 UTC (permalink / raw) To: bitcoin-development What is wrong with the man testing some ideas on his custom branch? This is how improvements come to life. I saw in the BIPs some really interesting ideas and nice brainstorming which came from Peter Todd. Now, my question, if replace by fee doesn't allow me to change the inputs or the outputs, I can only add outputs... what can I do with this feature? If I sent a tx and want to replace it with a higher fee one, the higher fee one can only have maybe additional change addresses or another payment, if the inputs suffice? Do we have any real use cases? P.S. is it planned to include this by default in bitcoin core 10.0.3 or it will remain just on Peter's branch? On 5/26/2015 11:30 PM, joliver@airmail.cc wrote: > You're the Chief Scientist of __ViaCoin__ a alt with 30 second blocks > and you have big banks as clients. Shit like replace-by-fee and leading > the anti-scaling mob is for your clients, not Bitcoin. Get the fuck out. > > Peter Todd - 8930511 Canada Ltd. > 1214-1423 Mississauga Valley Blvd. > Mississauga ON L5A 4A5 > Canada > > https://www.ic.gc.ca/app/scr/cc/CorporationsCanada/fdrlCrpDtls.html?corpId=8930511 > > On 2015-05-26 00:10, Peter Todd wrote: >> On Tue, May 26, 2015 at 12:03:09AM +0200, Mike Hearn wrote: >>> CPFP also solves it just fine. >> >> CPFP is a significantly more expensive way of paying fees than RBF, >> particularly for the use-case of defragmenting outputs, with cost >> savings ranging from 30% to 90% >> >> >> Case 1: CPFP vs. RBF for increasing the fee on a single tx >> ---------------------------------------------------------- >> >> Creating an spending a P2PKH output uses 34 bytes of txout, and 148 >> bytes of txin, 182 bytes total. >> >> Let's suppose I have a 1 BTC P2PKH output and I want to pay 0.1 BTC to >> Alice. This results in a 1in/2out transaction t1 that's 226 bytes in >> size. >> I forget to click on the "priority fee" option, so it goes out with the >> minimum fee of 2.26uBTC. Whoops! I use CPFP to spend that output, >> creating a new transaction t2 that's 192 bytes in size. I want to pay >> 1mBTC/KB for a fast confirmation, so I'm now paying 418uBTC of >> transaction fees. >> >> On the other hand, had I use RBF, my wallet would have simply >> rebroadcast t1 with the change address decreased. The rules require you >> to pay 2.26uBTC for the bandwidth consumed broadcasting it, plus the >> new >> fee level, or 218uBTC of fees in total. >> >> Cost savings: 48% >> >> >> Case 2: Paying multiple recipients in succession >> ------------------------------------------------ >> >> Suppose that after I pay Alice, I also decide to pay Bob for his hard >> work demonstrating cryptographic protocols. I need to create a new >> transaction t2 spending t1's change address. Normally t2 would be >> another 226 bytes in size, resulting in 226uBTC additional fees. >> >> With RBF on the other hand I can simply double-spend t1 with a >> transaction paying both Alice and Bob. This new transaction is 260 >> bytes >> in size. I have to pay 2.6uBTC additional fees to pay for the bandwidth >> consumed broadcasting it, resulting in an additional 36uBTC of fees. >> >> Cost savings: 84% >> >> >> Case 3: Paying multiple recipients from a 2-of-3 multisig wallet >> ---------------------------------------------------------------- >> >> The above situation gets even worse with multisig. t1 in the multisig >> case is 367 bytes; t2 another 367 bytes, costing an additional 367uBTC >> in fees. With RBF we rewrite t1 with an additional output, resulting in >> a 399 byte transaction, with just 36uBTC in additional fees. >> >> Cost savings: 90% >> >> >> Case 4: Dust defragmentation >> ---------------------------- >> >> My wallet has a two transaction outputs that it wants to combine into >> one for the purpose of UTXO defragmentation. It broadcasts transaction >> t1 with two inputs and one output, size 340 bytes, paying zero fees. >> >> Prior to the transaction confirming I find I need to spend those funds >> for a priority transaction at the 1mBTC/KB fee level. This transaction, >> t2a, has one input and two outputs, 226 bytes in size. However it needs >> to pay fees for both transactions at once, resulting in a combined >> total >> fee of 556uBTC. If this situation happens frequently, defragmenting >> UTXOs is likely to cost more in additional fees than it saves. >> >> With RBF I'd simply doublespend t1 with a 2-in-2-out transaction 374 >> bytes in size, paying 374uBTC. Even better, if one of the two inputs is >> sufficiently large to cover my costs I can doublespend t1 with a >> 1-in-2-out tx just 226 bytes in size, paying 226uBTC. >> >> Cost savings: 32% to 59%, or even infinite if defragmentation w/o RBF >> costs you more than you save >> >> ------------------------------------------------------------------------------ >> One dashboard for servers and applications across >> Physical-Virtual-Cloud >> Widest out-of-the-box monitoring support with 50+ applications >> Performance metrics, stats and reports that give you Actionable >> Insights >> Deep dive visibility with transaction tracing using APM Insight. >> http://ad.doubleclick.net/ddm/clk/290420510;117567292;y >> >> _______________________________________________ >> Bitcoin-development mailing list >> Bitcoin-development@lists.sourceforge.net >> https://lists.sourceforge.net/lists/listinfo/bitcoin-development > > ------------------------------------------------------------------------------ > _______________________________________________ > Bitcoin-development mailing list > Bitcoin-development@lists.sourceforge.net > https://lists.sourceforge.net/lists/listinfo/bitcoin-development > ^ permalink raw reply [flat|nested] 15+ messages in thread
* Re: [Bitcoin-development] Cost savings by using replace-by-fee, 30-90% 2015-05-26 21:29 ` s7r @ 2015-05-26 22:06 ` Adam Back 2015-05-27 1:25 ` Peter Todd 1 sibling, 0 replies; 15+ messages in thread From: Adam Back @ 2015-05-26 22:06 UTC (permalink / raw) To: s7r; +Cc: Bitcoin Dev Well so for example it could have an additional input (to increase the BTC paid into the transaction) and pay more to an existing change address and higher fee, or add an additional change address, and leave a larger fee, or if you had a right-sized coin add an additional input that all goes to fees. (As well as optionally tacking on additional pending payments to other addresses funded from the higher input). Adam On 26 May 2015 at 22:29, s7r <s7r@sky-ip.org> wrote: > What is wrong with the man testing some ideas on his custom branch? This > is how improvements come to life. I saw in the BIPs some really > interesting ideas and nice brainstorming which came from Peter Todd. > > Now, my question, if replace by fee doesn't allow me to change the > inputs or the outputs, I can only add outputs... what can I do with this > feature? If I sent a tx and want to replace it with a higher fee one, > the higher fee one can only have maybe additional change addresses or > another payment, if the inputs suffice? Do we have any real use cases? > > P.S. is it planned to include this by default in bitcoin core 10.0.3 or > it will remain just on Peter's branch? > > On 5/26/2015 11:30 PM, joliver@airmail.cc wrote: >> You're the Chief Scientist of __ViaCoin__ a alt with 30 second blocks >> and you have big banks as clients. Shit like replace-by-fee and leading >> the anti-scaling mob is for your clients, not Bitcoin. Get the fuck out. >> >> Peter Todd - 8930511 Canada Ltd. >> 1214-1423 Mississauga Valley Blvd. >> Mississauga ON L5A 4A5 >> Canada >> >> https://www.ic.gc.ca/app/scr/cc/CorporationsCanada/fdrlCrpDtls.html?corpId=8930511 >> >> On 2015-05-26 00:10, Peter Todd wrote: >>> On Tue, May 26, 2015 at 12:03:09AM +0200, Mike Hearn wrote: >>>> CPFP also solves it just fine. >>> >>> CPFP is a significantly more expensive way of paying fees than RBF, >>> particularly for the use-case of defragmenting outputs, with cost >>> savings ranging from 30% to 90% >>> >>> >>> Case 1: CPFP vs. RBF for increasing the fee on a single tx >>> ---------------------------------------------------------- >>> >>> Creating an spending a P2PKH output uses 34 bytes of txout, and 148 >>> bytes of txin, 182 bytes total. >>> >>> Let's suppose I have a 1 BTC P2PKH output and I want to pay 0.1 BTC to >>> Alice. This results in a 1in/2out transaction t1 that's 226 bytes in >>> size. >>> I forget to click on the "priority fee" option, so it goes out with the >>> minimum fee of 2.26uBTC. Whoops! I use CPFP to spend that output, >>> creating a new transaction t2 that's 192 bytes in size. I want to pay >>> 1mBTC/KB for a fast confirmation, so I'm now paying 418uBTC of >>> transaction fees. >>> >>> On the other hand, had I use RBF, my wallet would have simply >>> rebroadcast t1 with the change address decreased. The rules require you >>> to pay 2.26uBTC for the bandwidth consumed broadcasting it, plus the >>> new >>> fee level, or 218uBTC of fees in total. >>> >>> Cost savings: 48% >>> >>> >>> Case 2: Paying multiple recipients in succession >>> ------------------------------------------------ >>> >>> Suppose that after I pay Alice, I also decide to pay Bob for his hard >>> work demonstrating cryptographic protocols. I need to create a new >>> transaction t2 spending t1's change address. Normally t2 would be >>> another 226 bytes in size, resulting in 226uBTC additional fees. >>> >>> With RBF on the other hand I can simply double-spend t1 with a >>> transaction paying both Alice and Bob. This new transaction is 260 >>> bytes >>> in size. I have to pay 2.6uBTC additional fees to pay for the bandwidth >>> consumed broadcasting it, resulting in an additional 36uBTC of fees. >>> >>> Cost savings: 84% >>> >>> >>> Case 3: Paying multiple recipients from a 2-of-3 multisig wallet >>> ---------------------------------------------------------------- >>> >>> The above situation gets even worse with multisig. t1 in the multisig >>> case is 367 bytes; t2 another 367 bytes, costing an additional 367uBTC >>> in fees. With RBF we rewrite t1 with an additional output, resulting in >>> a 399 byte transaction, with just 36uBTC in additional fees. >>> >>> Cost savings: 90% >>> >>> >>> Case 4: Dust defragmentation >>> ---------------------------- >>> >>> My wallet has a two transaction outputs that it wants to combine into >>> one for the purpose of UTXO defragmentation. It broadcasts transaction >>> t1 with two inputs and one output, size 340 bytes, paying zero fees. >>> >>> Prior to the transaction confirming I find I need to spend those funds >>> for a priority transaction at the 1mBTC/KB fee level. This transaction, >>> t2a, has one input and two outputs, 226 bytes in size. However it needs >>> to pay fees for both transactions at once, resulting in a combined >>> total >>> fee of 556uBTC. If this situation happens frequently, defragmenting >>> UTXOs is likely to cost more in additional fees than it saves. >>> >>> With RBF I'd simply doublespend t1 with a 2-in-2-out transaction 374 >>> bytes in size, paying 374uBTC. Even better, if one of the two inputs is >>> sufficiently large to cover my costs I can doublespend t1 with a >>> 1-in-2-out tx just 226 bytes in size, paying 226uBTC. >>> >>> Cost savings: 32% to 59%, or even infinite if defragmentation w/o RBF >>> costs you more than you save >>> >>> ------------------------------------------------------------------------------ >>> One dashboard for servers and applications across >>> Physical-Virtual-Cloud >>> Widest out-of-the-box monitoring support with 50+ applications >>> Performance metrics, stats and reports that give you Actionable >>> Insights >>> Deep dive visibility with transaction tracing using APM Insight. >>> http://ad.doubleclick.net/ddm/clk/290420510;117567292;y >>> >>> _______________________________________________ >>> Bitcoin-development mailing list >>> Bitcoin-development@lists.sourceforge.net >>> https://lists.sourceforge.net/lists/listinfo/bitcoin-development >> >> ------------------------------------------------------------------------------ >> _______________________________________________ >> Bitcoin-development mailing list >> Bitcoin-development@lists.sourceforge.net >> https://lists.sourceforge.net/lists/listinfo/bitcoin-development >> > > ------------------------------------------------------------------------------ > _______________________________________________ > Bitcoin-development mailing list > Bitcoin-development@lists.sourceforge.net > https://lists.sourceforge.net/lists/listinfo/bitcoin-development ^ permalink raw reply [flat|nested] 15+ messages in thread
* Re: [Bitcoin-development] Cost savings by using replace-by-fee, 30-90% 2015-05-26 21:29 ` s7r 2015-05-26 22:06 ` Adam Back @ 2015-05-27 1:25 ` Peter Todd 2015-05-27 19:28 ` s7r 1 sibling, 1 reply; 15+ messages in thread From: Peter Todd @ 2015-05-27 1:25 UTC (permalink / raw) To: s7r; +Cc: bitcoin-development [-- Attachment #1: Type: text/plain, Size: 1385 bytes --] On Wed, May 27, 2015 at 12:29:28AM +0300, s7r wrote: > What is wrong with the man testing some ideas on his custom branch? This > is how improvements come to life. I saw in the BIPs some really > interesting ideas and nice brainstorming which came from Peter Todd. > > Now, my question, if replace by fee doesn't allow me to change the > inputs or the outputs, I can only add outputs... what can I do with this > feature? If I sent a tx and want to replace it with a higher fee one, > the higher fee one can only have maybe additional change addresses or > another payment, if the inputs suffice? Do we have any real use cases? You're a bit mistaken there: standard RBF lets you change anything, and FSS RBF lets you modify inputs and add outputs and/or make the value of outputs higher. > P.S. is it planned to include this by default in bitcoin core 10.0.3 or > it will remain just on Peter's branch? Any significant change to mempool policy like RBF is very unlikely to be incorporated in the Bitcoin Core v0.10.x branch, simply because it'd be too large a change for a minor, mostly bugfix, release. Having said that, I already maintain a standard RBF branch for v0.10.x, and have been asked by a major minor to backport FSS RBF for v0.10.x as well. -- 'peter'[:-1]@petertodd.org 00000000000000000b9e6c1ce35e6e06c01b1f381840bcd9297f307cb1e6aae8 [-- Attachment #2: Digital signature --] [-- Type: application/pgp-signature, Size: 650 bytes --] ^ permalink raw reply [flat|nested] 15+ messages in thread
* Re: [Bitcoin-development] Cost savings by using replace-by-fee, 30-90% 2015-05-27 1:25 ` Peter Todd @ 2015-05-27 19:28 ` s7r 0 siblings, 0 replies; 15+ messages in thread From: s7r @ 2015-05-27 19:28 UTC (permalink / raw) To: Peter Todd; +Cc: bitcoin-development Hi Peter, Thanks for your reply. I know and bookmarked your branch - nice work. So, to clarify: - bitcoin core (official / default) 0.10.x currently has First-seen mempool behavior - your custom branch uses replace by fee mempool behavior which allows an user to change anything in a tx (I guess it needs just to have at least one same input, so it can link it to another previously signed tx with lower fee and substitute it in the mempool, correct?). - First Seen Safe Replace by Fee (FSF-RBF) mempool behavior which allows an user only to add inputs and/or increase the value of outputs will be in yet another branch, maintained by you, but not in default / official bitcoin core? Another thing, if FSF-RBF lets you change TXes in the manner described above, how does the client know which tx needs to be replaced in the mempool? Since the txid naturally changes. How does it map tx1 with tx2 (to know tx2 has a higher fee and needs to substitute tx1) if quite a lot of params from the transaction structure can change? Thanks! On 5/27/2015 4:25 AM, Peter Todd wrote: > On Wed, May 27, 2015 at 12:29:28AM +0300, s7r wrote: >> What is wrong with the man testing some ideas on his custom branch? This >> is how improvements come to life. I saw in the BIPs some really >> interesting ideas and nice brainstorming which came from Peter Todd. >> >> Now, my question, if replace by fee doesn't allow me to change the >> inputs or the outputs, I can only add outputs... what can I do with this >> feature? If I sent a tx and want to replace it with a higher fee one, >> the higher fee one can only have maybe additional change addresses or >> another payment, if the inputs suffice? Do we have any real use cases? > > You're a bit mistaken there: standard RBF lets you change anything, and > FSS RBF lets you modify inputs and add outputs and/or make the value of > outputs higher. > >> P.S. is it planned to include this by default in bitcoin core 10.0.3 or >> it will remain just on Peter's branch? > > Any significant change to mempool policy like RBF is very unlikely to be > incorporated in the Bitcoin Core v0.10.x branch, simply because it'd be > too large a change for a minor, mostly bugfix, release. > > Having said that, I already maintain a standard RBF branch for v0.10.x, > and have been asked by a major minor to backport FSS RBF for v0.10.x as > well. > ^ permalink raw reply [flat|nested] 15+ messages in thread
* Re: [Bitcoin-development] Cost savings by using replace-by-fee, 30-90% 2015-05-26 20:30 ` joliver 2015-05-26 20:56 ` Mark Friedenbach 2015-05-26 21:29 ` s7r @ 2015-05-26 22:29 ` Jeff Garzik 2 siblings, 0 replies; 15+ messages in thread From: Jeff Garzik @ 2015-05-26 22:29 UTC (permalink / raw) To: joliver; +Cc: Bitcoin Dev [-- Attachment #1: Type: text/plain, Size: 523 bytes --] That attitude and doxxing is not appropriate for this list. On Tue, May 26, 2015 at 4:30 PM, <joliver@airmail.cc> wrote: > You're the Chief Scientist of __ViaCoin__ a alt with 30 second blocks > and you have big banks as clients. Shit like replace-by-fee and leading > the anti-scaling mob is for your clients, not Bitcoin. Get the fuck out. > <https://lists.sourceforge.net/lists/listinfo/bitcoin-development> > -- Jeff Garzik Bitcoin core developer and open source evangelist BitPay, Inc. https://bitpay.com/ [-- Attachment #2: Type: text/html, Size: 1071 bytes --] ^ permalink raw reply [flat|nested] 15+ messages in thread
end of thread, other threads:[~2015-05-27 19:29 UTC | newest] Thread overview: 15+ messages (download: mbox.gz / follow: Atom feed) -- links below jump to the message on this page -- 2015-05-26 18:43 [Bitcoin-development] Cost savings by using replace-by-fee, 30-90% Raystonn 2015-05-26 20:12 ` Allen Piscitello -- strict thread matches above, loose matches on Subject: below -- 2015-05-09 17:09 [Bitcoin-development] A suggestion for reducing the size of the UTXO database Jim Phillips 2015-05-25 18:44 ` Mike Hearn 2015-05-25 21:26 ` Peter Todd 2015-05-25 22:03 ` Mike Hearn 2015-05-26 0:10 ` [Bitcoin-development] Cost savings by using replace-by-fee, 30-90% Peter Todd 2015-05-26 18:22 ` Danny Thorpe 2015-05-26 18:38 ` Allen Piscitello 2015-05-26 18:42 ` Aaron Voisine 2015-05-26 18:47 ` Adam Back 2015-05-26 20:18 ` Matt Whitlock 2015-05-26 20:30 ` joliver 2015-05-26 20:56 ` Mark Friedenbach 2015-05-26 21:29 ` s7r 2015-05-26 22:06 ` Adam Back 2015-05-27 1:25 ` Peter Todd 2015-05-27 19:28 ` s7r 2015-05-26 22:29 ` Jeff Garzik
This is a public inbox, see mirroring instructions for how to clone and mirror all data and code used for this inbox