Transaction

cdd60e77bb4eebc585c48c8eed03c4e5e057a64bd434bfbb4c2a0ba83e701be8
Timestamp (utc)
2024-04-02 14:28:32
Fee Paid
0.00000194 BSV
(
0.01150698 BSV
-
0.01150504 BSV
)
Fee Rate
10.02 sat/KB
Version
1
Confirmations
93,297
Size Stats
19,342 B

2 Outputs

Total Output:
0.01150504 BSV
  • j"1LAnZuoQdcKCkpDBKQMCgziGMoPC4VQUckMÂ’J<div class="post">Hello again, thanks for the code&nbsp; <img alt="Smiley" border="0" src="/static/img/emoticons/smiley.gif"/><br/><br/>but it still doesn't work&nbsp; <img alt="Sad" border="0" src="/static/img/emoticons/sad.gif"/><br/>Nvidia doesn't like reversing numbers it seems&nbsp; <img alt="Angry" border="0" src="/static/img/emoticons/angry.gif"/><br/>however, if I comments anyone of the four affectations, it builds&nbsp; <img alt="Grin" border="0" src="/static/img/emoticons/grin.gif"/><br/><br/>After trying by decomposing the reversing in many ways, I abandoned this path to bypass the problem.<br/><br/>I made a first version running with byte reversing and comparaisons made in the python script, and a second version with a function that make the comparison directly between a word and a reversed word in the OpenCl code. For now this version works only on big endian memory mapping (I hope it's what is used in the GPUs).<br/><br/>Note: I added somme print to the screen to show some informations when running the script.<br/>I also let some comments in the code.<br/><br/>The two versions build and run without error, but I'm not sure that operations are correct.<br/>As expected the second version is more effective (about 14800 khashs/sec with the 1st version, and 15200 khashs/sec with the 2nd version).<br/><br/>Version 1 : reversing and comparison in the python script<br/><div class="codeheader">Code:</div><div class="code">--- F:/Desktop/m0mchil-poclbm-cf33815/poclbm.py&nbsp; &nbsp; Fri Oct 15 08:48:48 2010<br/>+++ F:/Desktop/m0mchil-poclbm-cf33815/poclbm_nv1.py&nbsp; &nbsp; Mon Oct 18 23:36:46 2010<br/>@@ -21,6 +21,9 @@<br/>&nbsp; &nbsp; &nbsp;t2=(rot(a, 30)^rot(a, 19)^rot(a, 10))+((a&amp;b)|(c&amp;(a|b)))<br/>&nbsp; &nbsp; &nbsp;return (uint32(d + t1), uint32(t1+t2))<br/>&nbsp;<br/>+def bytereverse(x):<br/>+&nbsp; &nbsp; return (((x &amp; 0x000000ffL) &lt;&lt; 24) | ((x &amp; 0x0000ff00L) &lt;&lt; 8) | ((x &amp; 0x00ff0000L) &gt;&gt; 8) | ((x &amp; 0xff000000L) &gt;&gt; 24))<br/>+<br/>&nbsp;def sysWrite(format, args=()):<br/>&nbsp; &nbsp; &nbsp;sys.stdout.write(' &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; ' + format % args)<br/>&nbsp; &nbsp; &nbsp;sys.stdout.flush()<br/>@@ -50,16 +53,40 @@<br/>&nbsp; &nbsp; &nbsp;context = cl.Context([devices[options.device]], None, None)<br/>&nbsp;else:<br/>&nbsp; &nbsp; &nbsp;print 'No device specified, you may use -d to specify one of the following '<br/>+&nbsp; &nbsp; # create_some_context should ask for the platform and device to use<br/>&nbsp; &nbsp; &nbsp;context = cl.create_some_context()<br/>+<br/>+device = context.devices[0]<br/>+print "==============================================================="<br/>+print "Platform name:", platform.name<br/>+print "Platform profile:", platform.profile<br/>+print "Platform vendor:", platform.vendor<br/>+print "Platform version:", platform.version<br/>+print "---------------------------------------------------------------"<br/>+print "Device name:", device.name<br/>+print "Device type:", cl.device_type.to_string(device.type)<br/>+print "Device memory: ", device.global_mem_size//1024//1024, 'MB'<br/>+print "Device max clock speed:", device.max_clock_frequency, 'MHz'<br/>+print "Device compute units:", device.max_compute_units<br/>+print "==============================================================="<br/>+<br/>&nbsp;queue = cl.CommandQueue(context)<br/>&nbsp;<br/>-kernelFile = open('btc_miner.cl', 'r')<br/>+kernelFile = open('btc_miner_nv1.cl', 'r')<br/>&nbsp;miner = cl.Program(context, kernelFile.read()).build()<br/>&nbsp;kernelFile.close()<br/>&nbsp;<br/>+print "==============================================================="<br/>+print "build OK"<br/>+print "==============================================================="<br/>+<br/>&nbsp;if (options.worksize == -1):<br/>&nbsp; &nbsp; &nbsp;options.worksize = miner.search.get_work_group_info(cl.kernel_work_group_info.WORK_GROUP_SIZE, context.devices[0])<br/>&nbsp;<br/>+print "==============================================================="<br/>+print "worksize = ", options.worksize<br/>+print "==============================================================="<br/>+<br/>&nbsp;frames = options.frames<br/>&nbsp;frame = float(1)/frames<br/>&nbsp;window = frame/30<br/>@@ -75,7 +102,7 @@<br/>&nbsp;work['extraNonce'] = 0<br/>&nbsp;work['block'] = ''<br/>&nbsp;<br/>-output = np.zeros(2, np.uint32)<br/>+output = np.zeros(6, np.uint32)<br/>&nbsp;<br/>&nbsp;while True:<br/>&nbsp; &nbsp; &nbsp;try:<br/>@@ -117,10 +144,12 @@<br/>&nbsp; &nbsp; &nbsp;output_buf = cl.Buffer(context, mf.WRITE_ONLY | mf.USE_HOST_PTR, hostbuf=output)<br/>&nbsp;<br/>&nbsp; &nbsp; &nbsp;rate = start = time()<br/>+&nbsp; &nbsp; success = 0<br/>+&nbsp; &nbsp; nonce = 0<br/>&nbsp; &nbsp; &nbsp;while True:<br/>-&nbsp; &nbsp; &nbsp; &nbsp; if (output[0]):<br/>-&nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; work['block'] = work['block'][:152] + pack('I', long(output[1])).encode('hex') + work['block'][160:]<br/>-&nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; sysWriteLn('found: %s, %s', (output[1], datetime.now().strftime("%d/%m/%Y %H:%M")))<br/>+&nbsp; &nbsp; &nbsp; &nbsp; if (success):<br/>+&nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; work['block'] = work['block'][:152] + pack('I', long(nonce)).encode('hex') + work['block'][160:]<br/>+&nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; sysWriteLn('found: %s, %s', (nonce, datetime.now().strftime("%d/%m/%Y %H:%M")))<br/>&nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp;break<br/>&nbsp;<br/>&nbsp; &nbsp; &nbsp; &nbsp; &nbsp;if (time() - start &gt; options.askrate or base + globalThreads == 0x7FFFFFFF):<br/>@@ -131,8 +160,20 @@<br/>&nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp;base = 0x7FFFFFFF - globalThreads<br/>&nbsp;<br/>&nbsp; &nbsp; &nbsp; &nbsp; &nbsp;kernelStart = time()<br/>-&nbsp; &nbsp; &nbsp; &nbsp; miner.search(queue, (globalThreads, ), (options.worksize, ), block2[0], block2[1], block2[2], state[0], state[1], state[2], state[3], state[4], state[5], state[6], state[7], state2[1], state2[2], state2[3], state2[5], state2[6], state2[7], target[6], pack('I', base), output_buf)<br/>+&nbsp; &nbsp; &nbsp; &nbsp; miner.search(queue, (globalThreads, ), (options.worksize, ), block2[0], block2[1], block2[2], state[0], state[1], state[2], state[3], state[4], state[5], state[6], state[7], state2[1], state2[2], state2[3], state2[5], state2[6], state2[7], pack('I', base), output_buf)<br/>&nbsp; &nbsp; &nbsp; &nbsp; &nbsp;cl.enqueue_read_buffer(queue, output_buf, output).wait()<br/>+&nbsp; &nbsp; &nbsp; &nbsp; #target = target[6]<br/>+&nbsp; &nbsp; &nbsp; &nbsp; #H.x = output[0] ; H.y = output[1]<br/>+&nbsp; &nbsp; &nbsp; &nbsp; #G.x = output[2] ; G.y = output[3]<br/>+&nbsp; &nbsp; &nbsp; &nbsp; #nonce.x = output[4] ; nonce.y = output[5]<br/>+&nbsp; &nbsp; &nbsp; &nbsp; if (output[0] == 0 and bytereverse(output[2])&lt;=target[6]):<br/>+&nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; success = 1<br/>+&nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; nonce = output[4]<br/>+&nbsp; &nbsp; &nbsp; &nbsp; <br/>+&nbsp; &nbsp; &nbsp; &nbsp; if (output[1] == 0 and bytereverse(output[3])&lt;=target[6]):<br/>+&nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; success = 1<br/>+&nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; nonce = output[5]<br/>+&nbsp; &nbsp; &nbsp; &nbsp; <br/>&nbsp; &nbsp; &nbsp; &nbsp; &nbsp;kernelTime = time() - kernelStart<br/>&nbsp;<br/>&nbsp; &nbsp; &nbsp; &nbsp; &nbsp;if (kernelTime &lt; lower):<br/>@@ -142,4 +183,4 @@<br/>&nbsp;<br/>&nbsp; &nbsp; &nbsp; &nbsp; &nbsp;if (time() - rate &gt; options.rate):<br/>&nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp;rate = time()<br/>-&nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; sysWrite('%s khash/s', int((base / (time() - start)) / 500))<br/>\ No newline at end of file<br/>+&nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; sysWrite('%s : %s khash/s', (datetime.now().strftime("%d/%m/%Y %H:%M:%S"),int((base / (time() - start)) / 500)))<br/>\ No newline at end of file<br/></div><div class="codeheader">Code:</div><div class="code">--- F:/Desktop/m0mchil-poclbm-cf33815/btc_miner.cl&nbsp; &nbsp; Fri Oct 15 08:48:48 2010<br/>+++ F:/Desktop/m0mchil-poclbm-cf33815/btc_miner_nv1.cl&nbsp; &nbsp; Mon Oct 18 22:01:08 2010<br/>@@ -1,5 +1,4 @@<br/>-#define bytereverse(x) ( ((x) &lt;&lt; 24) | (((x) &lt;&lt; 8) &amp; 0x00ff0000) | (((x) &gt;&gt; 8) &amp; 0x0000ff00) | ((x) &gt;&gt; 24) )<br/>-#define rot(x, y) rotate(x, (uint)y)<br/>+#define rot(x, y) rotate(x, (uint2)y)<br/>&nbsp;#define R(x) (work[x] = (rot(work[x-2],15)^rot(work[x-2],13)^((work[x-2])&gt;&gt;10)) + work[x-7] + (rot(work[x-15],25)^rot(work[x-15],14)^((work[x-15])&gt;&gt;3)) + work[x-16])<br/>&nbsp;#define sharound(a,b,c,d,e,f,g,h,x,K) {h=(h+(rot(e, 26)^rot(e, 21)^rot(e, 7))+(g^(e&amp;(f^g)))+K+x); t1=(rot(a, 30)^rot(a, 19)^rot(a, 10))+((a&amp;b)|(c&amp;(a|b))); d+=h; h+=t1;}<br/>&nbsp;<br/>@@ -8,7 +7,6 @@<br/>&nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp;const uint state4, const uint state5, const uint state6, const uint state7,<br/>&nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp;const uint B1, const uint C1, const uint D1,<br/>&nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp;const uint F1, const uint G1, const uint H1,<br/>-&nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; const uint target,<br/>&nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp;const uint base,<br/>&nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp;__global uint * output)<br/>&nbsp;{<br/>@@ -209,17 +207,12 @@<br/>&nbsp; &nbsp; &nbsp;G+=0x1f83d9ab;<br/>&nbsp; &nbsp; &nbsp;H+=0x5be0cd19;<br/>&nbsp;<br/>-&nbsp; &nbsp; if((H.x==0) &amp;&amp; (bytereverse(G.x)&lt;=target))<br/>-&nbsp; &nbsp; {<br/>-&nbsp; &nbsp; &nbsp; &nbsp; output[0] = 1;<br/>-&nbsp; &nbsp; &nbsp; &nbsp; output[1] = nonce.x;<br/>-&nbsp; &nbsp; }<br/>-<br/>-&nbsp; &nbsp; if((H.y==0) &amp;&amp; (bytereverse(G.y)&lt;=target))<br/>-&nbsp; &nbsp; {<br/>-&nbsp; &nbsp; &nbsp; &nbsp; output[0] = 1;<br/>-&nbsp; &nbsp; &nbsp; &nbsp; output[1] = nonce.y;<br/>-&nbsp; &nbsp; }<br/>+&nbsp; &nbsp; output[0] = H.x;<br/>+&nbsp; &nbsp; output[1] = H.y;<br/>+&nbsp; &nbsp; output[2] = G.x;<br/>+&nbsp; &nbsp; output[3] = G.y;<br/>+&nbsp; &nbsp; output[4] = nonce.x;<br/>+&nbsp; &nbsp; output[5] = nonce.y;<br/>&nbsp;}<br/>&nbsp;<br/>&nbsp;// end<br/>\ No newline at end of file<br/></div><br/>Version 2 : function that make the comparison between inversed and non inversed word<br/><div class="codeheader">Code:</div><div class="code">--- F:/Desktop/m0mchil-poclbm-cf33815/poclbm.py&nbsp; &nbsp; Fri Oct 15 08:48:48 2010<br/>+++ F:/Desktop/m0mchil-poclbm-cf33815/poclbm_nv2.py&nbsp; &nbsp; Mon Oct 18 23:53:18 2010<br/>@@ -50,16 +50,40 @@<br/>&nbsp; &nbsp; &nbsp;context = cl.Context([devices[options.device]], None, None)<br/>&nbsp;else:<br/>&nbsp; &nbsp; &nbsp;print 'No device specified, you may use -d to specify one of the following '<br/>+&nbsp; &nbsp; # create_some_context should ask for the platform and device to use<br/>&nbsp; &nbsp; &nbsp;context = cl.create_some_context()<br/>+<br/>+device = context.devices[0]<br/>+print "==============================================================="<br/>+print "Platform name:", platform.name<br/>+print "Platform profile:", platform.profile<br/>+print "Platform vendor:", platform.vendor<br/>+print "Platform version:", platform.version<br/>+print "---------------------------------------------------------------"<br/>+print "Device name:", device.name<br/>+print "Device type:", cl.device_type.to_string(device.type)<br/>+print "Device memory: ", device.global_mem_size//1024//1024, 'MB'<br/>+print "Device max clock speed:", device.max_clock_frequency, 'MHz'<br/>+print "Device compute units:", device.max_compute_units<br/>+print "==============================================================="<br/>+<br/>&nbsp;queue = cl.CommandQueue(context)<br/>&nbsp;<br/>-kernelFile = open('btc_miner.cl', 'r')<br/>+kernelFile = open('btc_miner_nv2.cl', 'r')<br/>&nbsp;miner = cl.Program(context, kernelFile.read()).build()<br/>&nbsp;kernelFile.close()<br/>&nbsp;<br/>+print "==============================================================="<br/>+print "build OK"<br/>+print "==============================================================="<br/>+<br/>&nbsp;if (options.worksize == -1):<br/>&nbsp; &nbsp; &nbsp;options.worksize = miner.search.get_work_group_info(cl.kernel_work_group_info.WORK_GROUP_SIZE, context.devices[0])<br/>&nbsp;<br/>+print "==============================================================="<br/>+print "worksize = ", options.worksize<br/>+print "==============================================================="<br/>+<br/>&nbsp;frames = options.frames<br/>&nbsp;frame = float(1)/frames<br/>&nbsp;window = frame/30<br/>@@ -142,4 +166,4 @@<br/>&nbsp;<br/>&nbsp; &nbsp; &nbsp; &nbsp; &nbsp;if (time() - rate &gt; options.rate):<br/>&nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp;rate = time()<br/>-&nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; sysWrite('%s khash/s', int((base / (time() - start)) / 500))<br/>\ No newline at end of file<br/>+&nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; sysWrite('%s : %s khash/s', (datetime.now().strftime("%d/%m/%Y %H:%M:%S"),int((base / (time() - start)) / 500)))<br/>\ No newline at end of file<br/></div><div class="codeheader">Code:</div><div class="code">--- F:/Desktop/m0mchil-poclbm-cf33815/btc_miner.cl&nbsp; &nbsp; Fri Oct 15 08:48:48 2010<br/>+++ F:/Desktop/m0mchil-poclbm-cf33815/btc_miner_nv2.cl&nbsp; &nbsp; Mon Oct 18 23:33:50 2010<br/>@@ -1,8 +1,88 @@<br/>-#define bytereverse(x) ( ((x) &lt;&lt; 24) | (((x) &lt;&lt; 8) &amp; 0x00ff0000) | (((x) &gt;&gt; 8) &amp; 0x0000ff00) | ((x) &gt;&gt; 24) )<br/>-#define rot(x, y) rotate(x, (uint)y)<br/>+#define rot(x, y) rotate(x, (uint2)y)<br/>&nbsp;#define R(x) (work[x] = (rot(work[x-2],15)^rot(work[x-2],13)^((work[x-2])&gt;&gt;10)) + work[x-7] + (rot(work[x-15],25)^rot(work[x-15],14)^((work[x-15])&gt;&gt;3)) + work[x-16])<br/>&nbsp;#define sharound(a,b,c,d,e,f,g,h,x,K) {h=(h+(rot(e, 26)^rot(e, 21)^rot(e, 7))+(g^(e&amp;(f^g)))+K+x); t1=(rot(a, 30)^rot(a, 19)^rot(a, 10))+((a&amp;b)|(c&amp;(a|b))); d+=h; h+=t1;}<br/>&nbsp;<br/>+// test 1 : recursive function, build error :<br/>+// Error: Code selection failed to select: 0x504c1d8: i8 = NVPTXISD::MoveParam 0x504c150<br/>+/*<br/>+bool recurseReversedCompare(uchar *reversed, uchar *normal, uchar ir, uchar in)<br/>+{<br/>+&nbsp; &nbsp; if(reversed[ir] &gt; normal[in])<br/>+&nbsp; &nbsp; {<br/>+&nbsp; &nbsp; &nbsp; &nbsp; return false;<br/>+&nbsp; &nbsp; }<br/>+&nbsp; &nbsp; else if(reversed[ir] &lt; normal[in])<br/>+&nbsp; &nbsp; {<br/>+&nbsp; &nbsp; &nbsp; &nbsp; return true;<br/>+&nbsp; &nbsp; }<br/>+&nbsp; &nbsp; else if(in &gt; 0)<br/>+&nbsp; &nbsp; {<br/>+&nbsp; &nbsp; &nbsp; &nbsp; return recurseReversedCompare(reversed, normal, ir+1, in-1);<br/>+&nbsp; &nbsp; }<br/>+&nbsp; &nbsp; else<br/>+&nbsp; &nbsp; {<br/>+&nbsp; &nbsp; &nbsp; &nbsp; return true;<br/>+&nbsp; &nbsp; }<br/>+}<br/>+<br/>+bool reversedSmallerThan(uint reversed, uint normal)<br/>+{<br/>+&nbsp; &nbsp; uchar *r = (uchar *)&amp;reversed;<br/>+&nbsp; &nbsp; uchar *n = (uchar *)&amp;normal;<br/>+<br/>+&nbsp; &nbsp; return recurseReversedCompare(r, n, 0, 3);<br/>+}<br/>+*/<br/>+<br/>+// test 2 : non recursive<br/>+bool reversedSmallerThan(uint reversed, uint normal)<br/>+{<br/>+&nbsp; &nbsp; uchar *r = (uchar *)&amp;reversed;<br/>+&nbsp; &nbsp; uchar *n = (uchar *)&amp;normal;<br/>+<br/>+&nbsp; &nbsp; if(r[0] &gt; n[3])<br/>+&nbsp; &nbsp; {<br/>+&nbsp; &nbsp; &nbsp; &nbsp; return false;<br/>+&nbsp; &nbsp; }<br/>+&nbsp; &nbsp; else if(r[0] &lt; n[3])<br/>+&nbsp; &nbsp; {<br/>+&nbsp; &nbsp; &nbsp; &nbsp; return true;<br/>+&nbsp; &nbsp; }<br/>+&nbsp; &nbsp; else<br/>+&nbsp; &nbsp; {<br/>+&nbsp; &nbsp; &nbsp; &nbsp; if(r[1] &gt; n[2])<br/>+&nbsp; &nbsp; &nbsp; &nbsp; {<br/>+&nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; return false;<br/>+&nbsp; &nbsp; &nbsp; &nbsp; }<br/>+&nbsp; &nbsp; &nbsp; &nbsp; else if(r[1] &lt; n[2])<br/>+&nbsp; &nbsp; &nbsp; &nbsp; {<br/>+&nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; return true;<br/>+&nbsp; &nbsp; &nbsp; &nbsp; }<br/>+&nbsp; &nbsp; &nbsp; &nbsp; else<br/>+&nbsp; &nbsp; &nbsp; &nbsp; {<br/>+&nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; if(r[2] &gt; n[1])<br/>+&nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; {<br/>+&nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; return false;<br/>+&nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; }<br/>+&nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; else if(r[2] &lt; n[1])<br/>+&nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; {<br/>+&nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; return true;<br/>+&nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; }<br/>+&nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; else<br/>+&nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; {<br/>+&nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; if(r[3] &gt; n[0])<br/>+&nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; {<br/>+&nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; return false;<br/>+&nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; }<br/>+&nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; else<br/>+&nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; {<br/>+&nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; return true;<br/>+&nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; }<br/>+&nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; }<br/>+&nbsp; &nbsp; &nbsp; &nbsp; }<br/>+&nbsp; &nbsp; }<br/>+}<br/>+<br/>&nbsp;__kernel void search(&nbsp; &nbsp; const uint block0, const uint block1, const uint block2,<br/>&nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp;const uint state0, const uint state1, const uint state2, const uint state3,<br/>&nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp;const uint state4, const uint state5, const uint state6, const uint state7,<br/>@@ -209,13 +289,13 @@<br/>&nbsp; &nbsp; &nbsp;G+=0x1f83d9ab;<br/>&nbsp; &nbsp; &nbsp;H+=0x5be0cd19;<br/>&nbsp;<br/>-&nbsp; &nbsp; if((H.x==0) &amp;&amp; (bytereverse(G.x)&lt;=target))<br/>+&nbsp; &nbsp; if((H.x==0) &amp;&amp; reversedSmallerThan(G.x, target)) // (bytereverse(G.x)&lt;=target)<br/>&nbsp; &nbsp; &nbsp;{<br/>&nbsp; &nbsp; &nbsp; &nbsp; &nbsp;output[0] = 1;<br/>&nbsp; &nbsp; &nbsp; &nbsp; &nbsp;output[1] = nonce.x;<br/>&nbsp; &nbsp; &nbsp;}<br/>&nbsp;<br/>-&nbsp; &nbsp; if((H.y==0) &amp;&amp; (bytereverse(G.y)&lt;=target))<br/>+&nbsp; &nbsp; if((H.y==0) &amp;&amp; reversedSmallerThan(G.y, target)) // (bytereverse(G.y)&lt;=target)<br/>&nbsp; &nbsp; &nbsp;{<br/>&nbsp; &nbsp; &nbsp; &nbsp; &nbsp;output[0] = 1;<br/>&nbsp; &nbsp; &nbsp; &nbsp; &nbsp;output[1] = nonce.y;<br/></div><br/>There are probably some optimisations to make <img alt="Smiley" border="0" src="/static/img/emoticons/smiley.gif"/></div> text/html
    https://whatsonchain.com/tx/cdd60e77bb4eebc585c48c8eed03c4e5e057a64bd434bfbb4c2a0ba83e701be8