Who wins the race for multiple valid blocks mined at the same time?

6

0

From my understanding, a SHA256 hash is generated by a miner and if the hash is less than a specific value, it is passed to its peers. That said, It's possible for multiple hashes to be created at very close to the same time. If this happens, how is the "winner" determined? I see this has happened a lot (multiple orphaned blocks).

What can be done by the miner to see that their block wins the race, either honestly or through an attack? The protocol stipulates that the block shall be recognized by which ever was received first. Is it advantageous to set up peering with other miners?

Ben

Posted 2013-04-10T18:50:25.720

Reputation: 366

Answers

9

When there's a fork, part of the network will mine to find the next block in one branch and part in the other branch. Whichever part finds the next block first will determine the winning branch.

A miner who finds a block will want to spread it widely and quickly. This makes sure there are many other miners who saw his block first, and thus a high probability that the next block will be found by one of those.

Meni Rosenfeld

Posted 2013-04-10T18:50:25.720

Reputation: 18 542

1Is there anything a miner can do to send his block out more quickly? Or to disrupt other miners from sending out theirs?Ben 2013-04-10T19:24:29.000

1@Ben: Being connected to many nodes and having a fast internet connection could help. I don't know of ways to disrupt other miners.Meni Rosenfeld 2013-04-10T19:41:38.800

3Can anyone explain the downvote?Meni Rosenfeld 2013-04-10T19:42:08.770

I am baffled by it.Ben 2013-04-10T21:56:21.513

1A block is first verified before it is relayed. So a block with fewer transactions will be verified sooner than a block with many transactions. However trying to limit that will cause fees to be missed, so there's an economic cost that offsets the economic gain.Stephen Gornick 2013-04-11T00:15:30.410

1Theoretically, miners could form a coalition that would agree to mine after each other's found blocks, even if the block was found later, so long as the chain was the same length. I doubt it would be worth the trouble, but it would give members of the coalition a slightly greater chance of winning against a block found by a miner not in the coalition.David Schwartz 2013-04-11T03:46:52.480

@DavidSchwartz: This sounds like the mining cartel attack (https://bitcointalk.org/index.php?topic=2227.0;all). It requires the cartel to have at least ~40% of the total hashrate to work.

Meni Rosenfeld 2013-04-11T06:57:34.700

@MeniRosenfeld: Very similar. I'm suggesting a much weaker version -- mine from the longest chain in all cases, but break ties between a cartel member and a non member in favor of the cartel member regardless of which block was seen first.David Schwartz 2013-04-11T07:00:21.630

@DavidSchwartz: Yeah, that is simpler.Meni Rosenfeld 2013-04-11T11:08:34.087