top | item 7287112

Bitcoin mining the hard way: the algorithms, protocols, and bytes

144 points| lelf | 12 years ago |righto.com | reply

20 comments

order
[+] verroq|12 years ago|reply
I have written a proxy pool server (https://github.com/dogestreet/proxypool) in Haskell if anybody wants to check it out. It's a Stratum to Stratum protocol proxy, it lets you create a mining pool that mines into another mining pool.

(Disclaimer, only P2Pool upstreams work for now, I'm trying to get it to work with stratum-mining).

[+] verroq|12 years ago|reply
Just an update, it now works for all upstreams. As long as they are not using a buggy version of cgminer - v3.7.2
[+] plg|12 years ago|reply
Ironically, the most cost efficient way of acquiring BTC today may well be to go out into the world and earn dollars (e.g. a job) and then use them to purchase BTC from an exchange.
[+] wmf|12 years ago|reply
People forget that this was intended all along. Mining exists to secure Bitcoin; Bitcoin does not exist to serve miners.

Back when people used gold coins very few of them were miners either.

[+] vertex-four|12 years ago|reply
No, the most cost efficient is likely to go out into the world and earn BTC (e.g. a job). It's just that it's a bit difficult to find people who have BTC to pay you with at the moment.
[+] durkie|12 years ago|reply
one thing i've never been clear on: what happens after the last bitcoin is mined?

it seems like if there isn't a reward of BTC for mining the block (and you're just relying on transaction fees), then mining will become a lot less lucrative/interesting to folks. so do lots of people then drop of out of the mining game, and then difficulty decreases until mining is easy enough to be worth the transaction fees? do transaction fees go up?

[+] zwily|12 years ago|reply
The reward just keeps halving, so it only approaches 0 (well, until we run out of digits of course). And by the time that happens, transaction fees will probably already be more valuable than the reward.
[+] joveian|12 years ago|reply
Thanks, I was just trying to explain bitcoint recently but didn't know enough of the details so I'll pass that along.

I find the linked hashchain rate chart and the 1000x increase over the past year to be really interesting when considering that bitcoin relies on 50% of that being honest. The difference in processing power used in hashing now vs. about a month ago would be enough to own the system a month ago.

[+] nwh|12 years ago|reply
The introduction of new hardware (~difficulty) will level off fairly soon, we're reaching efficiency limits in what people can produce. I don't think we are at the technical limit, just at the limit of what the current companies involved are capable of. Eligius controls a large portion (~20%) of the hashrate, it's somewhat reassuring that they are known to be acting in good faith (geddit?).
[+] bamos|12 years ago|reply
I don't know much about Bitcoins, but is there a large risk of tainted workers in a pool that are reverse engineered and have knowledge of the part of the algorithm they're helping with? Then, if they detect they mined a coin, they disconnect from the pool, don't report the result, and take all the profit.

I couldn't find anything with a quick search, but would be interested to read more about (client-side)? security vulnerabilities of pooled mining.

[+] kens|12 years ago|reply
I mentioned that in the article. A miner can't "steal" a block they solved for a pool. The miners are working on a block that pays the reward to the pool. If the miner successfully mines a block and bypasses the pool, the address in the block is still the pool's address, so that's still where the 25 bitcoins go. If the miner tries to change the address, the hash changes and the block is no longer valid, so the miner can't submit the tampered block.

There is a theoretical attack where the miner throws away a successful block, so nobody gets the reward and the pool suffers. But it's a whole lot of work just to annoy people and this solution-witholding attack isn't viewed as a real problem: http://bitcoin.stackexchange.com/questions/1338/how-is-block...

[+] gus_massa|12 years ago|reply
Previous Discussion: https://news.ycombinator.com/item?id=7162153 (216 points, 22 days ago, 26 comments)
[+] kens|12 years ago|reply
That's my previous article on generating transactions manually. The current article continues where that left off, discussing mining.

I wanted the titles to show the articles are related, but I think I've caused confusion. If someone has a better title suggestion, please let me know. (Genuine request, not sarcasm.)