Bitcoin Forum
September 20, 2019, 02:11:26 AM *
News: If you like a topic and you see an orange "bump" link, click it. More info.
 
   Home   Help Search Login Register More  
Pages: [1]
  Print  
Author Topic: Halving double-hash instruction count  (Read 796 times)
Sonoftexas
Newbie
*
Offline Offline

Activity: 3
Merit: 0


View Profile
October 30, 2018, 09:55:22 PM
 #1

I haven't followed bitcoin since before ASICs, and I remember when people were trying to squeeze every optimization they could out of the hashing algorithm in the gpu codes.

I didn't know where to put this thread, but my question is about how ASICs are optimized. If I managed to find an extremely good optimization that somehow halved the instruction count needed for a double hash, is that interesting to the ASIC designers? I would think it would save power consumption at least. If not halving, what ratio is interesting? A tenth?
Advertised sites are not endorsed by the Bitcoin Forum. They may be unsafe, untrustworthy, or illegal in your jurisdiction. Advertise here.
1568945486
Hero Member
*
Offline Offline

Posts: 1568945486

View Profile Personal Message (Offline)

Ignore
1568945486
Reply with quote  #2

1568945486
Report to moderator
1568945486
Hero Member
*
Offline Offline

Posts: 1568945486

View Profile Personal Message (Offline)

Ignore
1568945486
Reply with quote  #2

1568945486
Report to moderator
1568945486
Hero Member
*
Offline Offline

Posts: 1568945486

View Profile Personal Message (Offline)

Ignore
1568945486
Reply with quote  #2

1568945486
Report to moderator
bob123
Legendary
*
Offline Offline

Activity: 1022
Merit: 1518



View Profile WWW
October 31, 2018, 09:09:53 AM
Last edit: October 31, 2018, 08:39:46 PM by frodocooper
Merited by dbshck (4), OgNasty (2), ETFbitcoin (1)
 #2

ASIC's (Application-specific integrated circuit's) can only perform one task. But this one task is done extremely efficiently.

You can imagine it like this:
You need to set the power at the correct pins (which basically is the input) and after the electricity has gone trough the hardware you are measuring which bits are set (output; effectively the hash).
The time it needs to calculate a hash is the time the electricity needs to run through the hardware (not exactly, but basically).

Optimization is always good (and desired). But how do you think you have achieved this optimization? Software-wise there isn't much you can do.
You would need to optimize it hardware-wise.

Sonoftexas
Newbie
*
Offline Offline

Activity: 3
Merit: 0


View Profile
October 31, 2018, 02:32:27 PM
 #3

You need to set the power at the correct pins (which basically is the input) and after the electricity has gone trough the hardware you are measuring which bits are set (output; effectively the hash).
The time it needs to calculate a hash is the time the electricity needs to run through the hardware (not exactly, but basically).

Yeah, so currently a double hash is like 2000+ sequential operations, so there's a maximum frequency you can operate while you wait for the output. If you somehow could use just 1000 gates, you could run it ~twice as fast, right? Or is there some other limitation?
DDAsics
Newbie
*
Offline Offline

Activity: 11
Merit: 26


View Profile
November 03, 2018, 07:46:55 PM
Last edit: November 03, 2018, 08:37:57 PM by frodocooper
Merited by frodocooper (5), dbshck (4), NotFuzzyWarm (2), vapourminer (1), ETFbitcoin (1)
 #4

CPU like instruction counts have very little to do with designing an ASIC. ASICs are designed using an RTL language. RTL stands for register transfer level, and is totally unrelated to CPU style sequential instructions. Essentially, an ASIC design means setting up a gate pipeline that has a certain delay to produce the first output, but after that short delay the circuit spits out 1 solution every clock cycle.

It is like turning on a hose. There is a delay for the water to move from the faucet to the spout, but once water starts coming out, it comes out in a continuous stream.

Nobody does SHA256 hashing with computer like instructions. It is all fully unrolled pipelines, with as many of them crammed onto a piece of silicon as possible. It is not done as a sequential operation in the way you are thinking of it. What you need to do if you want it to be interesting to ASIC manufacturers is to come up with a way to significantly reduce the number of transistors in a fully pipelined circuit.
Sonoftexas
Newbie
*
Offline Offline

Activity: 3
Merit: 0


View Profile
November 04, 2018, 10:56:04 PM
 #5

but after that short delay the circuit spits out 1 solution every clock cycle.

Ah, so you're saying that as soon as the signal for one hash leaves a transistor to go the next, the next hash is already incoming to that first transistor? Then the limit on clock speed is only the switching speed of one transistor, and so there's no way to really improve it? Would reducing the number of transistors just reduce the power consumption then?
mikeywith
Hero Member
*****
Online Online

Activity: 532
Merit: 1197


be constructive or S.T.F.U


View Profile
November 08, 2018, 02:34:35 AM
 #6

i do not understand why some replies implies that there is nothing much that can be done on the software layer. if what they say is true then how do you explain the effect of overt/covert asicboost? it is certainly far from being "double" the performance, but there are things on the software side that can improve hashing.

philipma1957
Legendary
*
Offline Offline

Activity: 2590
Merit: 1890



View Profile
May 02, 2019, 11:51:12 PM
Last edit: May 03, 2019, 12:42:42 AM by frodocooper
 #7

i do not understand why some replies implies that there is nothing much that can be done on the software layer. if what they say is true then how do you explain the effect of overt/covert asicboost? it is certainly far from being "double" the performance, but there are things on the software side that can improve hashing.

But the chip has patterns burned into it to allow that.

So while the software turns it on and off the switch for boost on/off is built into the chip.

But others know more about this than I do.

I see BTC as the super highway and alt coins as taxis and trucks needed to move transactions.
jstefanop
Legendary
*
Offline Offline

Activity: 1582
Merit: 1228


View Profile
May 08, 2019, 01:37:06 PM
Last edit: May 08, 2019, 10:24:02 PM by frodocooper
Merited by dbshck (4), frodocooper (1)
 #8

The math for a single SHA256 hash is already pretty simple linear operation. Transistor counts to perform this has already been optimized at the bare transistor layer with companies like bitmain and Co pouring billions into these optimizations over the last 5 years.

I guess you could stumble across a new mathematical theory that produces that same SHA256 output using a completely different simpler algorithm, but good luck with that Wink.

Project Apollo: A Pod Miner Designed for the Home https://bitcointalk.org/index.php?topic=4974036
FutureBit Moonlander 2 USB Scrypt Stick Miner: https://bitcointalk.org/index.php?topic=2125643.0
LTC:LX5vpxrQE4eLRLPobKwZhw2comkKFCh3p4 - BTC:14w9Lea6kdVzspJk8TQRe7qSYu9LhzJJsh
tim-bc
Full Member
***
Offline Offline

Activity: 490
Merit: 140


View Profile
July 22, 2019, 07:53:59 PM
 #9

But the chip has patterns burned into it to allow that.

So while the software turns it on and off the switch for boost on/off is built into the chip.

But others know more about this than I do.
Phil is right, the BM1387 chip used in the S9 was designed with asicboost in mind from the beginning (as an option, not as a necessity). The recent firmwares simply provide the software support necessary to actually gain that ~13% power savings.

Ignore scammers on Skype, Telegram, etc. I will only ever contact you via forum PMs. See profile for fingerprint.
NotFuzzyWarm
Legendary
*
Offline Offline

Activity: 1932
Merit: 1327


Evil beware: We have waffles!


View Profile
July 22, 2019, 08:55:49 PM
Last edit: July 23, 2019, 02:52:49 AM by frodocooper
 #10

Phil is right, the BM1387 chip used in the S9 was designed with asicboost in mind from the beginning (as an option, not as a necessity). The recent firmwares simply provide the software support necessary to actually gain that ~13% power savings.

Correct but AB does that by incrementing the starting value of work sent to the chips 2-4 times and then reusing it - NOT by 'halving the instruction count'. Do a search for the ASICBOOST whitepaper to find out what it does.

For bitcoin to succeed the community must police itself - Joshua Zipkin aka Joshua Alexander leaked AMT A1 miner skype chats
How a miner mfgr SHOULD operate: HaggsFIN trip to Canaan My info useful? Donations welcome! 1Fuzzyk398kDWVjuC5qPX5v6CjSkvbgAbd
-Support Sidehacks miner development. Donations to:   1BURGERAXHH6Yi6LRybRJK7ybEm5m5HwTr
Jonson Archer
Newbie
*
Offline Offline

Activity: 4
Merit: 0


View Profile
September 19, 2019, 06:23:32 PM
 #11

my quarry is about how ASICs are optimized! If I managed to find an tremendously good optimization that in some way halved the instruction count needed for a double hash, is that exciting to the ASIC designers?  Angry Angry
Pages: [1]
  Print  
 
Jump to:  

Sponsored by , a Bitcoin-accepting VPN.
Powered by MySQL Powered by PHP Powered by SMF 1.1.19 | SMF © 2006-2009, Simple Machines Valid XHTML 1.0! Valid CSS!