7 ms·
Bitcoin mining on a 55 year old IBM 1401 mainframe: 80 seconds per hash
- deleted 11y ago[deleted]
- userbinator 11y agoI 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. :-)
- rasur 11y agoI'd be curious to know what a modern day IBM mainframe can do, just out of idle interest.
- djcapelis 11y agoHere you go: http://www-03.ibm.com/systems/z/hardware/z13_specs.html http://www-03.ibm.com/systems/z/hardware/z13_specs.html And the microprocessor: http://en.wikipedia.org/wiki/IBM_z13_(microprocessor) http://en.wikipedia.org/wiki/IBM_z13_(microprocessor)
- rasur 11y agoThanks for the pointers, it's been a while since I've actually used an IBM mainframe in anger, it's interesting to see what the latest state of things is.
- kens 11y agoProbably 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.
- rasur 11y agoYeah, 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.
- jacquesm 11y agoWhy 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.
- gaius 11y agoYou buy a mainframe for the I/O it can do, not the computation (for which you'd want a supercomputer).
- deleted 11y ago[deleted]
- gaius 11y agoIf 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.
- aus_ 11y agoModern 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.shtml http://www-03.ibm.com/security/cryptocards/pciecc/overview.s... [2]: http://www-03.ibm.com/systems/z/hardware/z13_specs.html http://www-03.ibm.com/systems/z/hardware/z13_specs.html [3]: https://www-01.ibm.com/support/knowledgecenter/linuxonibm/com.ibm.linux.z.wskc.doc/wskc_c_s02cpacf.html https://www-01.ibm.com/support/knowledgecenter/linuxonibm/co...
- jdub 11y agoBeautiful. Lots of fascinating details and photos… especially the status panel GIF. 😍
- kens 11y agoThanks. 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.
- hberg 11y ago....and Google Drive stopped showing the image because "Too many users have viewed or downloaded this file recently". Is there a cached version somewhere?
- kens 11y agoThanks 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?
- userbinator 11y agoImgur seems rather popular for image hosting lately.
- hberg 11y agoThanks for re-hosting it :-) I'm a sucker for "do modern things on old hardware". Just saw a great project at Maker Faire where some guys re-purposed old WWII radar tubes to make playable video games, one of which was flappy bird. http://tubetime.us/ http://tubetime.us/ and http://www.labguysworld.com/Project_ESCRTs_001.htm http://www.labguysworld.com/Project_ESCRTs_001.htm
- ghshephard 11y agoIt's not free, but, at $5, https://www.digitalocean.com/pricing/ https://www.digitalocean.com/pricing/ gets you 1 TB of data/month.
- zokier 11y agoAttempting 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.
- LanceH 11y agoFailing that, we just need trillions of vintage mainframes.
- gregwtmtno 11y agoImagine if he solved a block with that thing? That's like douglas adams-level unlikely.
- kristopolous 11y agoStill quite a bit faster then the old "pen and paper" method this machine was a replacement for.
- VLM 11y agoUnit 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.
- markbnj 11y agoThis is awesome. Well done.
- stevewepay 11y agoMost 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?
- kens 11y agoThe 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-algorithms.html http://www.righto.com/2014/02/bitcoin-mining-hard-way-algori...
- afandian 11y agoHow long does a hash take on a modern PC?
- Vilkku 11y agoTowards 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."
- jonjacky 11y agoGreat! It might be interesting to code this in FORTRAN for the 63-phase compiler for the 1401 [1]. I wonder how the generated code would compare? [1] http://ibm-1401.info/1401-FORTRAN-Illustrated.html http://ibm-1401.info/1401-FORTRAN-Illustrated.html