Bitcoin Forum

Bitcoin => Development & Technical Discussion => Topic started by: coinscashout on March 30, 2016, 02:55:55 PM



Title: Different approaches in software to increase efficiency
Post by: coinscashout on March 30, 2016, 02:55:55 PM
Hi All

Is it possible to point out some software approaches which some companies have already implemented in terms of hashing more efficiently eg midstate calculations

I've been trying to read up some material but it is very difficult to understand as most are theories and actual companies don't (for obvious reasons) publish these things themselves.

Note: I use the term software but really all I mean is different ways or shortcuts into hashing.

A small list would be useful and then from there I can just do my own research more deeply into these


Title: Re: Different approaches in software to increase efficiency
Post by: ca333 on April 04, 2016, 08:29:55 PM
Hi All

Is it possible to point out some software approaches which some companies have already implemented in terms of hashing more efficiently eg midstate calculations

I've been trying to read up some material but it is very difficult to understand as most are theories and actual companies don't (for obvious reasons) publish these things themselves.

Note: I use the term software but really all I mean is different ways or shortcuts into hashing.

A small list would be useful and then from there I can just do my own research more deeply into these

this is a interesting article about mining software/algorithm optimization: http://www.i-programmer.info/news/149-security/6646-optimize-mining-bitcoin.html


Title: Re: Different approaches in software to increase efficiency
Post by: DuddlyDoRight on April 04, 2016, 10:40:30 PM
You mean like using CRC32 for first-stage hashing? If you mean cheating on hash functions I've seen this done around keccack(SHA3) and byte-cycles. The math around most is easy it's just the entropy and rounds that make it so expensive to defeat. This is why you seen big players in the bitcoin scene go to hardware optimizations instead of software algorithm optimizations.

If you're wanting an edge in mining of any coin you're probably not going to do it in software even with insanely talented math and coder people. It's probably all been tried and implemented in China by now. Which is why now you have impressively optimized ASIC designs.


Title: Re: Different approaches in software to increase efficiency
Post by: coinscashout on May 21, 2016, 04:27:35 PM
Thank you both.

Can I ask in terms of efficiency are most asic miners working on hardware efficiency or algorithmic. If algorithmic is there anything more that they can do other than not to re-hash the first 512 bits.

Also, with the link you provided above it reads that 0s can be re-used for another round how is that possible surely the whole thing needs to be rehashed


Title: Re: Different approaches in software to increase efficiency
Post by: DuddlyDoRight on May 23, 2016, 07:51:04 PM
Thank you both.

Can I ask in terms of efficiency are most asic miners working on hardware efficiency or algorithmic. If algorithmic is there anything more that they can do other than not to re-hash the first 512 bits.

Also, with the link you provided above it reads that 0s can be re-used for another round how is that possible surely the whole thing needs to be rehashed

ASIC miners use basic algorithms they just compete to cram as many ALUs and supporting units in to gate arrays as possible while having sustainable TDP. This means what they are really doing is investing in new chip manufacturing and porting old code. New chip with more gate-space.. More units.. Better performance:TDP.

I looked in to this at one time while looking for an edge in mining. I also looked in to bugs in mining servers and wallets which I'm still doing mostly by trying things with scripts and fuzzing. There isn't really anything out there unless you consider remote code execution bugs do to bad coding or the things that pop up when you have a lot of hashing power on the ledger.


Title: Re: Different approaches in software to increase efficiency
Post by: coinscashout on May 24, 2016, 09:28:10 PM
Really helpful info, thanks   :D


Title: Re: Different approaches in software to increase efficiency
Post by: 2c0de on May 24, 2016, 10:26:14 PM
I am no expert but the approaches in software can be of different types.

But the point nowdays is not to create mining software. But mining hardware ASICS.

So the question real is what trick can engineer do to make some efficient machine that can be produced TODAY with TODAY 's technology.

But that is not all, because if you make genious optimal chip it will burn in 1 second because there's so much transistors, it computes so fast so it overheats. In other words there are other considerations that are far more important. And that is before economic considerations.

If you want to understand, it's contest who makes better bow arrow,  a race who hunts more dinosaurs.

 we all know in the future there will be amazing breaktroughts. Just look at the new transistors that were announced currently there are CMOS, fet, finfet whatever.

In future there could be single atom transistors, or some epic new materials, or PET transistors up to 20 GHz ???

So I will tell you this, it is pointless to invent now some 'theoretical innovation" that will work only with today's technology, because tomorrow there could be whole different technology and the future chip will be efficient anyway, so everybody is going to throw your old today made chip with clever innovation to the trash anyway.

End of rant, so what can be done

So logically you have many double sha hashers on chip. every one tries different nonce and changes it. The results can be AND and you don't need to compare different hashes individually just the AND result for zeroes. Successful solution is so rare so you can retry manually if you find it tthis way. But I'm sure engineers know this and maybe is not as genious idea.

hash collision
It's possible to find recycled solution that after first SHA collides. But it's so difficult that nobody ever will do it. And even if, everybody on network will see it's recycled because the resulting hash will also collide. - stupid idea

study the equations. somebody can come up with good nonce guessers after studying sha equations. they don't have to be brilliant, just slightly better than random.
but I'm sure this will not the person think about the equations manually , or even use chalkboard or pen and paper. This way his brain will go retarded. The person must write some program that will do the difficult thinking.

bad nonce skippers - similiar you have good nonce planners, you can have bad nonce skippers. This is program who finds that some nonce sequence is worse and skips it. again this could be done from shasha equation, but just need to be slightly better than random ,excelent solution is not needed.


Title: Re: Different approaches in software to increase efficiency
Post by: coinscashout on June 23, 2016, 09:30:08 AM
Thanks.

A question I have on my mind is that if the extranonce can be changed (eg timestamp, transactional data), why is it that we can't manipulate this data to help in getting to our target.


Title: Re: Different approaches in software to increase efficiency
Post by: -ck on June 26, 2016, 11:56:34 AM
Thanks.

A question I have on my mind is that if the extranonce can be changed (eg timestamp, transactional data), why is it that we can't manipulate this data to help in getting to our target.
You can manipulate it all you like. That doesn't "get you to your target" since the unhashed data you're playing with has absolutely no predictable association whatsoever with the hashed data.