
Bitcoin mining on an Apollo Guidance Computer - sashk
http://www.righto.com/2019/07/bitcoin-mining-on-apollo-guidance.html
======
segfaultbuserr
The author, Ken Shirriff, is an important personality in the retrocomputing
scene, who has involved in the restoration of multiple vintage computers. As a
programming exercise and entertainment (mainly, it's just about the
implementation of SHA-256), he has attempted to mine Bitcoin on various
platforms, including pencil-and-paper (7.75e-6 H/s) [0], IBM 1401 (0.012 H/s)
[1], and Xerox Alto (1.5 H/s) [2].

And now it's the Apollo Guidance Computer (0.097 H/s)! I think it's
particularly hilarious, as the slogan says, Bitcoin to the Moon!

[0]
[https://www.youtube.com/watch?v=y3dqhixzGVo](https://www.youtube.com/watch?v=y3dqhixzGVo)

[1] [https://www.righto.com/2015/05/bitcoin-mining-on-55-year-
old...](https://www.righto.com/2015/05/bitcoin-mining-on-55-year-old-
ibm-1401.html)

[2] [https://www.righto.com/2017/07/bitcoin-mining-on-vintage-
xer...](https://www.righto.com/2017/07/bitcoin-mining-on-vintage-xerox-
alto.html)

 _Edit: fixed all incorrect H /s numbers, thanks for spotting that._

~~~
Nextgrid
I'd also suggest checking out CuriousMarc's channel who is involved in
restoring what I believe is the same AGC and has a bunch of very interesting
videos about it (among other antique computing gear like teletypes and a Xerox
Alto):
[https://www.youtube.com/user/mverdiell/videos](https://www.youtube.com/user/mverdiell/videos).

Speaking of AGCs, he just recently uploaded a video where they used a restored
AGC to dump prototype core rope memory modules from the Computer History
Museum's (non-functional) AGC.

~~~
nas
All those guys are amazing but I especially enjoy Ken and Mike reverse
engineering stuff. Really impressive.

------
timonoko
Rope memory is so fascinating and economical. Just wires and only one metal
rings for each word, which can be hundreds of bits longs. My question is: is
it possible to construct a finite state machine only with rope memory and
mechanical relays and maybe capacitors. You can perhaps raise reading voltages
so high, that the signal is detectable with relay coil. This would be the
first real steam-punk, post-apocalyptic computer that people with early iron
age technology can construct themselves.

~~~
throwaway2048
Arguably, a finite state machine is not a computer, its logically equivalent
to clockwork, which has been around for thousands of years.

Although I do like the sound of your idea...

~~~
wongarsu
Computers are really just finite state machines with really fancy input and
output. We like to pretend they are Turing machines, but that breaks down when
you run out of RAM: a Turing machine has infinite memory, a computer has a
large finite amount of memory.

I suppose computers really are fancy clockwork. So are humans.

~~~
ForHackernews
I think it's at least an open question whether humans are fancy clockwork or
not. (Unless all you're doing is denying Cartesian dualism, in which case, I
agree but so does everyone)

We don't really understand how the brain works, but it does seem that neuronal
integration is an analog and probabilistic process, quite different from
deterministic responses in computers (or clockwork). Some people have even
speculated about quantum mechanical effects, though those hypotheses are very
controversial and I don't put much stock in them personally.

It's overly reductive to compare the brain to a computer, and the analogy
tends to obscure more than it illuminates.

[https://mindmatters.ai/2018/08/the-brain-is-not-a-meat-
compu...](https://mindmatters.ai/2018/08/the-brain-is-not-a-meat-computer/)

[https://aeon.co/essays/your-brain-does-not-process-
informati...](https://aeon.co/essays/your-brain-does-not-process-information-
and-it-is-not-a-computer)

~~~
penagwin
I know this is controversial but I've always felt the entire universe is
Deterministic which would make it just a massive State-Machine.

We as humans might be missing the right equations/right measurements/precision
to actually figure out it's exact state.

~~~
ForHackernews
Maybe. As far as anyone can determine, some physical processes (e.g.
radioactive decay) really are random. There is "noise" in reality. Even with a
perfect accounting of every subatomic particle in the universe, you couldn't
predict when a particular atom will decay.

------
canada_dry
> the AGC results in a hash rate of 10.3 seconds per Bitcoin hash VS a
> relatively slow USB hash device that performs at 130 billion hashes per
> second.

> it would take the AGC 4×10^23 seconds on average to find a block. Since the
> universe is only 4.3×10^17 seconds old, it would take the AGC about a
> billion times the age of the universe to successfully mine a block.

Pretty mind boggling stuff.

~~~
jrockway
I also did this calculation and got a different result.

According to Google, one block requires 2,440,643 * 2^32 hashes. Multiply that
by 10 seconds per hash, and you get 3.32176901e9 years. The Universe has been
around for longer than that, about 13e9 years.

------
ngcazz
> Trying to mine Bitcoin on this 1960s computer seemed both pointless and
> anachronistic, so I had to give it a shot.

Brilliant.

------
cgh
From the notes at the end of the article:

"The AGC that we're restoring belongs to a private owner who picked it up at a
scrap yard in the 1970s after NASA scrapped it. For simplicity, I refer to the
AGC we're restoring as "our AGC"."

How much other fantastic equipment of historical significance have we lost, I
wonder?

~~~
cr0sh
Not quite as rare, and certainly nothing like this, but several years ago I
picked up an Altair from a local electronics junk yard.

Crazy thing was, I must have walked by where it was stored hundreds of times
over the years since I first started to go to this place back in 1991 (Apache
Reclamation and Electronics, here in Phoenix). Apparently it was kept in a
trailer that was outside. I never saw the Altair in there, but it was stuffed
full of junk and hard to "wander" around inside (the few times I went in, I
was lucky not to be bit or stung by any number of things, to be honest).

So one day I was out in the yard wandering around; I turned around - and saw
it sitting on a chair (I must have walked right past it). I walked over to it,
thinking "No way - just, no way" \- but yes, there it was. Very dirty, missing
it's top cover, but otherwise all there with a ton of peripheral cards slotted
in place.

I went over to one of the owners of the place; he was up on a forklift - I
pointed over at it, and said "I'll give you $100 for that thing over there".
Yeah, I knew what it was worth, but this same guy had sold me 100 meters of
multimodal fiber cable for the cost of copper, back when that stuff ran you 25
dollars a foot - so I thought "maybe he has no clue what it is".

He looked, turned to me and said "Nope - can't do that. Some guy a week ago
pulled it out of that trailer there and told me it was an antique. Can't go
any lower than $250.00". I dropped my smile, hemmed and hawed, grumbled a bit
- you know, put on a show. Then I looked up, and said "Danny (that's his name)
- you drive a hard bargain, but that's a deal."

15 minutes later I had it in the back of my pickup and was driving home as
quick as I could before anyone changed their minds. A sale's a sale! I went
back the next week, dug around some more, and came up with a ton of S-100 bus
cards - and got those for nothing as well. Every now and then I go back and
look for other cards, but other than a stash of NOS S-100 edge connectors - I
couldn't find anything else.

I later went online on to an Altair message group, posted what I had, and was
told mine was rather unique, as mine had flat handle toggles, and the later
versions all used round handled toggles. I was offered close to a grand for it
in as-is sight unseen condition, but I turned it down. My ultimate goal is to
restore it to operating condition. I have not plugged it in (beer can
capacitor would probably explode and catch fire if I did). It needs a ton of
TLC.

It has a full amount of RAM, and the 8080 card was replaced with a Z-80 card
(common upgrade of the time); there's enough RAM to run CP/M if I wanted to.
Various serial and parallel I/O cards, plus a fixed-sector floppy drive card
(good luck finding a drive, let alone media, for anything short of a fortune).
I later had others donate to me other cards and parts (including an
interesting unpopulated 6502 processor card - but I don't know if the pinout
is the same as what the Altair used, or if it's meant for some other S-100 bus
computer - despite the S-100 bus supposedly being a standard, there were a few
variations of it - as it goes).

I figure if I can get it working to some extent, and get the test program from
the manual toggled in and working, I'll consider that a success. But what I'd
like to do is take it further, getting my VT-100 terminal hooked up to it, and
using some kind of method to boot either BASIC or CP/M from a flash drive or
something (I know this can be done).

Sadly, I contacted the case manufacturer about getting a top cover, and had no
luck. The company (I don't recall their name), used to make that case as an
enclosure that tons of companies used for their equipment. They made it for
decades, long after the Altair ceased to be a thing, long after MITS went
under. I told them what I needed, and they told me they no longer made that
enclosure since a couple of years prior, and no longer had the engineering
drawings, either.

So - if I want that part fixed, I'll either have to custom make something
myself, try to find the part other ways (maybe visit and talk to people at a
vintage computer fest?), or pray I run across one somewhere. Another
possibility, though it wouldn't be cheap, would be to have a machine shop make
me a one-off of a top that'd fit. Honestly, something tells me the first
option might be the best, and in spirit with the machine itself. I doubt it
would hurt it's value any.

~~~
fit2rule
This is amazing - I'd love to learn, some time in the near future, that you've
gotten the system up and running and are doing something interesting with it.

I am the curator of a small collection of retro computers here in Vienna [1],
and have managed to get a few systems up and running again - nothing as cool
as an Altair, but you've now gotten me motivated to have another look at it as
a platform. There's a clone kit out there [2], but I'm not sure its available
.. but for sure its something I'm going to check out in an emulator.

Got a place we might be able to follow you for future updates about your
restoration project?

[1] -
[http://primitur.at/TIMETRON2019_Opening/](http://primitur.at/TIMETRON2019_Opening/)

[2] - [http://altairclone.com](http://altairclone.com)

------
bdcravens
This has to be the best description of how Bitcoin mining works that I have
ever read (easy to understand and none of the usual ideology you find in usual
Bitcoin writing)

~~~
Someone
IMO, the original Bitcoin paper
([https://bitcoin.org/bitcoin.pdf](https://bitcoin.org/bitcoin.pdf)) is
similarly easy to understand, and also doesn’t contain ideology.

------
LandoCalrissian
CuriousMarc's series on the AGC restoration has been really cool to watch:
[https://www.youtube.com/watch?v=2KSahAoOLdU&list=PL-_93BVApb...](https://www.youtube.com/watch?v=2KSahAoOLdU&list=PL-_93BVApb59FWrLZfdlisi_x7-Ut_-w7)

------
cr0sh
I found this story interesting, but unsurprising knowing the author. I'm
amazed he got that thing to work - but if there were anyone who could do it,
it's him.

Unfortunately, I didn't find an answer to something I suspect, but I don't
know for certain? Maybe someone here could shed light on it?

He mentions that the AGC was the first computer to use integrated circuits, in
the form of 5600 NOR gates, built into custom "logic modules", each set then
wired together using a backplane or something like that. But take a look at
those ICs - are they thru-hole, or SMT?

I seem to recall seeing pictures of the AGC - of other parts of it - and that
it used a form of SMT in its construction; does anyone know if this is true?
If so, would that also make it the first time SMT was used in a computer? Or
were there other prior examples.

It seems also curious that if it was SMT being used - that such a thing was
chosen for this critical piece of hardware, mounted on a rocket undergoing
tremendous strain and vibration. I would think in that case DIP would be the
better solution, ideally with extended pins for wire-wrap, then everything
embedded in conformal coating after test - but while the DIP vs SMT question
is up in the air, I've never seen any pictures that suggest wire wrapping was
used, and nothing that showed anything like conformal coating.

So - can anyone shed any light on this?

~~~
kens
To answer some of your questions. The AGC was a very early integrated circuit
computer, but probably not the first.

The ICs were surface-mount flat packs onto boards in the modules. They were
welded, not soldered. The modules plugged into the backplane connectors, which
were wire-wrapped. The modules and backplane were encapsulated in plastic
(epoxy or polyurethane) for flight. (This AGC was for ground testing, so it
was not encapsulated.)

The non-logic circuitry was built with cordwood construction, i.e. the
components were inserted into holes in the module. Point-to-point wires were
welded onto the components on either side. These were also encapsulated in
plastic.

I don't know if DIP integrated circuits would have been more reliable, but the
DIP wasn't invented until 1964, too late for the AGC.

The Saturn V rocket contained a Launch Vehicle Digital Computer (LVDC), which
was completely different and built by IBM. It also used surface-mount modules,
but IBM's hybrid modules, not integrated circuits. So the AGC wasn't the only
surface mount computer at the time. (Does anyone have a good history of
surface mount?)

> if there were anyone who could do it, it's him

Honestly, Mike Stewart is the AGC super-expert who made the restoration
possible. He knows way, way more about the AGC than I do.

~~~
nas
Ken, I love watching you and Mike do your stuff (Marc too but usually he is
behind the camera). Thank you for taking the time to explain things.

------
dnprock
Super cool. I got mining to work on my forked bitcoin. I've got 5-8 GH/s using
a usb miner. It was a lot of work. It's also a good way to learn about
cryptocurrency. My effort is trivial compared to this.

------
Piezoid
> For instance, the AGC (like many 1960s computers) didn't have a stack, so
> you had to keep track of the return address for each subroutine call.

> I managed to get everything to fit in one bank by reusing these 16 words for
> multiple purposes, but I spent a lot of time debugging problems when a
> variable clobbered a location still in use.

It could be fun to make a slightly higher level ad-hoc assembly language for
solving these problems. For example SSA with basic blocks.

------
atribecalledqst
Always happy to see another writeup from Ken Sherriff. I think he has an
account here, so if you're reading this, thanks.

The estimate of the amount of electricity Bitcoin consumes (from a footnote)
is distressing -- on the order of a small country...

This is one of the big reasons why I personally will never buy into a
cryptocurrency (and especially bitcoin) -- too much wasted energy. If I want
to engage in speculative trading, I'll do it in the stock market.

~~~
pazimzadeh
Ethereum is replacing proof-of-work with proof-of-stake in 2020, which should
help with this.

But what are you comparing the cost of running Bitcoin to, the entire world's
banking infrastructure? Does this take into account all of money that has
slipped through the cracks over the years?

i.e. [https://www.thenation.com/article/pentagon-audit-budget-
frau...](https://www.thenation.com/article/pentagon-audit-budget-fraud/)

> "there were no ledger entries or receipts to back up how that $6.5 trillion
> supposedly was spent"

> "In all, at least a mind-boggling $21 trillion of Pentagon financial
> transactions between 1998 and 2015 could not be traced, documented, or
> explained"

~~~
gibybo
>Ethereum is replacing proof-of-work with proof-of-stake in 2020, which should
help with this.

I seem to remember that proof-of-stake has been coming 'next year' for about 3
years now.

~~~
pazimzadeh
I don't really mind if they take one more year to do it if it is seamless.
Seems like all existing ETH will eventually become ETH2.

Is it notable that proof-of-stake moves power from the means of production to
the owners?

------
CharlesDodgson
This link warms my heart.

------
pepijndevos
I can highly recommend the curiousmarc AGC restoration series on youtube,
which also feature Ken.

------
AmericanFTM
Could he post responses on the internet to people wondering more about this
weird piece of history and how he came across with that thing. If you can surf
the web then it is useful!

------
jonny_eh
It'd be cool if this was hooked up to the internet, with a camera pointed at
it, and people could rent it for an hour at a time to play with.

------
beamatronic
In my opinion this person seems like one of those 10x people. Amazing job.

~~~
kens
10x kind of implies that they are doing something actually useful. :-)

~~~
nobodyshere
From whose point of view? A mythical “10x” working at a Californian small
startup making IoT juice machines isn't necessarily doing anything more
useful.

~~~
vvdcect
I think he's the guy from the blog and he's making a joke

------
sbassi
I wonder if this can be done in a C64 and what would be the hashrate.

------
DenisM
The irony is strong here - the most productive computer computer in the world,
the one that's taken us to the moon, has been tasked with the most un-
productive activity, that is burning energy for the sake of maintaining a
ledger of fictional possessions.

~~~
RodgerTheGreat
Remember when computer nerds the world over pooled their spare compute
resources for Folding@Home and Seti@Home, in exchange for nothing but
leaderboard positions and bragging rights?

The real tragedy of the cryptocurrency gold rush is that by providing a profit
motive it decimated these kinds of collaborative computing projects.

~~~
fastball
There are initiatives to perform useful computations with cryptocurrency.

------
gist
You know what most amazes me about a guy like Ken Shiriff? The fact that he is
smart enough to do this but he uses his brains to just scratch a curiosity
itch. It seems not only time consuming but in practical terms (other than
mentally) obviously worthless. (Not that there isn't a worth to the
acheivement after all people spend all sorts of time on hobby pursuits of
little apparent value).

I have to therefore say (will leave out the 'honestly') that if I was 'that
smart' I'd use my brains to do something that would put money in my pocket.

