by JumpCrisscross · 13y ago · 0 comments
Former algorithmic trader here. This solution does not appear to be incentive-compatible.
Suppose there are two branches, 0 and 0'. Miner receives 0 first. The probability of mining a block is proportional to the time spent mining. Miner thus (a) starts mining 0 immediately upon notification and (b) has a greater probability of finding a block on 0 than 0'. It is thus in Miner's interest for 0 to become the blockchain versus 0'. Since other miners are following a similar logic, it is in the miner's interest to propagate 0 over 0'.
Randomly selecting which branch to mine is rational only if (i) both branches arrive at the same time and (ii) there is no information about which branch other miners are showing preference towards.
The probability of finding a block does not change based on how long someone already has been mining.
Consider a fair coin - even if you get tails 20 times in a row, the probability of getting heads on the 21st try is still 50%.
In contrast, the probability of getting a heads at least once in 20 tries is 1-1/2^20.
By way of directly illustrating this, consider slot machines with identical payouts. Grandma has been inserting coins into slot machine A for twenty minutes, when suddenly slot machine A' is turned on. There's no difference between continuing to pump coins into slot machine A and switching slot machine A', the expected payoff is the same either way.
Analogies to slot machines and flipping coins obscures this fact.
Storing the minimum target nonce seen during mining has a key-space of size 256+96=352bits { midstate + { merkle_root, ntime, nbits } }.
So 1/2^352 chance of ever having a collision. Or 2.725094297605216460742E-107. 107 zeros between the decimal and the first interesting digit.
However you wouldn't have indexed this because ntime (the current time) is always going to be unique, and nbits (the current difficulty) might as well be too.
A single bit change in any part of the key completely changes the result, so there is no pattern you can infer by only storing a prefix.
Such a strategy is doomed.
EDIT: ntime is effectively unique as it is the Unix time and will roll over after many years, but the Bitcoin network requires mined blocks to have an ntime within threshold of the current actual time.
Your mistake is in the last point. The probability of finding a block in the next X time units is completely independent of what you did in the past (unless you managed to break the underlying cryptographic hash somehow ;-)). You can think of mining as repeated coin throws (with an extremely biased coin).
Tangentially, the best side effect of HFT seems to be that a lot of technical people have become more sophisticated in understanding incentive structures and contracts. I wonder how that affects funding decisions for startups of the ex-HFT crowd.