Bitcoin Forum
November 06, 2024, 09:48:22 AM *
News: Latest Bitcoin Core release: 28.0 [Torrent]
 
   Home   Help Search Login Register More  
Pages: [1]
  Print  
Author Topic: improving (cg)miner software speed with newer opencl kernels and/or code  (Read 196 times)
BitcoinSoloMiner (OP)
Member
**
Offline Offline

Activity: 144
Merit: 25


View Profile
December 23, 2022, 10:40:56 AM
Last edit: December 23, 2022, 12:15:51 PM by BitcoinSoloMiner
 #1

This post was created in the interest of academia (creating a paper on sha256 hashing speeds & collision attacks, if they can be increased and why? also quantum computing and the effects it can have on sha256 hashing is relevant do this discussion --- bitcoin mining and its software is a very good example)

some information from the users on this forum would be nice.

BITCOIN MINING INTRO & RULES OF THIS SUBFORUM
https://bitcointalk.org/index.php?topic=2415854.0
Mining software - This is for all posting of new BITCOIN mining and mining related software, pool software, proxies, controllers, monitors, web page design, apps etc. Discussion of software for education purposes to understand mining related functionality can go here. All altcoin mining related software will be moved to the altcoin mining section. No trojans, botnet, web page miners etc. are acceptable here - threads will be removed without warning and posters banned.

Here's a link to my previous topic to this subforum which was moved (buried):

need help modifying cgminer/hashfast to create proofs with more leading zeros
https://bitcointalk.org/index.php?topic=5430939.0

The idea of this topic is slightly different.

In hashcat, a well known hashing program, the hashing speeds achieved by this user with the sha256 algorithm are (for a rx6700xt AMDGPU):

https://hashcat.net/forum/thread-10901.html
Code:
---------------------------
* Hash-Mode 1400 (SHA2-256)
---------------------------
Speed.#5.........:  5209.6 MH/s
Speed.#6.........:  5206.2 MH/s
Speed.#*.........: 10415.7 MH/s

My own benchmarking with the same rx6700xt gives:

Code:
Speed.#2.........:  5069.9 MH/s


CGMiner gives a speed of:

Code:
GPU0                | (5s):2.337G (avg):2.339Gh/s

CGMiner is producing sha256 hashes at a speed 60% less than hashcat


Why is this?

Is it the more -up to date- 'optimized' opencl kernels hashcat is using?

Is it the fact that cgminer is looking for hashes with 8 or more leading zeros?

We are going to attempt to supply these hashcat kernels to cgminer and see if we can achieve 5GH/s.

Just how newer ASIC firmware (from bitmain - or braiins with their rust implementation) increases their efficiency/speed, we think up to date opencl kernel and mining software code can increase GPU efficiency/speed

Can cgminer code be modified to look for hashes with a different number of leading zeros? if so, how?

since my last topic was moved(buried), i want to repeat: this is for education purposes and not for altcoin discussion. This topic is an exercise and discussion for coders and enthusiasts

kano
Legendary
*
Offline Offline

Activity: 4620
Merit: 1851


Linux since 1997 RedHat 4


View Profile
December 23, 2022, 11:59:31 PM
Last edit: December 24, 2022, 12:13:03 AM by kano
 #2

You only create proofs with more leading zero by doing more hashes.
It's a statistical fact.

Internally it's the same in all hashing, ASIC of course also, it's 2 hashes, not one.
If you don't do the midstate work generation in CPU in cgminer, it's 3 hashes
(though that would be a massive waste since the first midstate hash can be used for the following 8 billion hashes)

p.s. you will find no collisions, you are wasting your time - remember it's 3 times through the sha256 loop - so yeah it's not gonna happen.
quantum computing is unrelated Smiley

Edit: if this is truly academic, then you are going about it the wrong way.
CPU mining using the code cgminer is forked from, and you will see the link at the top of ck's cgminer git,
will allow you to do the exact same academic research without having to spend thousands on an expensive GPU.
It will also clearly show you the parts you missed completely about it being a total of 3 hashes, repeating the 2nd and 3rd for each nonce value.

Pool: https://kano.is - low 0.5% fee PPLNS 3 Days - Most reliable Solo with ONLY 0.5% fee   Bitcointalk thread: Forum
Discord support invite at https://kano.is/ Majority developer of the ckpool code - k for kano
The ONLY active original developer of cgminer. Original master git: https://github.com/kanoi/cgminer
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!