Gepostet vor 2 Jahren, 27 Tagen in
Vor ein paar Monaten hatte jemand Bitcoins mit Papier und Bleistift ausgerechnet, jetzt hat das einer mit Lochkarten auf 'nem ollen IBM-Mainframe getan. Am Ende rechnen die das irgendwann noch auf richtigen Rechnern und erfinden noch ganze Bitcoin-Cluster aus Grafikkarten oder sowas.
Could an IBM mainframe from the 1960s mine Bitcoin? The idea seemed crazy, so I decided to find out. I implemented the Bitcoin hash algorithm in assembly code for the IBM 1401 and tested it on a working vintage mainframe. It turns out that this computer could mine, but so slowly it would take more than the lifetime of the universe to successfully mine a block. While modern hardware can compute billions of hashes per second, the 1401 takes 80 seconds to compute a single hash. […]
The IBM 1401 is almost the worst machine you could pick to implement the SHA-256 hash algorithm. The algorithm is designed to be implemented efficiently on machines that can do bit operations on 32-bit words. Unfortunately, the IBM 1401 doesn't have 32-bit words or even bytes. It uses 6-bit characters and doesn't provide bit operations. It doesn't even handle binary arithmetic, using decimal arithmetic instead. Thus, implementing the algorithm on the 1401 is slow and inconvenient.
I ended up using one character per bit. A 32-bit value is stored as 32 characters, either "0" or "1". My code has to perform the bit operations and additions character-by-character, basically checking each character and deciding what to do with it. As you might expect, the resulting code is very slow.
Vorher auf Nerdcore:
Analog Bitcoin Mining with Pen, Paper and Math