Bitcoin Forum
November 04, 2024, 10:42:51 PM *
News: Latest Bitcoin Core release: 28.0 [Torrent]
 
   Home   Help Search Login Register More  
Pages: [1]
  Print  
Author Topic: do miners include first-to-broadcast or highest-fee spends?  (Read 1499 times)
niko (OP)
Hero Member
*****
Offline Offline

Activity: 756
Merit: 501


There is more to Bitcoin than bitcoins.


View Profile
September 18, 2012, 01:56:01 AM
 #1

Presumably the fees will become the main driving force behind mining in future. Miners would then have an incentive to include in the block the spend with the highest fees, even if it is obviously a double spend against an earlier transaction that is already broadcast.

Is this correct?

They're there, in their room.
Your mining rig is on fire, yet you're very calm.
DeathAndTaxes
Donator
Legendary
*
Offline Offline

Activity: 1218
Merit: 1079


Gerald Davis


View Profile
September 18, 2012, 02:01:39 AM
 #2

Coins only have value if they are safe.  Miners have a vested interest in ensuring Bitcoin fulfills its role of secure transactions.   As mining becomes more specalized, niche the margins are going to be continually squeezed.  The 1000% annual ROI days are never coming back.  The 100% ROI days are probably never coming back.  As the profits get extended over time mining becomes a marathon not a sprint.  Making 1% more by crippling the network and than tanking your ROI over the next year won't make economic sense.  Some miners will but I imagine they will be a minority.

Still that is just a theory.  Like most of Bitcoin it hasn't been tested.  We will find out.
koin
Legendary
*
Offline Offline

Activity: 873
Merit: 1000


View Profile
September 18, 2012, 02:27:54 AM
 #3

Miners would then have an incentive to include in the block the spend with the highest fees, even if it is obviously a double spend against an earlier transaction that is already broadcast.

"It takes 20 years to build a reputation and five minutes to ruin it."  - warren buffett
niko (OP)
Hero Member
*****
Offline Offline

Activity: 756
Merit: 501


There is more to Bitcoin than bitcoins.


View Profile
September 18, 2012, 03:12:21 AM
 #4

I like the attitude of D&T and koin shown above, but the user does not have much control over what nodes relay and accept/refuse their transaction, right? It's the miners that can decide. Therefore, I don't see how choosing the higher-fee transactions over earlier transactions and ruining their reputations (in my eyes) would hurt them in any way. They can still keep going.

I don't think this is a big problem - a merchant would simply need to wait for one block (instead of waiting a few seconds or minutes nowadays to reduce the probability of simple double-spend (I am talking about small-value transactions, of course)). Still, it's something to consider.

They're there, in their room.
Your mining rig is on fire, yet you're very calm.
Gavin Andresen
Legendary
*
qt
Offline Offline

Activity: 1652
Merit: 2301


Chief Scientist


View Profile WWW
September 18, 2012, 03:25:16 AM
 #5

Presumably the fees will become the main driving force behind mining in future. Miners would then have an incentive to include in the block the spend with the highest fees, even if it is obviously a double spend against an earlier transaction that is already broadcast.

Is this correct?

Yes, if by earlier you mean a few minutes earlier (it would have to have a 50+ BTC fee to make it worthwhile for miners to double-spend a transaction that already made it into the last block).

Two zero-confirmation transactions essentially happen at the same time as far as the network is concerned; if there was a good way for everybody to agree that they happened in a particular order we wouldn't need the blockchain. I assume that miners will take the transactions that give them the greatest short-term profit; that may not be correct (there might be a lot of miners interested in the long-term health of Bitcoin), but I think it is the safest assumption. And I think if we design payment protocols around that assumption they will be more secure.

How often do you get the chance to work on a potentially world-changing project?
jgarzik
Legendary
*
qt
Offline Offline

Activity: 1596
Merit: 1100


View Profile
September 18, 2012, 03:55:19 AM
 #6

I like the attitude of D&T and koin shown above, but the user does not have much control over what nodes relay and accept/refuse their transaction, right? It's the miners that can decide.

Close.

Each node decides what to relay, or not.  Miners have no control over relaying.

As you say, the user does not have control over what nodes relay -- apart from knowing that "standard" transactions are likely to be relayed, and "non-standard" transactions are not likely to be relayed.

Miners do have control over what transactions are placed inside each block, but that is a separate issue from relaying.


Jeff Garzik, Bloq CEO, former bitcoin core dev team; opinions are my own.
Visit bloq.com / metronome.io
Donations / tip jar: 1BrufViLKnSWtuWGkryPsKsxonV2NQ7Tcj
jgarzik
Legendary
*
qt
Offline Offline

Activity: 1596
Merit: 1100


View Profile
September 18, 2012, 03:57:27 AM
 #7

Presumably the fees will become the main driving force behind mining in future. Miners would then have an incentive to include in the block the spend with the highest fees, even if it is obviously a double spend against an earlier transaction that is already broadcast.

A double-spend is not relayed by the network, nor accepted by miner.  That economic incentive does exist, though, you are correct.

Also, one a transaction has been placed inside a block ("confirmed"), all nodes will refuse to relay a double-spend transaction for those same funds.


Jeff Garzik, Bloq CEO, former bitcoin core dev team; opinions are my own.
Visit bloq.com / metronome.io
Donations / tip jar: 1BrufViLKnSWtuWGkryPsKsxonV2NQ7Tcj
niko (OP)
Hero Member
*****
Offline Offline

Activity: 756
Merit: 501


There is more to Bitcoin than bitcoins.


View Profile
September 18, 2012, 05:19:46 AM
 #8

Presumably the fees will become the main driving force behind mining in future. Miners would then have an incentive to include in the block the spend with the highest fees, even if it is obviously a double spend against an earlier transaction that is already broadcast.

A double-spend is not relayed by the network, nor accepted by miner.  That economic incentive does exist, though, you are correct.

Also, one a transaction has been placed inside a block ("confirmed"), all nodes will refuse to relay a double-spend transaction for those same funds.



Right, I was only thinking about the time span of one block. In the case of low-risk, low-value transactions (a coffee shop, for example, that wants to immediately accept zero-confirmation transactions): Is it fair to say that the merchant should always be listening for network transactions, and checking for double spends when accepting a payment?

They're there, in their room.
Your mining rig is on fire, yet you're very calm.
jgarzik
Legendary
*
qt
Offline Offline

Activity: 1596
Merit: 1100


View Profile
September 18, 2012, 05:31:17 AM
 #9

Right, I was only thinking about the time span of one block. In the case of low-risk, low-value transactions (a coffee shop, for example, that wants to immediately accept zero-confirmation transactions): Is it fair to say that the merchant should always be listening for network transactions, and checking for double spends when accepting a payment?

It is highly unlikely that a merchant would ever see a double-spend until it's too late.  The favorite double-spend example involves secretly mining a block containing the second transaction, TX #2, the double spend.  The merchant sees TX #1, hands out the goodies with zero confirmations, and then the evil thief releases his block containing TX #2.

In the other double-spend case, where TX #1 races TX #2 across the network...  Presumably the merchant is well connected to the P2P network, receiving and broadcasting transactions normally.  Any double spend not sent in a block, but rather simply sent out to the network, would probably be rejected by all the merchant's peers.  The merchant would likely never see TX #2.  The moral of the story here is merchants should always be well-connected.

Zero-confirmation transactions are fraught with danger and possible mischief.  We recommend against zero-conf transactions.

It has been shown that even 1-confirmation transactions are within the realm of a determined attacker, so I would never go below 2 confirmations for anything remotely valuable.  But at that point...  if you can wait 20 minutes, surely you can wait 60 minutes for a full 6 confirmations.

The merchant must simply ask themselves about their risk level:  if the transaction is low value, then will an attack cost more than the price of the good being sold (coffee)?  That is a business decision and not a technical decision.  Can you afford the occasional double-spent coffee, in exchange for convenience of zero-confirmation?



Jeff Garzik, Bloq CEO, former bitcoin core dev team; opinions are my own.
Visit bloq.com / metronome.io
Donations / tip jar: 1BrufViLKnSWtuWGkryPsKsxonV2NQ7Tcj
niko (OP)
Hero Member
*****
Offline Offline

Activity: 756
Merit: 501


There is more to Bitcoin than bitcoins.


View Profile
September 18, 2012, 06:18:49 AM
 #10

Thanks, it all makes sense now. Thread locked!

They're there, in their room.
Your mining rig is on fire, yet you're very calm.
Pages: [1]
  Print  
 
Jump to:  

Powered by MySQL Powered by PHP Powered by SMF 1.1.19 | SMF © 2006-2009, Simple Machines Valid XHTML 1.0! Valid CSS!