{ "subject": "Re: New getwork", "content": { "format": "html", "body": "<div class=\"post\"><div class=\"quoteheader\"><a href=\"https://bitcointalk.org/index.php?topic=1901.msg24008#msg24008\">Quote from: jgarzik on November 24, 2010, 04:47:42 AM</a></div><div class=\"quote\">I suspect something weird going on with ByteReverse (or lack thereof). &nbsp;It's quite unclear whether or not 'data' and 'nonce' must be byte-reversed, and in what way.<br/></div>getwork does the byte-reversing. &nbsp;midstate, data and hash1 are already big-endian, and you pass data back still big-endian, so you work in big-endian and don't have to do any byte-reversing. &nbsp;They're the same data that is passed to the ScanHash_ functions. &nbsp;You can take midstate, data and hash1, put them in 16-byte aligned buffers and pass them to a ScanHash_ function, like ScanHash(pmidstate, pdata + 64, phash1, nHashesDone). &nbsp;If a nonce is found, patch it into data and call getwork.<br/><br/>I should probably change the ScanHash_ functions to use pdata instead of pdata + 64 so they're consistent.<br/><br/>target is little endian, it's supposed to be the same as how m0mchil's did it. &nbsp;(if it's not, then it should be fixed) &nbsp;That's the only case where you would use byte reverse. &nbsp;I think you do it like: if ByteReverse((unsigned int*)hash[6]) &lt; (unsigned int*)target[6].<br/><br/><div class=\"quoteheader\"><a href=\"https://bitcointalk.org/index.php?topic=1901.msg24050#msg24050\">Quote from: DiabloD3 on November 24, 2010, 11:31:11 AM</a></div><div class=\"quote\">Satoshi, please fix your implementation of getwork so it complies with m0mchill's specification<br/></div>This is the new spec.&nbsp; It shouldn't be hard to update your miner to use it.<br/><br/>The changes are:<br/>- It does not return work when you submit a possible hit, only when called without parameter.<br/>- The block field has been split into data and hash1.<br/>- state renamed to midstate for consistency.<br/>- extranonce not needed.<br/></div>" }, "source": { "name": "Bitcoin Forum", "url": "https://bitcointalk.org/index.php?topic=1901.msg24095#msg24095" }, "date": "2010-11-24T17:21:01Z" }
Inscription number 18,210,045
Genesis block 799,367
File type json
File size 2.44 KB
Creation date