Author

Topic: better algorithm to mine Bitcoin, was there any? (Read 142 times)

legendary
Activity: 3472
Merit: 10611
You can not change the protocol, for example the target (looks like leading zeros but we don't count zeros) because the nodes are enforcing those. You also can't break the algorithm itself since it hasn't worked for the past 21 years (SHA2 was created on 2001).
What you can do is to optimize the algorithm, just as many have done so far. For example by using the  characteristics of SHA2 you could slightly decrease the amount of computation needed to get the digest. But the thing about proof of work is that it works based on a value called "difficulty" and it is adjusted based on how fast everyone in total is computing hashes. So if you can compute more hashes (whether by optimizing the algorithm or by producing more efficient hardware like ASICs) it will re-adjust to prevent blocks from being mined faster than what the protocol wants.
legendary
Activity: 4466
Merit: 3391
I wonder if there were any attempts to come up with better algorithm that will allow you to mine BTC faster than others? I mean, if I understood correctly, all you have to do is run the hash function with the desired outcome, in this case, with the leading 17-19 zeros. So, is there better algorithms or bruteforcing is the only way?

Look up ASICBoost. It is a hashing optimization.
legendary
Activity: 2450
Merit: 4415
🔐BitcoinMessage.Tools🔑
I wonder if there were any attempts to come up with better algorithm that will allow you to mine BTC faster than others? I mean, if I understood correctly, all you have to do is run the hash function with the desired outcome, in this case, with the leading 17-19 zeros. So, is there better algorithms or bruteforcing is the only way?
One doesn't need to come up with a "better" algorithm for mining to add up new blocks to the blockchain at a higher pace. One can achieve that by slightly adjusting the code that governs the difficulty of the mining. For example, if we set the expected time of mining of 2016 blocks to 10080 minutes or 5040 minutes instead of the current 20160 minutes, it will automatically lead to a lower difficulty value and higher target for miners. It also will make a difficulty adjustment to take place every one week or three days, which will make the competition between miners even more intense. In short, by slightly changing only one value in the code, we can make bitcoin blocks be mined faster.

However, blockchain is made very slow intentionally so that a new block can be propagated over the network before the next one is mined to prevent constant disagreements between nodes and unexpected forks and chain reorgs. Paradoxically, if we make bitcoin blocks faster, it will result in very slow settlements because of uncertainty in the current state of the blockchain. That also will make the network more centralized since to verify very fast blocks of transactions, one needs decent hardware. Raspberry Pi is not going to handle fast blockchains. Hence, there will be a centralization of power where people are incentivized to build big data centers and outsource the running of full nodes.
staff
Activity: 3304
Merit: 4115
Technically there are other ways, they just aren't secure enough. Proof of Work is arguably the best option.

I wonder if there were any attempts to come up with better algorithm that will allow you to mine BTC faster than others?
Why would we want to mine it quicker? Bitcoin already has difficulty, which adjusts based on the hashrate of the entire network. The only concern I see with Proof of Work is the energy used. Although, I don't think it carries much weight. I mean, Proof of Work is what makes Bitcoin work, and what sets it apart from other implementations, which basically just aren't as secure. It's one of the big contributors to its success.
legendary
Activity: 2534
Merit: 6080
Self-proclaimed Genius
-snip- I mean, if I understood correctly, all you have to do is run the hash function with the desired outcome, in this case, with the leading 17-19 zeros.
You can't do that because all Bitcoin nodes will check if your "winning" block header's hash is valid by checking if that block's SHA256(SHA256(Block_Header)) hash matches.
Since you've used a different hashing algorithm, they will come up with a different result.
legendary
Activity: 2352
Merit: 6089
bitcoindata.science
I wonder if there were any attempts to come up with better algorithm that will allow you to mine BTC faster than others? I mean, if I understood correctly, all you have to do is run the hash function with the desired outcome, in this case, with the leading 17-19 zeros. So, is there better algorithms or bruteforcing is the only way?

Bitcoin is designed to work this way.
The whole security and the foundation of its blockchain is the Proof of Work, and the "work" is this "bruteforce" of hashing.

What you are suggesting, a "better algorithm" to create the desired hash without bruteforcing, is basically to break out SHA 256, reversing a hash function. You would be basically destroying cryptography.

The implications of your suggestion would be terrible for computer security and cryptography. You would be able to even reverse public keys to private keys:


https://abeldantas.com/mastering-bitcoin/



I created a brief explanation of how Proof of Work works long ago, but it is still valid (https://bitcointalksearch.org/topic/summary-of-proof-of-work-3317586)

Basically, you need computer power to generate as much hashes as possible, until you find a nonce (a number) that once hashed is low enough to "solve" the Proof of Work algorithm and create a new block.

As hash is a only way function (you cannot unhash anything), the only way to do so is by bruteforcing nonces (hashing random numbers, millions per second) and checking their hash.

You are suggesting that someone could build an algorithm that you would reverse the hash function: you choose the hash, then it would return you the nonce.



There is a nice demo of how Proof of Work works here:
https://andersbrownworth.com/blockchain/blockchain
member
Activity: 143
Merit: 36
I wonder if there were any attempts to come up with better algorithm that will allow you to mine BTC faster than others? I mean, if I understood correctly, all you have to do is run the hash function with the desired outcome, in this case, with the leading 17-19 zeros. So, is there better algorithms or bruteforcing is the only way?
Jump to: