Bitcoin Forum
June 20, 2024, 08:07:34 AM *
News: Voting for pizza day contest
 
  Home Help Search Login Register More  
  Show Posts
Pages: [1]
1  Bitcoin / Development & Technical Discussion / Re: Pool difficulty for compare wtih blockheader ?? on: April 16, 2021, 09:33:28 PM
So what i have done here is true?

Code:

        public static bool FinalCompare(byte[] hash, byte[] target)
        {
            for (int i = hash.Length - 1; i >= 0; i--)
            {
                if ((hash[i] & 0xff) > (target[i] & 0xff))
                    return false;
                if ((hash[i] & 0xff) < (target[i] & 0xff))
                    return true;
            }
            return false;
        }

2  Bitcoin / Development & Technical Discussion / Re: Pool difficulty for compare wtih blockheader ?? on: April 15, 2021, 07:28:16 PM
Actually i am writing in c# and i am just a mechanical engineer and trying to understand base things. i am weak about bits and bytes and i am learning it. Ok than;
 
1.Pool difficulty is 65536 -> 32 bit integer value?? (so the target is : 0,0000152587890625) ?
2.Founded hash is : 85cdec00a2626745c0b524b1f87f041a05bd4cb8885a9e209d06ebe0620ce9cb -> 256 bit hexadecimal number ??

How will you compare this two value ??
3  Bitcoin / Development & Technical Discussion / Re: Pool difficulty for compare wtih blockheader ?? on: April 14, 2021, 09:40:44 PM
Thank you for explanations. What i understand is i need to study base arithmetics and number systems  Cheesy Cheesy
4  Bitcoin / Development & Technical Discussion / Pool difficulty for compare wtih blockheader ?? on: April 13, 2021, 07:48:49 PM
Hi.

i am writing a little program for bitcoin mining.The program uses stratum servers protocol (Pool protocol). Actually i understand the basics from slush pools stratum V1 page. What i dont understand is how to use the difficulty that pool sends us. For example they send "65536" for setting the difficulty. I searched a alot internet and people says  "target difficulty  = 1 / pool difficulty". So, for 65536 target difficulty is 1/65536 = 0,0000152587890625 and as i understand i need to compare this walue with blockheader hash. So for comparing, will i count the zeros in the target difficulty that we found? or i misunderstand something?

Than you for kind answers

Best regards,
Makinahmet.
Pages: [1]
Powered by MySQL Powered by PHP Powered by SMF 1.1.19 | SMF © 2006-2009, Simple Machines Valid XHTML 1.0! Valid CSS!