A Deterministic Tiebreaker for Bitcoin Block Selection: Enhancing Fairness and Convergence

PS check out some discussion I had with zawy: https://github.com/zawy12/difficulty-algorithms/issues/76#issuecomment-2798012615

Not exactly, if I am honest and just publish my blocks right away, I always run the risk of not getting paid for the block I just published regardless of latency.

Status quo honest: I have 10% hash and (10% - S^2 - L) chance of getting paid.

S is the risk of the selfish miner getting two blocks in a row to reorg. Rises with more selfish hashpower
L is some latency related chance of my block getting outcompeted by another honest miners. Rises with worse latency and shorter blocktime

Determinstic honest: I have 10% hash and (10% - S/2) chance of getting paid.

S/2 is the risk of selfish miner getting one competing block and the block hashes to reorg, signified by the “/2”.

Under most circumstances you’d expect S/2 > (S^2 + L), no?

Not quite, because a competing block doesn’t exist. If you publish immediately, all honest hash switches to you. If some hash is lagging, it could mine a competitor and have 50% of flipping you. But from your PoV chances of losing an immediately published block is given by (%hash that lags x lag/10min)*50%, not just 50%.

Uh did you not read the rest of my post

sorry, you caught me at an awkward time with this and I had limited attention :sweat_smile:

I think the correct is:

(10% - S^2 - L) vs (10% - S^2 - L/2)

It is literally socialization of orphan losses. Of course if it’s your block in question you will ignore the scheme and still try to get that +1 for your block. But if you have no skin in the game, you treat public tips with the H() tie-breaker.

Let’s go through some scenarios:

  • You mined a block first. After 2s someone else mined a competitor (due to latency). You still try to mine +1 on top of your block, but the whole rest of the network will either favor yours or the competitor, 50:50. Sometimes you win, sometimes he wins: here you socialize orphan losses with the less-connected miner - but the other participating miners actually enforce this. They have no skin in the game, they don’t care whether you or the competitor wins.
  • You thought you mined a block first, but a selfish miner already had a secret block. Now that your block is public, does he release it or not? Depends on the hash. If he wins: he releases it immediately. If he loses, he tries for +1. But rest of the network including you will be trying for +1 on your honest tip. Who wins? If the selfish miner had just released his block as soon as he had it, he wouldn’t be in this situation, he’d just get paid normally.

No, they would not because the cost of a 10 second block that is empty being mined is not 600 seconds of energy, it is 10 seconds of energy.

The cost is thus much lower and the gain is still some block reward (until 100 years in the future) and the gain is also that your hardware doesn’t die.

Edit:
Additionally, the waiting-for-validation time coincides with the fact that the mempool is going to be practically empty. There is literally no fee money available ANYWAY. So mining an empty block as a result of header first is just how things work.

If H < (2^256-1)/2 , select A; otherwise, select B.

This is potentially wrong :slight_smile: (not that it matters much)

(2^256-1)/2 = 2^255 - 0.5

If we assume integer division, then it is equal to 2^255 - 1 (rounding down)

The condition is true from

0 to 2^255 - 2 (giving 2^255 - 1 options)

The condition is false from

2^255 - 1 to 2^256 -1 (giving 2^255 + 1 options)

Thus the condition is (very very slightly) true more often than false.

If you use real number division in the condition, then it is technically correct.

H < 2^255 would be correct and eliminates the need to do a division.

3 Likes