<oembed><type>rich</type><version>1.0</version><author_name>npub1sm6zhjmk5scuz294jmpkw99wwwjzetjgwp4fu4gn6utqgdz87hkqamnq7h</author_name><author_url>https://nostr.ae/npub1sm6zhjmk5scuz294jmpkw99wwwjzetjgwp4fu4gn6utqgdz87hkqamnq7h</author_url><provider_name>njump</provider_name><provider_url>https://nostr.ae</provider_url><html>📅 Original date posted:2014-07-04&#xA;📝 Original message:Just a thought on this -- I&#39;m not saying this is a good idea or a bad&#xA;idea, because I have spent about zero time thinking about it, but&#xA;something did come to mind as I read this.  Reading 20 GB of data for&#xA;every hash might be a bit excessive.  And as the blockchain grows, it&#xA;will become infeasible to continue.  However, what comes to mind is the&#xA;ROMix algorithm defined by Colin Percival, which was the pre-cursor to&#xA;scrypt.  Which is actually what Armory uses for key stretching because&#xA;it&#39;s far simpler than scrypt itself while maintaining the memory-hard&#xA;properties (the downside is that it&#39;s much less flexible in allowing the&#xA;user to trade-off compute time vs memory usage).&#xA;&#xA;ROMix works by taking N sequential hashes and storing the results into a&#xA;single N*32 byte lookup table.   So if N is 1,000,000, you are going to&#xA;compute 1,000,000 and store the results into 32,000,000 sequential bytes&#xA;of RAM.  Then you are going to do 1,000,000 lookup operations on that&#xA;table, using the hash of the previous lookup result, to determine the&#xA;location of next lookup (within that 32,000,000 bytes).  Assuming a&#xA;strong hash function, this means its impossible to know in advance what&#xA;needs to be available in RAM to lookup, and it&#39;s easiest if you simply&#xA;hold all 32,000,000 bytes in RAM.&#xA;&#xA;Something similar could be applied to your idea.  We use the hash of a&#xA;prevBlockHash||nonce as the starting point for 1,000,000 lookup&#xA;operations.  The output of the previous lookup is used to determine&#xA;which block and tx (perhaps which chunk of 32 bytes within that tx) is&#xA;used for the next lookup operation.   This means that in order to do the&#xA;hashing, you need the entire blockchain available to you, even though&#xA;you&#39;ll only be using a small fraction of it for each &#34;hash&#34;.  This might&#xA;achieve what you&#39;re describing without actually requiring the full 20 GB&#xA;of reading on ever hash.&#xA;&#xA;-Alan&#xA;&#xA;&#xA;&#xA;On 07/04/2014 06:27 AM, Andy Parkins wrote:&#xA;&gt; Hello,&#xA;&gt;&#xA;&gt; I had a thought after reading Mike Hearn&#39;s blog about it being impossible to &#xA;&gt; have an ASIC-proof proof of work algorithm.&#xA;&gt;&#xA;&gt; Perhaps I&#39;m being dim, but I thought I&#39;d mention my thought anyway.&#xA;&gt;&#xA;&gt; It strikes me that he&#39;s right that it&#39;s impossible for any algorithm to exist &#xA;&gt; that can&#39;t be implemented in an ASIC.  However, that&#39;s only because it&#39;s &#xA;&gt; trying to pick an algorithm that is CPU bound.  You could protect against ASCI &#xA;&gt; mining (or rather, make it irrelevant that it was being used) by making the &#xA;&gt; algorithm IO-bound rather than CPU-bound.&#xA;&gt;&#xA;&gt; For example, what if the proof-of-work hash for a block were no longer just &#xA;&gt; &#34;hash of block&#34;, which contains the hash of the parent block, but instead were &#xA;&gt; hash of &#xA;&gt;&#xA;&gt;    [NEW_BLOCK] [ALL_PREVIOUS_BLOCKS] [NEW_BLOCK]&#xA;&gt;&#xA;&gt; [ALL_PREVIOUS_BLOCKS] is now 20GB (from memory) and growing.  By prefixing and &#xA;&gt; suffixing the new block, you have to feed every byte of the blockchain through &#xA;&gt; the hashing engine (the prefix prevents you caching the intermediate result).  &#xA;&gt; Whatever bus you&#39;re using to feed your high speed hashing engine, it will &#xA;&gt; always be faster than the bus -- hence you&#39;re now IO-bound, not CPU-bound, and &#xA;&gt; any hashing engine will, effectively, be the same.&#xA;&gt;&#xA;&gt; I&#39;m making the assumption that SHA-256 is not cacheable from the middle &#xA;&gt; outwards, so the whole block-chain _has_ to be transferred for every hash.&#xA;&gt;&#xA;&gt; Apologies in advance if this is a stupid idea.&#xA;&gt;&#xA;&gt;&#xA;&gt;&#xA;&gt; Andy</html></oembed>