
Bitcoin mining on a vintage Xerox Alto: very slow at 1.5 hashes/second - darwhy
http://www.righto.com/2017/07/bitcoin-mining-on-vintage-xerox-alto.html
======
indescions_2017
It actually puts compute power in perspective for me quite nicely, as
GigaHashes per second (GH/s) is the most common metric in mining pools. My
core i5 laptop gets around 10MH/s. A gaming desktop with GTX1050 pushes above
100MH/s.

Compare that to a state-of-the-art Antminer at ~11Th/s using 1.1kW. Estimating
a large pool size of ~250 Ph/s. And the Alto's rough payout calculation of
about a billionth of a penny for 2017 looks right!

Any chance ethereum and zcash mining are up next for that poor old Alto that
just wants to retire and dream of electric sheep?

~~~
kens
If I understand etherium and zcash mining, they use algorithms designed to
require a lot of RAM so it is ASIC-resistant. (I.e. they want mining to be
practical on a PC, not requiring custom hardware.)

Unfortunately for the Alto, the gigabytes of data required for mining won't
fit into the 512kB memory. Even swapping to the hard disk won't work, since
that only holds 2.5MB. Thus, while Bitcoin would have been possible in the
1970s, etherium and zcash wouldn't have been.

~~~
miahi
Not only lots of RAM but lots of very fast RAM. This is what makes it ASIC-
resistant for now (it's not hard to attach a huge RAM to an ASIC, but going
for hundreds of GB/s is really expensive). So unfortunately it's GPUs for now.

~~~
xj9
\> unfortunately

i think you are missing the point. the idea is to _prevent_ ASICs from taking
over. if you _could_ build one that could mine ETH or zcash, it would be a
failure from their perspective.

~~~
miahi
It's unfortunate because the GPU prices and availability right now are going
nuts. I wanted to buy a GTX 1070 and it's out of stock with weeks of waiting
on preorders on most European websites, with price increases of 40-50% in the
last 30 days.

~~~
ven_bug_trap
In the short term it may seem more unfortunate, but the problem with expensive
ASICs is that they make centralisation far easier, by making it less feasible
for ordinary people to do the mining.

~~~
Klathmon
The people behind sia coin believe differently [0] and after reading that I'm
more inclined to believe them.

The short version is that since "commodity" hardware can mine many things, you
can't gauge how much power there could _possibly_ be. Someone with 100,000
GPUs could turn their whole system to your coin and have over 50% of the
hashing power for a day, then go back to whatever else the day after.

With ASICs, the devices can't be used for anything other than that specific
coin, so to "save up" your hashing power to sneak in a day that you can get
majority hashing power would be stupid. You'd have to be giving up the income
from them while you waited.

The article explains it much better than I can, I really recommend it.

[0] [https://blog.sia.tech/choosing-asics-for-
sia-b318505b5b51?gi...](https://blog.sia.tech/choosing-asics-for-
sia-b318505b5b51?gi=43997fdbccfc)

~~~
kens
What's stopping a government agency from "saving up" their hashing power so
they could get majority control over Bitcoin if they needed to? Seriously, if
you were the NSA, wouldn't this be a sensible thing to spend a few million
dollars on? And they could use their mining hardware now, hidden through
pools, so it would almost pay for itself. (Yes, I know I'm getting into
tinfoil hat territory.)

~~~
Frogolocalypse
In practical terms a 51% attack is not good, but actually has a fairly
straight-forward solution to solve. Change the PoW. A 51% attack can't steal
your coins, only restrict your spending them for the length of time they are
conducting the attack. So the issue isn't that you have 51% attack
possibility, but that people think you do, and furthermore think you're going
to abuse it. If a government attacked it, they'd simply hard-fork away from
the mining algorithm, and millions of dollars of hardware investment gets
flushed down the toilet.

------
rjsw
My copy of The TTL Data Book suggests that the ALU was able to do XOR, an
earlier blog post stated that microcode opcode bits go through a table instead
of being fed directly to the 74181 function pins.

I wonder why Xerox didn't want to use all the ALU features.

~~~
kens
In microcode, the Alto provides the 16 most useful functions of the 74181
(calling most of the 74181's operations "mostly useless"). This includes XOR
and OR. However, the Alto copied the Data General Nova's instruction set,
which doesn't include OR and XOR, so you can't use these instructions from
machine code. I think there's extended microcode that provides "extra"
instructions for XOR and OR and an improved BCPL compiler to make use of them,
but I haven't tracked it down.

See the Alto hardware manual (page 4) on bitsavers for details:
[http://bitsavers.informatik.uni-
stuttgart.de/pdf/xerox/alto/...](http://bitsavers.informatik.uni-
stuttgart.de/pdf/xerox/alto/AltoHWRef.part1.pdf)

~~~
userbinator
Here is a document I found on the DG Nova instruction set:

[http://users.rcn.com/crfriend/museum/doco/DG/Nova/base-
instr...](http://users.rcn.com/crfriend/museum/doco/DG/Nova/base-instr.html)

If you scroll down to "Arithmetic/Logic Instructions" you'll see that they did
not have room for XOR nor OR, since several of the 8 opcodes that fit into the
3-bit field are what we'd normally think of as "one-operand", but have been
expanded to be "two-operand" (oddly enough, there is an increment but no
decrement instruction either.)

It's interesting to compare to two other well-known CPUs with a 3-bit ALU
opcode field:

The Z80's (and 8008/8080/8085) ALU opcodes are: ADD/ADC/SUB/SBC/AND/XOR/OR/CP

The x86's ALU opcodes are: ADD/OR/ADC/SBB/AND/SUB/XOR/CMP

~~~
kens
That's an interesting comparison with microprocessor ALU operations. (6502 is
similar to Intel but doesn't have add/subtract without carry.)

Note that the Nova uses two additional instruction bits for the carry. Thus,
the Intel instruction sets use two of the 8 opcodes for add with carry and
subtract with borrow/carry, but the Nova doesn't. So it should be easier for
the Nova to fit in additional useful ALU instructions. (Not to mention the
Nova has 16-bit instructions.)

------
dijit
To be fair. I'm impressed it's able to do it at all.

I compiled a "hello world" in C staticly on my laptop the other week as a demo
of how things have grown; to my horror it wouldn't have even fit in memory of
my first computer.

~~~
kens
Well, I got SHA-256 running on a 1960s punched card machine with 16K of memory
so the hardware requirements aren't too much.

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

------
yuhong
I wonder about Ryzen's new SHA1/SHA256 instructions, not only for Bitcoin but
also things like SHA1 collisions.

~~~
mrb
AMD's and Intel's SHA256 instructions are utterly useless to compete with
ASICs: they use approximately 10 000 times more energy (4 orders of
magnitude!) than a 16nm Bitcoin mining ASIC per hash: 1000 J/GH vs 0.1 J/GH.

Source: I wrote one of the first GPU miners, founded a Bitcoin mining ASIC
system integrator company, etc.

~~~
le-mark
From your perspective, how should an individual with a non trivial sum of
money ($20k for example) get started mining BTC? Do you favor mining or
investing by purchasing?

~~~
mrb
Large professional miners spend on average $0.05/kWh on their mining ventures,
including all other non-electrical overheads. So as a small miner with
virtually zero overhead, you should only mine if your electricity cost you
$0.05/kWh or less. If you do, buy an Antminer S9.

But personally I prefer simply investing in BTC.

------
Animats
They're using the British Cruddy Programming Language? Don't they have the
Mesa compiler up?

BCPL is about halfway between assembler and C.

~~~
kens
Still working on getting Mesa running...

BCPL isn't as primitive as I expected. It's surprisingly similar to C, except
lacking types. C's structs, unions, bitfields are almost a direct copy of
BCPL, along with the ternary ? operator. C's lvalues, rvalues, and pointers
are also just like BCPL.

BCPL has way more control flow statements than C: if EXP do STATEMENT, unless
EXP do S, test EXP then S1 or STAT2, test EXP ifso S1 ifnot S2, while EXP do
S, until E do S, S repeatwhile EXP, S repeatuntil EXP, S repeat, switchon EXP
into CASES, etc. The C language trimmed out a lot of the redundancy. BCPL's
switchon statement is just like C's with fall-through cases unless you use a
break.

------
janci
Does it run DOOM?

~~~
lostgame
I know this is a joke, but the Alto (IIRC) was the first computer to have a 3d
maze like game - I believe they even played it over LAN!

