36 comments

[ 2.9 ms ] story [ 87.2 ms ] thread
I'd be curious to know what a modern day IBM mainframe can do, just out of idle interest.
Probably a whole lot worse than custom mining hardware. The custom ASICs are crazy optimized for mining. Unfortunately I don't have access to a modern mainframe to try it out.
Yeah, that's the thing, isn't it? You sink that much investment into a mainframe, you're going to be having better things to do with them than mine bitcoin.

Although, yet another idle thought; maybe IBM themselves have 'tested' a machine, if anyone.

EDIT: typos,grammar.

Why on earth would they do that, the depreciation on the machine would be higher than the amount of $ generated that way and that's ignoring the cost of the energy and the facility to host it.

It would make absolutely no sense.

I read 'tested' as a few minutes, for fun, experimental purposes rather than profit.
Yes, that was my intention with 'tested'. I'm sure IBM have the resources to jazz up something a bit more application specific if they really wanted.
You buy a mainframe for the I/O it can do, not the computation (for which you'd want a supercomputer).
(comment deleted)
If you need to to lots of relatively simple things very quickly but also very reliably. You'd not use a supercomputer to process credit card transactions for example, you'd want a mainframe for that. And you wouldn't use a mainframe for weather forecasting.
Oh I realise that, I used to use them, I do roughly recall their benefits ;)

I was just asking out of idle curiosity, nothing more.

Modern mainframes have an optional cryptographic coprocessor addon. The hardware, or cryptocard [1], is specialized to provide high-throughput for common cryptographic functions, including SHA-256. (It does lots more than that too.)

The latest cryptocard available is the Crypto Express5S [2] and is compatible with z13s.

And since modern mainframes can run Linux natively (s390x), you could probably get popular CPU miners to run. Albeit, you'd have to recompile for s390x and provide patches to utilize CPACF [3].

I could never find any SHA-256 hash rates for the Crypto Express5S, but if you really wanted to mine bitcoins on a mainframe, this would be the way to go.

[1]: http://www-03.ibm.com/security/cryptocards/pciecc/overview.s...

[2]: http://www-03.ibm.com/systems/z/hardware/z13_specs.html

[3]: https://www-01.ibm.com/support/knowledgecenter/linuxonibm/co...

Beautiful. Lots of fascinating details and photos… especially the status panel GIF. 😍
Thanks. It was a bit of a pain to make the status panel GIF; I hadn't kept the camera stationary, so I had to do a lot of image correction. So I'm glad to hear someone liked it.
....and Google Drive stopped showing the image because "Too many users have viewed or downloaded this file recently". Is there a cached version somewhere?
Thanks for letting me know. I've switched the image to a different host, which hopefully won't hit a bandwidth limit.

What does HN recommend as a high-bandwidth, preferably free way to serve files such as animated gifs?

Imgur seems rather popular for image hosting lately.
Attempting to optimize that sounds like an interesting challenge. If you'd manage to actually use the BCDesque encoding somehow then that sounds like it would give nice perf boost.
Failing that, we just need trillions of vintage mainframes.
Imagine if he solved a block with that thing? That's like douglas adams-level unlikely.
Still quite a bit faster then the old "pen and paper" method this machine was a replacement for.
Unit record equipment, more likely. Running a bitcoin hash on that would be an interesting piece of performance art.

Unit record equipment is mechanical enhanced manual processes using punch cards. They're "almost computers" but missing some key components. So you get a radix sorter in a big box. And a totalizer in a big box (more or less an adder). And a selector in a big box. And humans configure the machines by hand and carry stacks of cards between the machines. They were high tech perhaps a generation or three before the 1401 in the article.

(comment deleted)
I ended up using one character per bit. A 32-bit value is stored as 32 characters, either "0" or "1".

Bitslice DES does the same thing, although it uses the other bits too to execute multiple operations in parallel. Perhaps it could be possible to do much better than 80 seconds/hash on the same hardware.

Also, a missed opportunity to hash block #1401. :-)

This is awesome. Well done.
Most of the time the hash isn't successful, so you modify the block slightly and try again, over and over billions of times.

Question: What exactly gets modified over and over again? Is it the nonce that gets tweaked through every iteration? And is it correct to assume that for a fixed number of transactions that are added to a block, that there may not be a hash that works?

The nonce is the expected thing to tweak, but given current difficulty, it's pretty likely that trying all the nonces will fail. The timestamp can also be tweaked, and the transaction list changed. But miners usually change the "coinbase" transaction (which is the transaction that grants bitcoins to the miners) by putting an extra nonce in there, since there's extra room and the transaction can be modified without messing anything up. This is important in mining pool so miners can do a lot of hashes without constantly contacting the server to request a new block. See my blog post on mining for details of how the coinbase transaction is built by concatenation: http://www.righto.com/2014/02/bitcoin-mining-hard-way-algori...
How long does a hash take on a modern PC?
Towards the end of the article:

"The IBM 1401 can compute a double SHA-256 hash in 80 seconds. It requires about 3000 Watts of power, roughly the same as an oven or clothes dryer. A basic IBM 1401 system sold for $125,600, which is about a million dollars in 2015 dollars. On the other hand, today you can spend $50 and get a USB stick miner with a custom ASIC integrated circuit. This USB miner performs 3.6 billion hashes per second and uses about 4 watts."