Bitcoin Forum
April 28, 2024, 03:23:37 PM *
News: Latest Bitcoin Core release: 27.0 [Torrent]
 
   Home   Help Search Login Register More  
Pages: [1]
  Print  
Author Topic: Halving double-hash instruction count  (Read 1118 times)
Sonoftexas (OP)
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?
1714317817
Hero Member
*
Offline Offline

Posts: 1714317817

View Profile Personal Message (Offline)

Ignore
1714317817
Reply with quote  #2

1714317817
Report to moderator
1714317817
Hero Member
*
Offline Offline

Posts: 1714317817

View Profile Personal Message (Offline)

Ignore
1714317817
Reply with quote  #2

1714317817
Report to moderator
"Bitcoin: mining our own business since 2009" -- Pieter Wuille
Advertised sites are not endorsed by the Bitcoin Forum. They may be unsafe, untrustworthy, or illegal in your jurisdiction.
bob123
Legendary
*
Offline Offline

Activity: 1624
Merit: 2481



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), ABCbits (1), hugeblack (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 (OP)
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: 27


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), ABCbits (1), hugeblack (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 (OP)
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
Legendary
*
Offline Offline

Activity: 2212
Merit: 6359


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.

█▀▀▀











█▄▄▄
▀▀▀▀▀▀▀▀▀▀▀
e
▄▄▄▄▄▄▄▄▄▄▄
█████████████
████████████▄███
██▐███████▄█████▀
█████████▄████▀
███▐████▄███▀
████▐██████▀
█████▀█████
███████████▄
████████████▄
██▄█████▀█████▄
▄█████████▀█████▀
███████████▀██▀
████▀█████████
▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀
c.h.
▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄
▀▀▀█











▄▄▄█
▄██████▄▄▄
█████████████▄▄
███████████████
███████████████
███████████████
███████████████
███░░█████████
███▌▐█████████
█████████████
███████████▀
██████████▀
████████▀
▀██▀▀
philipma1957
Legendary
*
Offline Offline

Activity: 4102
Merit: 7768


'The right to privacy matters'


View Profile WWW
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.

▄▄███████▄▄
▄██████████████▄
▄██████████████████▄
▄████▀▀▀▀███▀▀▀▀█████▄
▄█████████████▄█▀████▄
███████████▄███████████
██████████▄█▀███████████
██████████▀████████████
▀█████▄█▀█████████████▀
▀████▄▄▄▄███▄▄▄▄████▀
▀██████████████████▀
▀███████████████▀
▀▀███████▀▀
.
 MΞTAWIN  THE FIRST WEB3 CASINO   
.
.. PLAY NOW ..
jstefanop
Legendary
*
Offline Offline

Activity: 2090
Merit: 1396


View Profile
May 08, 2019, 01:37:06 PM
Last edit: May 08, 2019, 10:24:02 PM by frodocooper
Merited by dbshck (4), hugeblack (1), 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
tim-bc
Full Member
***
Offline Offline

Activity: 538
Merit: 175


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
*
Online Online

Activity: 3612
Merit: 2507


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 -    My info useful? Donations welcome! 1FuzzyWc2J8TMqeUQZ8yjE43Rwr7K3cxs9
 -Sole remaining active developer of cgminer, Kano's repo is here
-Support Sidehacks miner development. Donations to:   1BURGERAXHH6Yi6LRybRJK7ybEm5m5HwTr
Pages: [1]
  Print  
 
Jump to:  

Powered by MySQL Powered by PHP Powered by SMF 1.1.19 | SMF © 2006-2009, Simple Machines Valid XHTML 1.0! Valid CSS!