>> (p.1)
    Author Topic: Counting Number of 0s to solve the block is still valid.  (Read 138 times)
    supermankid (OP)
    Jr. Member
    *
    Offline Offline

    Activity: 31
    Merit: 12


    View Profile
    June 18, 2022, 08:05:14 AM
     #1

    A while ago, I asked a question related to the possible amount of solutions for the current difficulty limit (19 0s as first part of blocks hash). (in one of the answer) I was told that the current method does not use the method that matches the exact number of zeros but rather "The actual problem is to find a hash (treated as a number) that is less than or equal to the target value."

    Now after a bit of rethinking and calculations, I have come to the following conclusion that the following statements are correct.

    1) Bitcoin still counts the number of zeros.
    2) The problem is to find the has that is less than or equal to target value
    3) Statement 1) and 2) are actually the same

    1. For example(for simplicity, lets assume the blocks has is just one hex -SHA-1 system.
    so. block + block + timestamps + nonce =>hash =>  [0-f]hex => [0000-1111]binary
    lets say required 0 is 1 => possible solutions are => (0000,0001,0010,0011,0100,0101,0110,0111)
    first zero is fixed and the permutation of the remaining 3 places on binary => 2^3 => 8
    So, Bitcoin still counts the number of zeros.

    2. Now to calculate this using the number less than method. (still requires 1 zero on the 1st position of hash)
    => required hash must be less than or equal to 0111 so, (0,1,2,3,4,5,6,7) in hex => total solutions => 8

    now translate that into modern day situation on 6 June 2022. =>
    Blocks solution=> 000000000000000000019a43a23165642477bc987310552d0a2c5fb9e7d288dc

    Using Method 1.
    Number of required 0s => 19=>  0000000000000000000  
    Places that can be changed to match the solution=> 19a43a23165642477bc987310552d0a2c5fb9e7d288dc
    In binary places that can be matched => (64-19)*4=> 180
    Possible solution => Permutation of 180 binary position => 2^180 => 1.53 × 10^54 (decimal)


    Using Method 2.
    Number of required 0s => 19=>  0000000000000000000  
    The solution should be thus less than or equal to 0000000000000000000ffffffff(64-19fs) => 19 time 0 + 45 times f
    The maximum number is the number of (zeros+fffffff...........)
    Possible solution => 45 times f => fffffffffffffffffffffffffffffffffffffffffffff_16 => 1.53 × 10^54 (decimal)
    (This number or less than this will solve the block)

    So, @odolvlobo, I still stand by the statement that it is counting the number of zeros is valid. It is just an another way of looking at it. Both are essentially same methods. Only different way of perceiving the techniques.

    [Note: I also understand that second method is implemented in software for calculation but in principle, it is solving the method 1 or method 2 whichever way we look at it. Isn't  that so?]


Page 1
Viewing Page: 1