News for hackers. Stuff that matters.
Re:Bitcoin hashrate drops nearly 40% as deadly U.S. storm un... by trifurcate on Monday December 26, 2022 @03:50PM (#34141712)
"Not quite squared", because the parent comment also started with "not quite".

The sibling comment is exactly right. Your odds of mining a specific block are altered, but this doesn't mean much. If everyone else but you disappeared from the network, without a difficulty retarget, your odds of mining the next specific block are 100%. The rate at which you mine these blocks is exactly the same as the rate at which you mine blocks when you represent 1% or 0.1% of the network hashrate.

Example: Fixed difficulty, so 1/1,000,000 hash wins, 1,000 hashes/sec.

a) You are 100% of the network hashrate. Your odds of finding the next block are 100%. After 500 seconds of mining, your odds of having mined 1 block are 50%. After 500 seconds, the network will have produced on average 0.5 blocks (I know, awkward.)

b) You are 1% of the network hashrate. Your odds of finding the next block are 1%. After 500 seconds of mining, your odds of having mined 1 block are 50%. After 500 seconds, the network will have produced on average 50 blocks.

Re:Bitcoin hashrate drops nearly 40% as deadly U.S. storm un... by lazide on Monday December 26, 2022 @04:21PM (#34142021)
Nope, see reply to the sibling comment.

If the OVERALL rate of exploration of the keyspace of valid hashes halves, the remaining half will take twice as long (on average) to find the winning value.

Whoever finds a winning value first stops the contest.

If I am 1% of the networks hashrate, and everyone but me disappears, my odds are indeed 100% of finding the next block - but that's not the right analogy here, because there is always someone else looking, and whoever is the first to find it wins.

The time you could expect that to take, if all but 1% of the hashrate disappears, is going to be 100x of the time (on average) it would take with the original hashrate. Unless it takes so long the difficulty target reduces, of course, and the odds change.

This is done infrequently to avoid someone gaming the system by kicking everyone else off to start being the sole miner with an economic amount of $$ spent.

You got lost at your example b I think because you seem to think that the odds of any particular hash attempt being a win have something to do with current aggregate hashrate (which is what we're discussing changing), but it does not. It only changes the odds of it being a match IN TIME.

With network hash rate being a rate (aka value over time), halving the value, doubles the time to completion on average.

The odds of any specific hash being a win is set by the difficulty target, which is based on HISTORIC AVERAGE hash rate, and only adjusts infrequently. When that is adjusted, it changes the odds. But that is done independently of this whole 'suddenly half the network disappears' event.

Re:Bitcoin hashrate drops nearly 40% as deadly U.S. storm un... by mlyle on Monday December 26, 2022 @04:41PM (#34142204)
I think you guys are talking past each other.

It doesn't matter what happens to the rest of the network--- you'll win the same number of blocks per year, whether you're the only miner or one of many miners. You'll win a greater proportion of blocks if there's fewer miners, but the same number overall.

Only difficulty changing changes this.

Re:Bitcoin hashrate drops nearly 40% as deadly U.S. storm un... by lazide on Monday December 26, 2022 @04:56PM (#34142329)
That is the part that is false.

You will not win the same number of blocks per year, and fundamentally can’t, unless you have the same share of the overall mining hashpower that entire time.

Bitcoin literally could not work if that was not the case.

If your share of the hash power doubles, because your total hashes stayed the same but the overall hash power halved, you’ll ‘win’ twice as many blocks.

Changing difficulty does not change this.

Changing difficulty only changes how much hashpower is required (on average) to mine a block, and indirectly the number of blocks produced over over time, for a given hashpower.

Difficulty changes the odds of any given hash attempt winning. It does not change the odds you will find a winning hash before anyone else does. That is based on your proportion of the overall hash rate.

This is why there is such strong incentive to add more hashpower at lower per-hash price to mine Bitcoin. Because it increases individuals share of the overall hashrate, they end up mining more blocks, and they get more block rewards for it.

Less efficient hashers get less and less share of winning blocks as this happens, until it becomes uneconomic for them to hash at all.

If all miners dropped off (or 99%), blocks won’t keep getting mined every 5 minutes. They’ll take forever to mine until the network adjusts the difficulty, which takes awhile - 2016 blocks, to be precise.

In fact, with a sufficiently high hash rate setting a high difficulty, then dropping to a sufficiently low hash rate right after a difficulty adjustment, it might never adjust back, and it could be years or decades to mine the next block.

Re:Bitcoin hashrate drops nearly 40% as deadly U.S. storm un... by Dylan16807 on Monday December 26, 2022 @06:35PM (#34143135)
> Difficulty changes the odds of any given hash attempt winning. It does not change the odds you will find a winning hash before anyone else does. That is based on your proportion of the overall hash rate.

Nobody cares about who finds it first.

They care about blocks per hour.

> If all miners dropped off (or 99%), blocks won’t keep getting mined every 5 minutes. They’ll take forever to mine until the network adjusts the difficulty, which takes awhile - 2016 blocks, to be precise.

And until that difficulty changes, the remaining miners will find they still get the same number of blocks per hour. In the time the network used to find 1000 blocks, of which they got 10, the network will now find 10 blocks, and they will get... 10.

Re:Bitcoin hashrate drops nearly 40% as deadly U.S. storm un... by lazide on Monday December 26, 2022 @07:09PM (#34143348)
Since the only person who gets paid is the person who finds the hash for any given block first, you better believe people care who finds it first for a block!

Since SHA256 has not yet been broken, it will over time be in proportion to each miners contribution to the overall hash rate. By design.

If someone gets a valid value for a block and gets it in the chain (mines the block) is 100% dependent on if anyone else finds it first and gets it accepted by the network.

As to the rest of it - yikes. Not only is there no mechanism whatsoever that would do what you seem to think happens, but it makes zero sense if you have a cursory idea of how Bitcoin is constructed, or what miners even do.

Good luck, and adios!

Re:Bitcoin hashrate drops nearly 40% as deadly U.S. storm un... by Dylan16807 on Monday December 26, 2022 @07:15PM (#34143386)
Nobody wants any particular block.

They want to find A block.

So two seconds after someone else finds a block, they're working on the next block. They don't care about the event at all. Their expected reward per hash doesn't change at all. Their expected reward per hour doesn't change at all.

Finding a hash "first" is an irrelevant idea, because everyone stops searching for that block instantly, and starts searching for the next block. Roughly zero hashes get wasted.

> As to the rest of it - yikes.

I'm quoting the scenario in your earlier post, you goofus.

> The time you could expect that to take, if all but 1% of the hashrate disappears, is going to be 100x of the time (on average) it would take with the original hashrate. Unless it takes so long the difficulty target reduces, of course, and the odds change.

It takes the remaining miners 100x as long to find blocks.

But they get to keep 100x as many of the found blocks.

So they still get the same reward per hour. Until the difficulty adjusts.

This is basic arithmetic.

> Since SHA256 has not yet been broken, it will over time be in proportion to each miners contribution to the overall hash rate. By design.

In proportion to each miner's contribution, and also in proportion to how many blocks per minute are being found.

If you don't wait for a difficulty update, then removing some amount of miners changes the block-finding rate in exact inverse proportion. So the blocks-per-hour of each miner stays exactly the same.

Remove half the miners, blocks are found half as fast until difficulty updates.

Triple the number of miners, blocks are found three times as fast until difficulty updates.

2x win rate * 1/2x block rate = 1x

1/3x win rate * 3x block rate = 1x

Until the difficulty updates.

Re:Bitcoin hashrate drops nearly 40% as deadly U.S. storm un... by lazide on Tuesday December 27, 2022 @12:09PM (#34150746)
Ah hah, thanks! I’m finally understanding the relationship you’re discussing. Thanks!
Re:Bitcoin hashrate drops nearly 40% as deadly U.S. storm un... by mlyle on Monday December 26, 2022 @08:21PM (#34143857)
> You will not win the same number of blocks per year, and fundamentally can’t, unless you have the same share of the overall mining hashpower that entire time.

But, unless difficulty changes, the blockrate changes.

If you keep the entire existing network, and say I'm 0.002% of the hashpower; I'll win 1 block per year, losing 99.998% of blocks.

If the whole rest of the network goes away except me, it'll take me 1 year to mine a block. I lose 0% of blocks.

But in either case, I mine one block per year.

Re:Bitcoin hashrate drops nearly 40% as deadly U.S. storm un... by tromp on Tuesday December 27, 2022 @04:28AM (#34147033)
> If your share of the hash power doubles, because your total hashes stayed the same but the overall hash power halved, you’ll ‘win’ twice as many blocks.

This is wrong. Each of your hashes (the number of which in a given period is fixed as you admit) either meets the difficulty target or not. If it does, you win a block reward. Otherwise you don't.

The only impact other miners have on this is how often you have to rebuild your candidate block in order to always mine on top of the latest block.

Please just think this through before replying...