Gabriel Caetano
-
Sinalizar
como inapropriado
-
Mostrar
Show review history
Rather than computationally solving for SHA256(SHA256(block_header)), the approach is to solve it symbolically. What I mean by this is, rather than treating the block header input bits as 0 or 1, treat each input bit as an individual symbolic variable (640 in total). Next, perform the double SHA256, and produce a set of equations that represents each bit in the final hash. These will obviously be huge, but you can PolynomialReduce after each step of the hashing to reduce the equation size. The SHA256 output is 32 bytes, so what you end up with is a system of 256 equations, consisting of 640 variables each (which include all the logical operators applied from the double hash.) For the purposes of mining at difficulty 1, you can discard all but the first 32 equations. Now to mine using this method: You have to collapse the equations and simplify. Take the current, real block_header in question, and fill in actual values in your 32 equations for every bit except for the 32-bit nonce (608 in total.) Reduce. Now you have a system of 32 equations, and 32 unknowns. Set all 32 equations equal to one another, and solve the system of equations. What you end up with are 3 possible solutions: A nonce that produces 32 "0" bits (what we want), a nonce that produces all "1" bits (discard) or no solution (increment extraNonce.) Note to make reduction and solving the system of equations simpler, convert the logical operators (xor, or, and) into arithmetic operations and do the reduction and solving in the modulo 2 number ring, for example: a^b == (a+b)%2 (a | b) == ( (a*b)%2 + a%2 + b%2 ); (a & b) == (a * b) % 2 Thoughts?
Rather than computationally solving for SHA256(SHA256(block_header)), the approach is to solve it symbolically. What I mean by this is, rather than treating the block header input bits as 0 or 1, treat each input bit as an individual symbolic variable (640 in total). Next, perform the double SHA256, and produce a set of equations that represents each bit in the final hash. These will obviously be huge, but you can PolynomialReduce after each step of the hashing to reduce the equation size. The SHA256 output is 32 bytes, so what you end up with is a system of 256 equations, consisting of 640 variables each (which include all the logical operators applied from the double hash.) For the purposes of mining at difficulty 1, you can discard all but the first 32 equations. Now to mine using this method: You have to collapse the equations and simplify. Take the current, real block_header in question, and fill in actual values in your 32 equations for every bit except for the 32-bit nonce (608 in total.) Reduce. Now you have a system of 32 equations, and 32 unknowns. Set all 32 equations equal to one another, and solve the system of equations. What you end up with are 3 possible solutions: A nonce that produces 32 "0" bits (what we want), a nonce that produces all "1" bits (discard) or no solution (increment extraNonce.) Note to make reduction and solving the system of equations simpler, convert the logical operators (xor, or, and) into arithmetic operations and do the reduction and solving in the modulo 2 number ring, for example: a^b == (a+b)%2 (a | b) == ( (a*b)%2 + a%2 + b%2 ); (a & b) == (a * b) % 2 Thoughts?
This review was marked as helpful by
7 people
Luís
-
Sinalizar
como inapropriado
Rather than computationally solving for SHA256(SHA256(block_header)), the approach is to solve it symbolically. What I mean by this is, rather than treating the block header input bits as 0 or 1, treat each input bit as an individual symbolic variable (640 in total). Next, perform the double SHA256, and produce a set of equations that represents each bit in the final hash. These will obviously be huge, but you can PolynomialReduce after each step of the hashing to reduce the equation size. The SHA256 output is 32 bytes, so what you end up with is a system of 256 equations, consisting of 640 variables each (which include all the logical operators applied from the double hash.) For the purposes of mining at difficulty 1, you can discard all but the first 32 equations. Now to mine using this method: You have to collapse the equations and simplify. Take the current, real block_header in question, and fill in actual values in your 32 equations for every bit except for the 32-bit nonce (608 in total.) Reduce. Now you have a system of 32 equations, and 32 unknowns. Set all 32 equations equal to one another, and solve the system of equations. What you end up with are 3 possible solutions: A nonce that produces 32 "0" bits (what we want), a nonce that produces all "1" bits (discard) or no solution (increment extraNonce.) Note to make reduction and solving the system of equations simpler, convert the logical operators (xor, or, and) into arithmetic operations and do the reduction and solving in the modulo 2 number ring, for example: a^b == (a+b)%2 (a | b) == ( (a*b)%2 + a%2 + b%2 ); (a & b) == (a * b) % 2 Thoughts?
This review was marked as helpful by
41 people
Prock
-
Sinalizar
como inapropriado
-
Show history of
Rather than computationally solving for SHA256(SHA256(block_header)), the approach is to solve it symbolically. What I mean by this is, rather than treating the block header input bits as 0 or 1, treat each input bit as an individual symbolic variable (640 in total). Next, perform the double SHA256, and produce a set of equations that represents each bit in the final hash. These will obviously be huge, but you can PolynomialReduce after each step of the hashing to reduce the equation size. The SHA256 output is 32 bytes, so what you end up with is a system of 256 equations, consisting of 640 variables each (which include all the logical operators applied from the double hash.) For the purposes of mining at difficulty 1, you can discard all but the first 32 equations. Now to mine using this method: You have to collapse the equations and simplify. Take the current, real block_header in question, and fill in actual values in your 32 equations for every bit except for the 32-bit nonce (608 in total.) Reduce. Now you have a system of 32 equations, and 32 unknowns. Set all 32 equations equal to one another, and solve the system of equations. What you end up with are 3 possible solutions: A nonce that produces 32 "0" bits (what we want), a nonce that produces all "1" bits (discard) or no solution (increment extraNonce.) Note to make reduction and solving the system of equations simpler, convert the logical operators (xor, or, and) into arithmetic operations and do the reduction and solving in the modulo 2 number ring, for example: a^b == (a+b)%2 (a | b) == ( (a*b)%2 + a%2 + b%2 ); (a & b) == (a * b) % 2 Thoughts?
This review was marked as helpful
by 640 people