user127663: I am trying to understand how the consensus mechanism works. My understanding is that multiple nonces can satisfy the target hash requirement. What I'm trying to understand now is: if two miners come up with two different nonces, how does consensus take place?
Is this "tie" broken with the longest chain rule or is there another tie-breaking mechanism?

user208: The tie is broken by the first of the two that gets extended with a child block.
In practice, in case two conflicting blocks at the same height appear on the network, every node will pick the one they saw first as winner. Because communication across the earth happens at a finite speed, some miners may see one side of the fork first, and other miners may see another one first, even if there is some time between them (up to ~seconds). However, the one that was actually first will most likely reach more other miners first than the other one, and that one will thus have the most chance of being built upon first.
Note that in theory it is possible for this discrepancy to persist: it is possible that a block is found on both sides of the split ~simultaneously again. In that case, it will be the block after that that determines the winner, and so forth. However, under reasonable assumptions, the probability that this persists for long is extremely small, and that is also what is observed in practice. Reorganizations of more than 2 blocks deep are extremely rare.

127663: <p>I am trying to understand how the consensus mechanism works. My understanding is that multiple nonces can satisfy the target hash requirement. What I'm trying to understand now is: if two miners come up with two different nonces, how does consensus take place?</p>
<p>Is this &quot;tie&quot; broken with the longest chain rule or is there another tie-breaking mechanism?</p>
 208: <p>The tie is broken by the first of the two that gets extended with a child block.</p>
<p>In practice, in case two conflicting blocks at the same height appear on the network, every node will pick the one they saw first as winner. Because communication across the earth happens at a finite speed, some miners may see one side of the fork first, and other miners may see another one first, even if there is some time between them (up to ~seconds). However, the one that was actually first will most likely reach more other miners first than the other one, and that one will thus have the most chance of being built upon first.</p>
<p>Note that in theory it is possible for this discrepancy to persist: it is possible that a block is found on both sides of the split ~simultaneously again. In that case, it will be the block after that that determines the winner, and so forth. However, under reasonable assumptions, the probability that this persists for long is extremely small, and that is also what is observed in practice. Reorganizations of more than 2 blocks deep are extremely rare.</p>
