Bitcoin Mining On an Apollo Guidance Computer: 10.3 Seconds Per Hash (righto.com) 103
Slashdot reader volvox_voxel shares an excerpt from the latest blog post from software engineer Ken Shirriff, who is well known for his work on restoring some of the rarest computing hardware to its working condition: We've been restoring an Apollo Guidance Computer1. Now that we have the world's only working AGC, I decided to write some code for it. Trying to mine Bitcoin on this 1960s computer seemed both pointless and anachronistic, so I had to give it a shot. Implementing the Bitcoin hash algorithm in assembly code on this 15-bit computer was challenging, but I got it to work. Unfortunately, the computer is so slow that it would take about a billion times the age of the universe to successfully mine a Bitcoin block. He wasn't kidding about how long it would take to successfully mine a Bitcoin block. "The Apollo Guidance Computer took 5.15 seconds for one SHA-256 hash," writes Shirriff. "Since Bitcoin uses a double-hash, this results in a hash rate of 10.3 seconds per Bitcoin hash. Currently, the Bitcoin network is performing about 65 EH/s (65 quintillion hashes per second). At this difficulty, it would take the AGC 4x10^23 seconds on average to find a block. Since the universe is only 4.3x10^17 seconds old, it would take the AGC about a billion times the age of the universe to successfully mine a block."
Re: Slashdot is retarded now (Score:1)
Someone's mad he didn't take 3k to 12k this year.
Re: (Score:1)
I don't care if it's beanie babies or magical internet coins. Profit is profit.
Sticking it to the banks and overthrowing government control of the world's money supply is only a bonus.
Re: Slashdot is retarded now (Score:1)
You can speculate in about anything. So bitcoin is nothing really new.
Re: (Score:2)
Only a million times the age of the universe (Score:5, Insightful)
Re:Only a million times the age of the universe (Score:4, Funny)
You are technically correct: the best kind of correct.
Re: (Score:2)
Not radiation-hardened, not fit for purpose.
but can it run crysis? (Score:1)
nobody cares about bitcoins...
Re: (Score:2)
Re: (Score:2)
Cryptocoin is of absolutely no interest or usefulness to me.
Re: (Score:1)
Re: (Score:2)
Re: (Score:1)
I don't give a shit about bitcoin, but I'll click on anything involving restored Apollo era hardware.
Something pointless and anachronistic on Apollo hardware is pretty much the coolest thing I can imagine.
The architecture description of th
But did he save 3 rounds ? (Score:2)
Since Bitcoin uses a double-hash, this results in a hash rate of 10.3 seconds per Bitcoin hash
Yes, but you can optimize this a little bit. When only the nonce word changes, you can omit the first 3 rounds of SHA-256.
Re: (Score:2)
Yes, but you can optimize this a little bit. When only the nonce word changes, you can omit the first 3 rounds of SHA-256.
"Nonce" is a really unfortunate term. I would quietly suggest changing it.
Watched some of his videos (Score:1)
Pretty interesting stuff. I watched a video on how it worked, looked up some info on it (only uses NOR gates). I started making my own and I think it isn't too difficult, but would be very time consuming. Its an incredibly simple design and all the documents are easily available.
He doesn't have it running on the rope memory, he uses a rope memory simulator that he isn't entirely sure how it works, but can have a laptop supply the memory for the programs.
Re:Watched some of his videos (Score:4, Informative)
Re: Watched some of his videos (Score:1)
The way to build a replica would be with DTL chips or discretes, or with whatever component family the originals were built with.
Re: (Score:2)
The way to build a replica would be with DTL chips or discretes, or with whatever component family the originals were built with.
The original used RTL. I guess they had not thought of injection logic yet which would be my choice albeit an anachronism.
Re: (Score:2)
Mike is one of the team that is working on getting a real AGC up and running. Their progress is documented on the YouTube channel curiousmarc. Pretty interesting stuff. Mike is brilliant (and he works at SpaceX I understand).
Reliability matters (Score:4, Insightful)
Yes, the Apollo Guidance Computer is "a mere abacus" compared wiith the Bitcoin network when it comes to number crunching. But I would't truse the Bitcoin network in a space mission where reliability is paramount. I would not like a reboot during the engine burn that puts the spacecraft on the transfer trajectory back to Earth.
You have to hit the atmosphere at a very precise angle, otherwise you'll either experience a nice flattening at >20Gs, or you'll be the first human on a very slow boat to the outer solar system.
Re:Reliability matters (Score:5, Informative)
the irony of this comment is amazing. The actual guidance computer for Apollo 11 repeatedly crashed during lunar descent because it had no extra processing power and was overloaded by processing electrical interference from a radar left on as backup for abort that wasn't supposed to be sending any data to the computer. Later versions of the radar were redesigned to eliminate the interference. That being said its ability to reboot nearly instantly unlike a modern computer enabled the mission to be completed successfully.
Re:Reliability matters (Score:5, Informative)
Re: (Score:2, Informative)
It actually culled all tasks, then added tasks back in priority order. It was able to do this quickly enough that state was not lost unless it crashed twice in rapid succession. It did not have the capability to only cull unimportant tasks, although the end result was much the same since critical tasks would be restarted first.
Re: (Score:2)
Didn't 1201 and 1202 alarms (which you can hear them call out over the descent) call automatic restarts? As I recall 1201/1202 was because the computer was being overloaded by radar data.
Re: (Score:3)
Re: (Score:2)
the Bitcoin network has had perfect 100% 24/7 uptime
Not too difficult if you have a system where individual nodes can be added and removed dynamically.
Re: (Score:2)
Re: (Score:2)
That being said its ability to reboot nearly instantly unlike a modern computer
If you want to get technical a modern computer with a fast-boot option in BIOS does boot nearly instantly. It's our desire to load a frigging huge OS for the sole purpose of splitting hairs on the internet that causes a delay in function.
But our PCs actually start processing code basically within a 1second of hitting the power button thanks to BIOSes not prepping each individual device before executing the boot function.
I wonder how quick we would get Windows 1.11 to load on a modern machine, and I'm not ta
Re: (Score:2)
Re:Reliability matters (Score:5, Interesting)
"Reboot" here is a stretch, at least if you mean it with a modern connotation.
"Reset" would be a closer analogy to modern computers. The BIOS in your laptop / desktop is more complicated than the AGC software.
As a comparison, I was involved in the design of an instrument that was required to run for months on end in a remotely located trailer without any human interaction, in the days before internet access was ubiquitous. Accessibility was non-existent, except through a low-baud-rate phone line. Reliability was, therefore, of utmost importance. The solution was to design a microcontroller based system (something derived from a Motorola 6809, if memory serves) and add an auxilliary clock that asserted the RESET_ line every 100 ms. The periodic RESET_ would bring the hardware into a known state using the ultimate non-maskable interrupt. Whatever computations needed to be done were either re-entrant, or were completed within 100 ms. Well after that project, I happened to meet a Federal inspector who made rounds of these trailers; they said that ours were the only instruments that *always* worked.
I can't imagine that we were the first to think of this approach, so perhaps the AGC used a similar idea?
Re: Reliability matters (Score:2)
That's just awesome! I never thought the easiest way to deal with crashes would be to just make it crash 10 times a second!
Re: (Score:1)
Re: (Score:2)
That being said its ability to reboot nearly instantly unlike a modern computer enabled the mission to be completed successfully.
Nothing prevents modern CPUs from operating the same way and some embedded systems do. I have even written state machine controlled programs in scripting languages which could do it.
Better implementation (Score:1)
The performance and design of the algorithm both could have been easily improved using ladder logic, which is the only language really suitable for working directly with hardware with limited memory capacity. It also makes it easier to line up the code with the circuit designs. I would hope NASA has standardized on ladder logic for all future software needs.
Best regards,
PointyPete
Faster than the USB U3 Antminer (Score:2)
And a whole lot more dependable too.
Re: (Score:3)
Actually it is amazing how reliable modern technology is today, then the old stuff.
We use to have hardware failures all the time, RAM getting corrupted with the slightest EM interference. I use to be able crash my Amstrad CPC 1512 by turning on a box fan. Mainframe systems while in nearly indestructible cases. Had easy access to all the components for a reason... They failed and needed to be fixed and replaced a lot.
Sure us old-timers put on rose colored Nostolga glasses, forgetting how we had to take these
Re: (Score:2)
Re: Faster than the USB U3 Antminer (Score:1)
Windows 9x did not have a BSOD. The BSOD screen is a sort of hex dump. It was introduced with Windows NT. There are blue error screens in Windows 9x but they are not the BSOD.
Re: (Score:1)
Re: Faster than the USB U3 Antminer (Score:1)
He is saying that the engine does not halt and the vehicle stop when the "check engine" light comes on.
Re: (Score:1)
Re: (Score:3)
Check Engine lights have two rules I go by; If it's smoking and missing out, pull over. If it's not, keep on trucking.
Mid-'90s quality drop: no-lead solder (Score:2)
Now I noticed a massive dip in quality in Computing in the mid-late 1990's where PC's were getting cheap and cutting a lot of corners,
I'm pretty sure the elimination of lead solder and the resulting tin-whisker problem was at least partly to blame.
It took a few years before people stopped (or mostly stopped?) using cheap solder that would short-circuit after a few years.
So, yes, "cutting a lot of corners" is true, but one of the corners they cut only became an issue because the industry moved - or was forced to move - away from the previously-available cheap, reliable, but environmentally-dangerous lead-based solder.
Re: (Score:2)
That may be part of it, other things that became popular were these Win devices. Such as Win Modems, and Win printers.
A Win Modem was in essence a D/A and a A/D converter. Where we rely on the Windows Driver to play and listen to the pitches to create the sounds and data. Win Printers relied on the drivers to handle every pixel. Where the older models had the a high level interface such as Hays AT or PostScript. Which was superior, because your 50mhz-200mhz PC that just had Multi-tasking added as a feature
Reason for soldering: planned obsolecence (Score:1)
The reason why companies are soldering in components now, is because they fail less often.
If you solder otherwise-upgrade-able parts like RAM or storage to force people to "throw it away and buy a new one" every few years, that's greed, not reliability.
I'm talking PCs and most laptops, where any "gain" for the end user by having the laptop 1mm thinner and $1 cheaper is more than offset by the inconvenience of having a "what you buy is what you are stuck with" device. For most phones and most embedded devices where size and shape may be paramount, and where other factors such as changing telepho
Watch the AGC restoration on youtube (Score:5, Informative)
They pretty much succeeded
It's still an ongoing project. Go check it out. It's incredible to see a computer being debugged at the gate level using a scope an jumper wires.
Re: (Score:2)
OK, that's cool AF. Saved it for watching later!
Thanks for... (Score:1)
...constantly being reminded why I love technology, even the seemingly useless kind.
Speed wasn't the goal, per se (Score:2)
The AGC was designed to perform the calculations to get to the moon and back. It was fault tolerant and highly IO dependent. It was also one, if not the first, system to use integrated circuits.
Still, it's an interesting experiment to say the least.
Impressive (Score:2)
But can it run Crysis?
Re: (Score:2)
How about a Beowulf Cluster of them?
Re: (Score:2)
I had to ctrl+F this comment.
Times change (Score:2)
Resource usage (Score:2)
The AGC supposedly uses about 55W of power. So by my calculations, if 65e18 hashes/sec were computed with a cluster of AGCs, it would consume about 1.8e22 watts. That's more than one billion times the total current energy consumption of human civilization, or about .005% of the total output of the sun. The total mass of the AGC computers would also be about 1/7 as much as the moon.
I conclude that at current Bitcoin prices, this experiment is unlikely to make a profit.
4x10^23 seconds (Score:2)
Put in laymanâ(TM)s terms, the AGC can not conceivably mine enough bitcoins to cover the cheque at The Restaurant At The End Of The Universe.
We Went to The MOON With That Machine... (Score:2)
And yet, we went to the Moon - six times - with computers like these, and slide rules. Too bad we can't figure out something really worthwhile to do with our modern computers.
Of course (Score:1)
The point of block chain is to make it very very expensive computing wise to crack.
So in a word - Good.
Re: (Score:1)
Seek a competent therapist for a more pleasant life.
Re: I hope this guy kills himself (Score:1)
My therapist said my problem was idiots like you that love cryptogarbage. Your move.
Re: (Score:2)
My therapist takes bitcoin, does yours?