Re: [Bitcoin-development] Cost savings by using replace-by-fee, 30-90%

2015-05-27 Thread s7r
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.
 

--
___
Bitcoin-development mailing list
Bitcoin-development@lists.sourceforge.net
https://lists.sourceforge.net/lists/listinfo/bitcoin-development


Re: [Bitcoin-development] Cost savings by using replace-by-fee, 30-90%

2015-05-26 Thread Peter Todd
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
0b9e6c1ce35e6e06c01b1f381840bcd9297f307cb1e6aae8


signature.asc
Description: Digital signature
--
___
Bitcoin-development mailing list
Bitcoin-development@lists.sourceforge.net
https://lists.sourceforge.net/lists/listinfo/bitcoin-development


Re: [Bitcoin-development] Cost savings by using replace-by-fee, 30-90%

2015-05-26 Thread Danny Thorpe
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 p...@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
 134ce6577d4122094479f548b997baf84367eaf0c190bc9f


 --
 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

Re: [Bitcoin-development] Cost savings by using replace-by-fee, 30-90%

2015-05-26 Thread Adam Back
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.tho...@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 p...@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
 134ce6577d4122094479f548b997baf84367eaf0c190bc9f


 --
 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 

Re: [Bitcoin-development] Cost savings by using replace-by-fee, 30-90%

2015-05-26 Thread Allen Piscitello
What prevents you from writing a bad check using today's systems?

On Tue, May 26, 2015 at 1:22 PM, Danny Thorpe danny.tho...@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 p...@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
 134ce6577d4122094479f548b997baf84367eaf0c190bc9f


 --
 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.
 

Re: [Bitcoin-development] Cost savings by using replace-by-fee, 30-90%

2015-05-26 Thread Aaron Voisine
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.tho...@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 p...@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
 134ce6577d4122094479f548b997baf84367eaf0c190bc9f


 --
 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.
 

Re: [Bitcoin-development] Cost savings by using replace-by-fee, 30-90%

2015-05-26 Thread Allen Piscitello
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 rayst...@hotmail.com wrote:

 Trust, regulation, law, and the threat of force.  Are you serious?
  On 26 May 2015 11:38 am, Allen Piscitello allen.piscite...@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.tho...@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 p...@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
 134ce6577d4122094479f548b997baf84367eaf0c190bc9f


 --
 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




 --
 

Re: [Bitcoin-development] Cost savings by using replace-by-fee, 30-90%

2015-05-26 Thread Matt Whitlock
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.

--
___
Bitcoin-development mailing list
Bitcoin-development@lists.sourceforge.net
https://lists.sourceforge.net/lists/listinfo/bitcoin-development


Re: [Bitcoin-development] Cost savings by using replace-by-fee, 30-90%

2015-05-26 Thread Raystonn
Trust, regulation, law, and the threat of force. Are you serious?

On 26 May 2015 11:38 am, Allen Piscitello allen.piscite...@gmail.com wrote:What prevents you from writing a bad check using todays 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,-DannyOn 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.

Lets 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 thats 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 thats 192 bytes in size. I want to pay
1mBTC/KB for a fast confirmation, so Im 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 t1s 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 Id 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
134ce6577d4122094479f548b997baf84367eaf0c190bc9f
--
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 

Re: [Bitcoin-development] Cost savings by using replace-by-fee, 30-90%

2015-05-26 Thread joliver
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


Re: [Bitcoin-development] Cost savings by using replace-by-fee, 30-90%

2015-05-26 Thread Mark Friedenbach
Please let's at least have some civility and decorum on this list.

On Tue, May 26, 2015 at 1:30 PM, joli...@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


Re: [Bitcoin-development] Cost savings by using replace-by-fee, 30-90%

2015-05-26 Thread s7r
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, joli...@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

 

Re: [Bitcoin-development] Cost savings by using replace-by-fee, 30-90%

2015-05-26 Thread Adam Back
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 s...@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, joli...@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 

Re: [Bitcoin-development] Cost savings by using replace-by-fee, 30-90%

2015-05-26 Thread Jeff Garzik
That attitude and doxxing is not appropriate for this list.


On Tue, May 26, 2015 at 4:30 PM, joli...@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/
--
___
Bitcoin-development mailing list
Bitcoin-development@lists.sourceforge.net
https://lists.sourceforge.net/lists/listinfo/bitcoin-development


[Bitcoin-development] Cost savings by using replace-by-fee, 30-90%

2015-05-25 Thread Peter Todd
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
134ce6577d4122094479f548b997baf84367eaf0c190bc9f


signature.asc
Description: Digital signature
--
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