Why isn't the block hash used to calculate accumulated work?

4

Why is this idea flawed? It doesn't seem to be a bad idea at first, because the miners should be incentivized to extend existing chain, instead of to "remine existing blocks", since such "remining" apparently requires more work to be done.

What's the actual reason? Because it would make double spending easier? Or it would enable miners to do selfish mining when they occasionally find a block with extra-small hash? Or it would cause more forks / require more confirmations?

I don't think this problem is duplicate with another question, because difficulty decides validity of a single block, while accumulated work decides best chain.

Chris Chen

Posted 2018-12-12T21:29:11.130

Reputation: 770

2

Possible duplicate of Why aren't block hashes used directly as scores for difficulty purposes?

– chytrik – 2018-12-12T22:00:45.783

@chytrik I think this is a different question, because difficulty decides validity of a single block, while accumulated work decides best chain. – Chris Chen – 2018-12-12T22:04:18.840

the same principles apply: accumulated work is evaluated with each new block to decide the best chain, and thus it potentially affects the validity of one block against another at the same height. This leads to the answer: every valid hash must be ‘equally valid’, or else the game theory that incentivizes miners to always mine at the chain tip will be changed. – chytrik – 2018-12-12T22:36:23.920

@chytrik AFAIK, difficulty is evaluated with each old block of previous difficulty adjustment period, then accumulated work is evaluated with difficulty of current difficulty adjustment period (which also leads to inaccuracy). – Chris Chen – 2018-12-12T22:50:39.390

That is correct. And so evaluating accumulated work (ie, which chain is the longest chain) by using the actual block hash instead of the difficulty makes some block hashes 'better than others', and thus leads to problems with double-spend attacks, selfish mining, etc. – chytrik – 2018-12-12T23:05:29.230

Oh, evaluating accumulated work with difficulty should not lead to inaccuracy. I've probably made a mistake. – Chris Chen – 2018-12-12T23:11:52.447

Yes, the block hash must be less than the value defined by the difficulty. But your conclusion does not follow, because a block hash that is significantly below the difficulty target would be 'better' than one that is only just below it, thus altering the miner's incentives. For extended discussion we could use this site's chatroom: https://chat.stackexchange.com/rooms/8089/mempool

– chytrik – 2018-12-12T23:20:15.893

@chytrik The incentives of miners are indeedly altered, but, their incentive to mine at the chain tip still seems to stay unchanged. This is true even for selfish miners(when they don't have their private chains), even selfish miners won't remine against any existing block, they would just withhold their blocks privately. (Sorry, but I still don't have enough reputation to chat) – Chris Chen – 2018-12-12T23:49:28.037

Let us continue this discussion in chat.

– chytrik – 2018-12-12T23:56:41.810

Answers

1

The answer is because among the set of acceptable hashes, every hash is equally likely. See https://bitcoin.stackexchange.com/a/939/60443

There really hasn't been more work done just because the value is greater, as long as it meets the current difficulty. Nickel and diming the work done by comparing block hashes would create many more forks, thus requiring more confirmations to be sure a transaction is final.

JBaczuk

Posted 2018-12-12T21:29:11.130

Reputation: 6 602

The "apparent" work is 2x higher than actual work due to luck - said by G.Maxwell

– Chris Chen – 2018-12-12T22:05:51.147

2Yes, on average. But the point is that it is variable. Miners will sometimes get lucky and get lots of "weight" to their block, and sometimes not. And this will happen for no reason, and through no merit of their own. It would just randomize the mining process making convergence slower for no reason. – Pieter Wuille – 2018-12-13T06:43:21.617

@PieterWuille But block intervals are already variable. I've seen some people said that "such 'most apparent accumlated work' rule is on the contrary intended to eliminate forks! You see: whenever there is race condition between two branches, we just choose the branch with greater apparent accumulated work, bingo, forks eliminated!" – Chris Chen – 2018-12-13T08:45:39.533

I wonder if all the reasons that such idea is bad could be summed up as "that would make bitcoin vulnerable under adversarial situations like double-spends or selfish mining"? – Chris Chen – 2018-12-13T08:49:26.217

2@Chris Chen The variable time between blocks is a necessary evil, not something desirable. And introducing a way to deterministically choose between one block or another in case of a fork is also busted: it would mean miners would have an incentive to fork whenever the 'work' of the existing tip was low. Yes, the overall effect is that doing this simply hands power to an attacker - the slower the good guys converge, the more time the bad guys have to cause problems. – Pieter Wuille – 2018-12-13T17:57:46.720