Bitcoin Forum
April 26, 2024, 01:03:20 AM *
News: Latest Bitcoin Core release: 27.0 [Torrent]
 
   Home   Help Search Login Register More  
Pages: [1]
  Print  
Author Topic: Testing my own hashing code (continued).  (Read 131 times)
Michael Rolle (OP)
Newbie
*
Offline Offline

Activity: 3
Merit: 0


View Profile
May 26, 2019, 08:28:45 AM
Last edit: May 26, 2019, 06:30:02 PM by Michael Rolle
 #1

(Edit) Reply to the last post of my previous topic from May 25, #5145912.0, "Testing my own hashing code".  I wound up accidentally creating a new topic here.

(Edit) Change 2x to 3x speed improvement.

Yes, I assumed that Bitcoin Core was an application that used external mining hardware.  That must be some other application that I was thinking of.
Looks like Bitcoin Core is more or less the original Satoshi reference implementation, and it does the hash within the program in software.
I appreciate the pointer to the sha256.cpp.  It's interesting reading.
I see that it has different versions for various x86 instruction sets, including the SHA instructions.  I can just replace the SHA version with my own.  I'm running on a Ryzen, which has the SHA instructions.

I'm curious about interfacing with a rig.  Can you tell me if the rigs being sold these days interface directly to the bitcoin network or whether they interface with a computer which interfaces with the bitcoin network.  In the latter case, what software is available to run on the computer, and is the interface between the computer and the rig standardized, or does the software need to be customized for each model of rig out there?

By the way, I believe my own software can do hashes more than three times as fast as that which comes with Bitcoin Core, because I've written it in assembler and taken care with the order of the instructions.  On the Ryzen, the latency of the SHA256RNDS2 instruction limits the time of a double hash to 192 cycles (3 64-byte blocks with 64 cycles each).  However, I've worked out a way to do multiple hashes in 64 cycles per hash, and that's the factor of 3 I referred to.  When I get around to it, I'll run a speed test on the sha256_shani code and post the results here.

Would there be any serious interest in publishing my code as part of Bitcoin Core, and would it be possible to license this particular module, or perhaps publish it as shareware, and earn a little money from it?  Obviously nobody would pay for the program to do mining for serious profit, because the power to speed ratio is hundreds of times too high.  But would anyone pay a little money for a 2x speedup to Bitcoin Core or any other product that does hashing in software?  I'd welcome any opinions about this.
1714093400
Hero Member
*
Offline Offline

Posts: 1714093400

View Profile Personal Message (Offline)

Ignore
1714093400
Reply with quote  #2

1714093400
Report to moderator
1714093400
Hero Member
*
Offline Offline

Posts: 1714093400

View Profile Personal Message (Offline)

Ignore
1714093400
Reply with quote  #2

1714093400
Report to moderator
Be very wary of relying on JavaScript for security on crypto sites. The site can change the JavaScript at any time unless you take unusual precautions, and browsers are not generally known for their airtight security.
Advertised sites are not endorsed by the Bitcoin Forum. They may be unsafe, untrustworthy, or illegal in your jurisdiction.
1714093400
Hero Member
*
Offline Offline

Posts: 1714093400

View Profile Personal Message (Offline)

Ignore
1714093400
Reply with quote  #2

1714093400
Report to moderator
1714093400
Hero Member
*
Offline Offline

Posts: 1714093400

View Profile Personal Message (Offline)

Ignore
1714093400
Reply with quote  #2

1714093400
Report to moderator
1714093400
Hero Member
*
Offline Offline

Posts: 1714093400

View Profile Personal Message (Offline)

Ignore
1714093400
Reply with quote  #2

1714093400
Report to moderator
achow101
Moderator
Legendary
*
expert
Offline Offline

Activity: 3374
Merit: 6535


Just writing some code


View Profile WWW
May 26, 2019, 04:18:53 PM
Merited by bones261 (2), ABCbits (1)
 #2

Bitcoin Core does not interface with ASIC miners directly. Bitcoin Core no longer contains efficient mining code because mining with a CPU is pointless and just a waste of energy. The implementation of SHA256 is just used for the computation of the hashes used all over Bitcoin, not for any mining purposes.

I'm curious about interfacing with a rig.  Can you tell me if the rigs being sold these days interface directly to the bitcoin network or whether they interface with a computer which interfaces with the bitcoin network.  In the latter case, what software is available to run on the computer, and is the interface between the computer and the rig standardized, or does the software need to be customized for each model of rig out there?
Asics these days can either connect to a mining pool directly or connect to a driver running on a computer which connects to the pool. Either way, they usually run some version of cgminer or bfgminer which are software that can communicate with these devices. These software also speak the stratum protocol used by pools and the getblocktemplate protocol used by Bitcoin Core (and some other pools).

Would there be any serious interest in publishing my code as part of Bitcoin Core, and would it be possible to license this particular module, or perhaps publish it as shareware, and earn a little money from it?
No, not as a part of Bitcoin Core.

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!