Given a block, is there a list of all hashes for all possible 2^32 nonce values?

3

I am working in a computational research lab, and we're taking a look at Bitcoin. I'm trying to develop a simulation of Bitcoin mining for a nonexistent computer architecture.

I want to simulate the mining of a single block (say... the Satoshi block) without actually doing the work. To my understanding, each block in the chain has the winning nonce that enabled the miner to mine the block, but I also want to enumerate:

  • all of the losing hashes
  • other potential winners that could have worked

Part of our simulation is the mathematics of our simulation (and the hypothetical architecture) could operate on all possible hashes at once.

A 256 bit hash for all 2^32 nonce values[1] of a block is only 2^(8+32) bits, or about 137.4 gigabytes.

I know this sounds like a silly question, but is there some place to download all 137.4 gigabytes of hashes for the Satoshi block or some other block? Otherwise, what is the best way to generate them? Can I pick up an old ASIC miner and have it write every single hash to a hard drive?

Footnotes:

[1] I know that there are extra sources of variation in the transaction list, coinbase nonce, timestamp, etc., but we are currently limiting the scope of our simulation to just the original nonce while keeping everything else constant.

James Mishra

Posted 2015-01-21T17:21:15.893

Reputation: 178

"Can I pick up an old ASIC miner and have it write every single hash to a hard drive?" Nope. ASICs only do exactly what they were made to do and outputting losing hashes wasn't what they were made to do, so they can't do that. – David Schwartz – 2017-11-26T10:14:48.140

Answers

3

I know this sounds like a silly question, but is there some place to download all 137.4 gigabytes of hashes for the Satoshi block or some other block?

Nope.

Otherwise, what is the best way to generate them?

Here's a program that does what you asked. It's a modification of Ken Shirrif's example mining program. It mines the genesis block.

It produces hashes at 2 MB/s on my laptop.

Can I pick up an old ASIC miner and have it write every single hash to a hard drive?

Maybe, but it wouldn't really be faster than doing it with your CPU.

Nick ODell

Posted 2015-01-21T17:21:15.893

Reputation: 27 521

Would ASIC mining not be faster than CPU mining because the task of writing hashes to disk makes the process I/O bound? – James Mishra – 2015-01-21T18:49:59.853

@JamesMishra Yeah. – Nick ODell – 2015-01-21T18:58:09.750