4 ms·
Eh, not quite. There is an important distinction here in how it actually works. The Bitcoin chain difficulty is essentially the number of random lottery ticket
by lazide 4y ago
Eh, not quite. There is an important distinction here in how it actually works.
The Bitcoin chain difficulty is essentially the number of random lottery tickets ‘issued’ for a given block (size of hash space hashes will be generated in).
The first miner to get a winning lottery ticket wins the block rewards. (Each hash being a ‘ticket’). The space is typically insanely large, think 10’s of trillions.
Sometimes that happens really fast, sometimes it takes a long time. The difficulty (number of tickets) adjusts at periodic intervals to keep the average winning frequency at around 5 minutes based on the current quantity of hashing, but the actual win rate varies a lot.
So cutting actual hash power in half (by taking half of miners off line) gives any single miner remaining twice the odds of getting a block reward. But it will likely take twice as long hashing, and the blocks will mine about half the speed of usual (think 10 mins avg instead of 5), unless the difficulty resets.
- trifurcate 4y agoNot quite squared. The hashrate of the rest of the network does not directly matter to you. Only the difficulty matters. Without a difficulty readjustment, cutting actual hash power in half does not double your odds. Think of it like this: if the difficulty is such that there is 1 winning hash out of 1 million possible hashes (oversimplified), and if your hardware calculates 1,000 hashes per second, then your odds of finding a winning hash in 1 second is 1/1,000. Notice how this odds calculation does not take as an input what the other miners are doing. Of course, after a difficulty readjustment, your odds will actually change; that is the entire purpose of the difficulty target. (This comment ignores block header propagation etc. affecting mining latency, which will change mining overhead slightly if block times double)
- lazide 4y agoNot sure where you got squared from? If half the hash rate disappears, your odds do indeed double, as every hash anyone does has the same odds of success, and with has of your competition gone, you now have twice the odds of being the one that gets it. It’s a (approximate to many decimal places) linear relationship. If you had 1% odds, you’d now have 2% odds in the ‘half the hash power disappears’ situation.
- Anon1096 4y agoI don't have expertise in this, but wouldn't it be that your chance of mining a specific block doubles? I don't believe it would affect your overall profitability, because in the inverse case of the amount of miners doubling, if you lose out on a specific block, you can just start mining the next one instead, so on average it should be the same. And you don't lose out on work because of the high randomness of winning hashes.
- lazide 4y agoWith only one winning block (generally), yes your chance of mining the specific winning block doubles. There is no explicit co-ordination regarding blocks mined, and no hashes tried by other miners have any impact on you or your odds, except if they win, as there is no (known) co-ordination between (independent) miners on what has or has not been tried yet - any block which produces a valid next-in-chain value is the 'right' one, and every miner who gets a value which isn't the right one, got a wrong one.
- tromp 4y ago> you now have twice the odds of being the one that gets it This is not the right way to think about it. Someone else publishing a valid block doesn't deprive you of a reward. You just continue mining on top of their now latest block. When a miner's hash meets the difficulty target, they have a valid block that they publish, and will collect its reward (except in the unlikely case of another miner finding a valid block at almost exactly the same time). The amount of rewards a miner collects thus depends solely on how often their hashes meet the difficulty target, irrespective of the total hashrate.
- lazide 4y agoEh, we're saying similar things, but you're wrong in a fundamental detail - and you're making it really confusing for everyone who doesn't understand what is really going on. The rewards a miner collects do not depend solely on how often their hashes meet the difficulty target. Otherwise, every miner could keep mining prior blocks forever until they got a hash that matched, and collect the reward for that block. But that isn't allowed to happen. The first miner that gets a block accepted by the network with a valid hash wins. A block can only be mined once, by one miner. Otherwise, transactions would be double spent, or blocks double mined. Your individual odds of being that miner are directly proportional to the amount of hash power being used to mine the current, most recent block. The window of time you have (aka the 'time until the lottery drawing') is until someone finds a winning hash to the current block. When there is a conflict/split in the blockchain, the longest/highest chain of blocks wins, and everything on the 'split' chain gets ignored. The algorithm bitcoin uses to mine is a rather simple one. 1) Collect validated transactions 2) Add the block metadata, such as prior/highest current block (this is what makes it a block chain), this miners metadata (if any), and the block reward address if this block wins. 3) Add/Change the blocks random nonce 4) Construct a block by putting all these together into the binary format. 5) Hash it 6) If the produced output hash has the right number of zeros in it (really) to match the difficulty target, it is a winning block. Publish it, and if the network accepts and builds more blocks on top of it, you can spend your reward. Otherwise, go back to 3. The difficulty target is partitioning up the bitspace to determine the odds of 'winning' blocks, just like I'm describing using the lottery ticket analogy. There is no way any miner can change their odds here (or 'try to meet the difficulty target'), unless they collude with others to avoid already tried hashes/nonces for the same exact block values, which they have negative incentive to do. In fact, independent miners have every incentive to make their opponents try the things they already know won't work. Removing half the hash power would double the chances (all other things remaining the same) of the remaining hashers winning, as there is now half the number of competitors randomly trying to get a winning hash, as the winning hashes are randomly distributed. It also doubles the time to find a winning hash, all other things remaining the same, as there is now half the number of players trying random values. (or half the number of random attempts to find the right value). Unless someone has broken SHA-256, Every active miner has the same odds on any hash attempt to get the winning hash value. That means everyone has to try every value within that space. And they won't know what value they'll get from hashing until they do the actual hashing (aka do the work). That's pretty fundamental to the protocol. Increasing/changing difficulty targets isn't linear in impact, but that's not related to what is being discussed here, as the target itself isn't changing. Just available hashing power.
- deleted 4y ago[deleted]