1
00:00:00,540 --> 00:00:01,300
All right.

2
00:00:01,300 --> 00:00:04,590
Now we're going to talk about what
hardware miners use to achieve this

3
00:00:04,590 --> 00:00:07,500
computation, which I've just
spent time telling you is really,

4
00:00:07,500 --> 00:00:08,500
really difficult to do.

5
00:00:10,220 --> 00:00:13,010
So, first of all,
what exactly is this computation?

6
00:00:14,170 --> 00:00:18,053
So, we've mentioned hash functions and
we've mentioned SHA-256.

7
00:00:18,053 --> 00:00:22,140
In particular, what exactly is SHA-256?

8
00:00:22,140 --> 00:00:24,650
Well, it's a general purpose
cryptographic hash function.

9
00:00:24,650 --> 00:00:29,340
It's actually part of a bigger family of
functions, that was standardized in 2001.

10
00:00:29,340 --> 00:00:34,240
It did come out of the NSA,
which has led to a couple of interesting

11
00:00:34,240 --> 00:00:38,560
conspiracy theories, by some people
about its relationship to Bitcoin.

12
00:00:38,560 --> 00:00:42,040
But it's generally considered
a fairly strong hash function.

13
00:00:42,040 --> 00:00:43,480
It's not broken, cryptographically.

14
00:00:43,480 --> 00:00:47,220
Although there are some theoretical
weaknesses that are starting to show up.

15
00:00:47,220 --> 00:00:52,750
As a result, the replacement the SHA-3
family, has already been picked, actually.

16
00:00:52,750 --> 00:00:55,750
And it's in the final stages
of standardization today.

17
00:00:55,750 --> 00:00:58,650
But it wasn't available at the time,
BitCoin was designed.

18
00:00:58,650 --> 00:00:59,620
This was a good choice.

19
00:00:59,620 --> 00:01:02,300
This was the strongest general
purpose cryptographic hash

20
00:01:02,300 --> 00:01:04,380
function available at the time.

21
00:01:04,380 --> 00:01:08,640
It is possible that it will become less
secure over the lifetime of BitCoin, but

22
00:01:08,640 --> 00:01:09,590
for now it's pretty good.

23
00:01:11,500 --> 00:01:12,400
So, what did it look like?

24
00:01:12,400 --> 00:01:17,250
This is a diagram of what
the SHA-256 state looks like.

25
00:01:18,660 --> 00:01:21,420
And we don't need to know all of
the details of this to understand how

26
00:01:21,420 --> 00:01:22,770
BitCoin works.

27
00:01:22,770 --> 00:01:25,098
But I'll just give a high level overview,

28
00:01:25,098 --> 00:01:28,533
to give an idea of the task that
needs to be solved by the miners.

29
00:01:30,805 --> 00:01:34,210
So there's a 256-bit-state in SHA-256.

30
00:01:34,210 --> 00:01:37,700
It's split up into eight 32 bit words.

31
00:01:37,700 --> 00:01:40,809
So this is very much optimized for
32 bit platforms.

32
00:01:43,500 --> 00:01:46,030
And in each round some of
those words are taken.

33
00:01:46,030 --> 00:01:49,440
There's four different tweaks that are
applied to those words that are at the bit

34
00:01:49,440 --> 00:01:51,240
level, so each one of these is two or

35
00:01:51,240 --> 00:01:56,150
three bits being flipped or
ended together, basic logic operations.

36
00:01:57,910 --> 00:02:00,790
And then a number of words
in the state are taken,

37
00:02:00,790 --> 00:02:04,454
some with these tweaks applied,
and added together mod 32.

38
00:02:05,520 --> 00:02:06,430
In a pipeline here.

39
00:02:06,430 --> 00:02:11,450
And then the result of all
of these additions [COUGH]

40
00:02:11,450 --> 00:02:17,750
is wired over to the first word of the
state, and the entire state shifts over.

41
00:02:17,750 --> 00:02:20,500
So some of the design here,
some of the design ideas,

42
00:02:20,500 --> 00:02:24,070
date back to classic linear
feedback shift registers.

43
00:02:24,070 --> 00:02:27,050
Which was one of the earliest
approaches to cryptographic design.

44
00:02:29,160 --> 00:02:33,240
So all of this happens, this is just one
round of the shock compression function,

45
00:02:34,400 --> 00:02:38,790
and the complete computation of
SHA-256 does this 80 times, for

46
00:02:38,790 --> 00:02:43,830
80 iterations, and in each iteration,
there are slightly different constants

47
00:02:43,830 --> 00:02:47,990
applied at the one step there, so that
every iteration isn't exactly the same.

48
00:02:50,200 --> 00:02:51,730
So, this is the task ahead of miners,

49
00:02:51,730 --> 00:02:56,200
to compute this specific function,
only this, as fast as possible.

50
00:02:57,340 --> 00:03:00,970
And so, you can see that to do this you
need to be able to deal with 32 bit words,

51
00:03:00,970 --> 00:03:03,940
you need to be able to do 32 bit addition.

52
00:03:03,940 --> 00:03:06,674
And you need to also be able
to do some bitwise logic.

53
00:03:09,088 --> 00:03:13,043
So the first generation of mining,
when Bitcoin was originally proposed,

54
00:03:13,043 --> 00:03:15,440
was all done on general purpose computers.

55
00:03:15,440 --> 00:03:17,920
General purpose CPUs.

56
00:03:17,920 --> 00:03:22,010
In fact,
it was as simple as this code, here.

57
00:03:22,010 --> 00:03:26,340
That simply searched over
nonces in a linear fashion,

58
00:03:26,340 --> 00:03:30,180
computed SHA256 in software, and
checked if the result was a valid block.

59
00:03:32,510 --> 00:03:36,570
And one quirk which I haven't mentioned
yet, this is probably a good time

60
00:03:36,570 --> 00:03:41,150
to mention it if there ever was one,
is that for reasons that aren't

61
00:03:41,150 --> 00:03:45,080
completely specified, you actually
compute the SHA256 function twice.

62
00:03:46,970 --> 00:03:50,346
So it's just doubled up, that's a fact
of life that miners have to live with.

63
00:03:52,725 --> 00:03:56,549
So how fast will this run on
a general purpose computer?

64
00:03:57,790 --> 00:03:59,280
Well, if you're doing pretty well.

65
00:03:59,280 --> 00:04:01,240
If you have a high end desktop PC,

66
00:04:01,240 --> 00:04:06,780
you might be able to do this at about
two to the 24 hashes per second.

67
00:04:08,680 --> 00:04:12,230
Which would be about 20 megahertz.

68
00:04:13,940 --> 00:04:17,360
Remember that even though hertz often
are applied for processor speed,

69
00:04:17,360 --> 00:04:21,240
the basic idea of hertz is it just
means something that you're doing,

70
00:04:21,240 --> 00:04:22,600
that many times per second.

71
00:04:24,290 --> 00:04:27,010
Okay, so if you're hashing
at a rate of 20 megahertz,

72
00:04:27,010 --> 00:04:28,950
what does that get you
with today's difficulty?

73
00:04:32,840 --> 00:04:35,790
Well, it would actually
take you over 100,000

74
00:04:35,790 --> 00:04:37,389
years at this rate to find a block.

75
00:04:39,450 --> 00:04:43,110
So we talked about how mining was
going to be a difficult slog.

76
00:04:43,110 --> 00:04:47,060
If you're mining on a general
purpose PC today, it's a really,

77
00:04:47,060 --> 00:04:48,190
really big hill to get up.

78
00:04:49,370 --> 00:04:52,030
because it's going to take
you that 140,000 years.

79
00:04:53,310 --> 00:04:57,416
So as a result, today and even for
the last few years, anybody trying to do

80
00:04:57,416 --> 00:05:01,392
mining on a CPU, probably didn't
understand how Bitcoin worked, and

81
00:05:01,392 --> 00:05:05,654
were probably pretty disappointed that
they never made any money doing it.

82
00:05:07,962 --> 00:05:11,900
So CPU mining was the first
generation of mining.

83
00:05:11,900 --> 00:05:13,170
The second generation,

84
00:05:13,170 --> 00:05:17,091
when people started to get frustrated
with how slow their CPUs were.

85
00:05:17,091 --> 00:05:21,780
Let's just try to use the graphics card,
the graphics processing unit, or GPU.

86
00:05:23,850 --> 00:05:25,550
So what is a GPU?

87
00:05:25,550 --> 00:05:30,540
Almost every computer now has a GPU
built in, for high performance graphics.

88
00:05:30,540 --> 00:05:34,846
They're designed to have high parallelism
which does help with bitcoin mining,

89
00:05:34,846 --> 00:05:38,680
because you can parallelize and computer
multiple hashes at the same time for

90
00:05:38,680 --> 00:05:40,240
different nonces that you want to try.

91
00:05:40,240 --> 00:05:42,980
And they're also designed for
high throughput, so

92
00:05:42,980 --> 00:05:45,850
there's a highly pipelined
design in graphics cards.

93
00:05:47,350 --> 00:05:48,550
And around 2010,

94
00:05:48,550 --> 00:05:52,670
the first implementation came out,
written in a language called OpenCL,

95
00:05:52,670 --> 00:05:57,220
which is a general purpose language to
do things other than graphics on a GPU.

96
00:05:58,230 --> 00:06:01,840
and it's a high level language, so it
took a little while before people started

97
00:06:01,840 --> 00:06:05,480
tweaking the code even further to run
quickly on specific graphics cards.

98
00:06:07,910 --> 00:06:10,240
So what's the advantage
of using a graphics card?

99
00:06:10,240 --> 00:06:13,500
Well, [COUGH] for one thing, they're
easily available and they're easy for

100
00:06:13,500 --> 00:06:14,850
amateurs to set up.

101
00:06:14,850 --> 00:06:17,420
You can order graphics cards online.

102
00:06:17,420 --> 00:06:21,990
You can buy them now at most
big consumer electronic stores.

103
00:06:21,990 --> 00:06:26,374
So they're just the most accessible high
end hardware that's available to most

104
00:06:26,374 --> 00:06:26,894
people.

105
00:06:28,299 --> 00:06:32,060
They also have some properties that
make them specifically nice for Bitcoin.

106
00:06:32,060 --> 00:06:37,700
They're designed for parallelism so
they have a lot of arithmetic logic units

107
00:06:37,700 --> 00:06:42,800
they all use that you can use in parallel
to do different shaw 256 computations.

108
00:06:42,800 --> 00:06:46,970
And some of them also have some specific
instructions to do bit fiddling

109
00:06:46,970 --> 00:06:48,720
that work out quite nicely for shaw 256.

110
00:06:48,720 --> 00:06:53,550
They also have the property that you
can drive many graphics cards from

111
00:06:53,550 --> 00:06:57,760
one motherboard in the CPU, so
you could take your one computer and

112
00:06:57,760 --> 00:07:00,350
attach multiple graphics cards to it,
if you want.

113
00:07:01,670 --> 00:07:03,880
Most graphics cards can
also be overclocked,

114
00:07:03,880 --> 00:07:05,700
which is a property that gamers demand.

115
00:07:05,700 --> 00:07:09,740
So you can run them faster than
they're actually designed for,

116
00:07:09,740 --> 00:07:11,140
if you want to take the risk on.

117
00:07:12,940 --> 00:07:17,210
And with bitcoin mining, it might be a
good idea to run the chip must faster than

118
00:07:17,210 --> 00:07:20,910
it was designed for, even if you
introduce some errors into the process.

119
00:07:22,200 --> 00:07:27,550
So there's a measure of mining success
called Goodput, which is the throughput,

120
00:07:27,550 --> 00:07:29,910
how quickly you're finding blocks.

121
00:07:29,910 --> 00:07:31,165
Time's the success rate.

122
00:07:31,165 --> 00:07:34,320
[COUGH] How often does
the computation actually have errors?

123
00:07:35,910 --> 00:07:40,637
An interesting observation, is that it
may be worthwhile to go much faster,

124
00:07:40,637 --> 00:07:43,182
even if you make a large number of errors,

125
00:07:43,182 --> 00:07:46,260
if it leads you to find
valid blocks more quickly.

126
00:07:46,260 --> 00:07:51,254
So [COUGH] if you can tweak one knob and
run your graphics card 50% faster,

127
00:07:51,254 --> 00:07:56,327
even if you have an error in the SHA-256
computation 30% of the time,

128
00:07:56,327 --> 00:08:01,085
you just multiply 1.5 times 0.7 and
you're still finding blocks

129
00:08:01,085 --> 00:08:04,940
faster than running the chip
at normal speed with error.

130
00:08:04,940 --> 00:08:08,060
So this is something that people
spent a long time on optimizing,

131
00:08:08,060 --> 00:08:12,730
exactly how much did they overclock the
chip, and what errors did it introduce.

132
00:08:16,090 --> 00:08:18,218
So people started trying to scale this up.

133
00:08:18,218 --> 00:08:19,890
They said, aha!

134
00:08:19,890 --> 00:08:23,390
I have a graphics card and
I'm mining faster than I was in my CPU.

135
00:08:23,390 --> 00:08:25,270
What's better than one graphics card?

136
00:08:25,270 --> 00:08:27,330
Lots of graphics cards.

137
00:08:27,330 --> 00:08:30,927
And you started to see these really
interesting home grew setups like this one

138
00:08:30,927 --> 00:08:34,110
here, where people hand
built their own racks.

139
00:08:34,110 --> 00:08:36,480
They had their own custom cooling setup,

140
00:08:36,480 --> 00:08:41,150
which is often as simple as buying a bunch
of fans or air conditioning units.

141
00:08:41,150 --> 00:08:44,820
And trying to run as many GPUs
as possible in their basement or

142
00:08:44,820 --> 00:08:46,850
whatever other room was available to them.

143
00:08:48,320 --> 00:08:52,667
So this was obviously in the early days of
bitcoin when it was still mostly hobbyist

144
00:08:52,667 --> 00:08:56,825
who didn't know a lot about running a
modern data center, but they came up with

145
00:08:56,825 --> 00:09:01,109
some quite ingenious designs to pack A lot
of graphics cards into a small place and

146
00:09:01,109 --> 00:09:02,322
try to keep them cool.

147
00:09:05,401 --> 00:09:08,680
Now what are the disadvantages
of doing this?

148
00:09:08,680 --> 00:09:13,430
Well, GPUs actually have a lot of other
hardware specifically for doing video.

149
00:09:14,430 --> 00:09:17,160
Specifically, they have
floating point units that you

150
00:09:17,160 --> 00:09:19,370
don't use at all in SHA-256.

151
00:09:19,370 --> 00:09:23,620
So you're actually wasting a lot of
hardware from what the factory built.

152
00:09:25,850 --> 00:09:28,990
They also don't have the greatest
cooling characteristics when you

153
00:09:28,990 --> 00:09:31,160
put a lot of graphics
cards next to one another.

154
00:09:31,160 --> 00:09:35,080
They're not designed to be run all in
a row like I showed on a previous slide.

155
00:09:35,080 --> 00:09:37,430
They're designed to be
run one graphics card and

156
00:09:37,430 --> 00:09:39,630
one box doing graphics for one computer.

157
00:09:41,530 --> 00:09:43,980
They can also have a fairly
large power draw, so

158
00:09:43,980 --> 00:09:47,350
a lot of electricity is being used
by these relative to a computer.

159
00:09:49,120 --> 00:09:52,330
And initially there was the problem
that you had to build your own board or

160
00:09:52,330 --> 00:09:55,700
buy expensive boards to actually
house multiple graphics cards.

161
00:09:57,280 --> 00:09:59,770
So what's the upshot of this,
what kind of performance can you get?

162
00:10:01,590 --> 00:10:06,327
Well, on a good card, a really high-end
graphics card with a lot of aggressive

163
00:10:06,327 --> 00:10:09,029
tuning, you might get as high as 200 MHz.

164
00:10:11,572 --> 00:10:15,050
Which is about 2 to
the 27 hashes per second.

165
00:10:16,370 --> 00:10:19,710
So that's up to an order of magnitude
better than you would be doing in

166
00:10:19,710 --> 00:10:20,599
the CPU case.

167
00:10:22,220 --> 00:10:24,870
But even with that
improved performance and

168
00:10:24,870 --> 00:10:26,630
even if you're really aggressive and
you say.

169
00:10:26,630 --> 00:10:31,250
I want to get 100 graphics cards
together for my mining rig, that setup

170
00:10:31,250 --> 00:10:35,220
would still take you 174 years to find
the block at the current difficulty.

171
00:10:37,310 --> 00:10:41,020
So, it was a fun era while it lasted,
but graphics cards for

172
00:10:41,020 --> 00:10:43,170
BitCoin mining is basically dead.

173
00:10:45,760 --> 00:10:47,410
So, what replaced graphics cards?

174
00:10:48,530 --> 00:10:54,780
Well, around 2011, people started to use
FPGAs, or Field Programmable Gate Arrays.

175
00:10:56,560 --> 00:11:00,200
That was around the time that the first
implementation of BitCoin mining came out

176
00:11:00,200 --> 00:11:01,120
in the Verilog,

177
00:11:01,120 --> 00:11:04,010
which is the hardware design language
that's used to program FPGAs.

178
00:11:06,020 --> 00:11:09,680
And FPGA's are maybe something that you
have programmed before if you've taken

179
00:11:09,680 --> 00:11:11,950
a hardware design course.

180
00:11:11,950 --> 00:11:17,480
They are designed for, to have
hardware like performance but to have

181
00:11:17,480 --> 00:11:21,830
customers or the owner of the card being
able to customize it or reconfigure it in

182
00:11:21,830 --> 00:11:25,970
the field, unlike a chip which is made in
a factory and does the same thing forever.

183
00:11:27,910 --> 00:11:30,500
So they do offer better
performance than graphics cards,

184
00:11:30,500 --> 00:11:33,140
particularly on some of
the Bit fiddling operations.

185
00:11:33,140 --> 00:11:36,160
That kind of stuff is very
easy to spec out an FPGA.

186
00:11:37,820 --> 00:11:39,390
And if you know what you're doing,

187
00:11:39,390 --> 00:11:42,490
you can get the cooling to
work out better with an FPGA.

188
00:11:42,490 --> 00:11:45,380
You're wasting a little bit less
of the card than you would be with

189
00:11:45,380 --> 00:11:46,990
a graphics card.

190
00:11:46,990 --> 00:11:50,960
And you can pack more of these together
and drive them from one central unit.

191
00:11:52,180 --> 00:11:53,860
So just like with the graphics cards,

192
00:11:53,860 --> 00:11:58,600
people said once I have the FPGA working
why don't I try getting a lot of FPGA's.

193
00:11:58,600 --> 00:12:04,960
I know this doesn't look quite as messy
as the graphics card setup looked.

194
00:12:04,960 --> 00:12:09,670
This is a relatively neat rack with neat
wires You don't see the cooling set up

195
00:12:09,670 --> 00:12:16,830
here, you still needed a cooling set
up with air conditioning or with fans.

196
00:12:16,830 --> 00:12:20,890
But it was possible to build a big array
of FPGAs a little bit more neatly and

197
00:12:20,890 --> 00:12:23,394
cleanly then you could
with graphics cards.

198
00:12:25,411 --> 00:12:30,312
The disadvantages of using FPGAs are that
they were being driven harder for

199
00:12:30,312 --> 00:12:34,822
BitCoin mining by being on all the time
and working as hard as possible

200
00:12:34,822 --> 00:12:39,500
than a lot consumer-grade FPGAs
were really designed for.

201
00:12:39,500 --> 00:12:41,580
So a lot of people found
a number of errors and

202
00:12:41,580 --> 00:12:45,370
malfunctions in their FPGAs as
they were doing Bitcoin mining.

203
00:12:45,370 --> 00:12:51,360
It was also, it turned out, to be
difficult to optimize the 32-bit ad step,

204
00:12:51,360 --> 00:12:54,000
which as we said is critical for
doing SHA256.

205
00:12:54,000 --> 00:12:58,810
They were also just less accessible for
people.

206
00:12:58,810 --> 00:13:02,660
It's harder to buy an FPGA,
you can't buy one at most stores.

207
00:13:02,660 --> 00:13:05,060
There are fewer people who
know how to program FPGA's,

208
00:13:05,060 --> 00:13:06,089
who know how to set them up.

209
00:13:07,310 --> 00:13:11,870
And it turned out that the costs, even
though the performance on FPGA's went up,

210
00:13:11,870 --> 00:13:14,490
the cost per performance
was only an incremental,

211
00:13:14,490 --> 00:13:17,690
very marginal gain over
using graphics cards.

212
00:13:17,690 --> 00:13:20,040
So it was a pretty short lived reign.

213
00:13:20,040 --> 00:13:22,500
Whereas people were mining
on graphics cards and

214
00:13:22,500 --> 00:13:26,370
graphics cards were king for
maybe a year or so.

215
00:13:26,370 --> 00:13:30,320
It was a much shorter matter of months
where FGPAs were a popular solution for

216
00:13:30,320 --> 00:13:31,860
BitCoin mining.

217
00:13:31,860 --> 00:13:33,720
But, if you were using an FPGA and

218
00:13:33,720 --> 00:13:36,660
using it well,
you might get up to about a gigahertz.

219
00:13:37,880 --> 00:13:39,950
And now it sounds like we're
making some real progress.

220
00:13:39,950 --> 00:13:41,669
We're doing a billion hashes per second.

221
00:13:43,610 --> 00:13:49,110
But even with a one gigahertz setup on
a FPGA, and even if you 100 boards.

222
00:13:49,110 --> 00:13:51,820
So again even,
if you bought a lot of FPGAs and

223
00:13:51,820 --> 00:13:54,520
shove them all into your
amateur mining rig,

224
00:13:54,520 --> 00:13:59,850
it would still take you 25 years to
find a BitCoin block at that rate.

225
00:13:59,850 --> 00:14:03,180
So this is still not looking like
a really attractive thing to jump into.

226
00:14:04,210 --> 00:14:07,350
And you might be asking if all these
solutions are so intractable today,

227
00:14:07,350 --> 00:14:08,780
what are people actually doing?

228
00:14:11,010 --> 00:14:15,030
Well mining today is essentially
dominated by BitCoin ASICs, or

229
00:14:15,030 --> 00:14:17,280
Application Specific Integrated Circuits.

230
00:14:17,280 --> 00:14:19,220
So these are chips that were designed and

231
00:14:19,220 --> 00:14:22,719
built from scratch to do
nothing except mine BitCoins.

232
00:14:23,980 --> 00:14:29,120
They were fabbed out at a factory,
packaged up and sold to a consumer,

233
00:14:29,120 --> 00:14:32,750
solely to be BitCoin miners,
and if you go online today,

234
00:14:32,750 --> 00:14:37,310
you can find a lot of people willing
to sell you BitCoin mining ASICs.

235
00:14:37,310 --> 00:14:41,010
There's a couple of big vendors that
now do this as a full time product, so

236
00:14:41,010 --> 00:14:44,040
these companies have sprung
up in the last two years.

237
00:14:44,040 --> 00:14:48,360
And the main product, in some cases the
only product that they sell as a business

238
00:14:48,360 --> 00:14:50,010
is Bitcoin-mining ASICs.

239
00:14:52,240 --> 00:14:55,120
And now you'll notice when you're buying
an ASIC, you have a lot of options.

240
00:14:55,120 --> 00:14:58,130
You can choose between slightly bigger and
more expensive models,

241
00:14:58,130 --> 00:15:00,420
more compact models.

242
00:15:00,420 --> 00:15:03,570
And they'll throw a lot of numbers at you
in terms of what the performance is going

243
00:15:03,570 --> 00:15:08,570
to be, the cost, how much power it's
going to use But the most important thing

244
00:15:08,570 --> 00:15:12,420
to look at in a lot of these cases is how
quickly they're going to ship to you.

245
00:15:14,170 --> 00:15:17,000
So a lot of ASICs have
a pretty strong disclaimer

246
00:15:17,000 --> 00:15:19,900
that you have to pre-order them
before they're even available and

247
00:15:19,900 --> 00:15:23,140
they don't make any firm guarantees on
when they're going to be delivered.

248
00:15:24,170 --> 00:15:27,500
So again since these are new
companies selling the ASICs.

249
00:15:27,500 --> 00:15:31,660
It had to be funded as they went, which
means they need to essentially pay for

250
00:15:31,660 --> 00:15:36,230
the production run of ASICs
with consumers' pre-orders.

251
00:15:36,230 --> 00:15:38,700
And that means there's a lot
of pressure on people,

252
00:15:38,700 --> 00:15:41,620
on consumers to pay
before the chip is ready.

253
00:15:41,620 --> 00:15:44,404
In a lot of cases,
the chips had been shipped late and

254
00:15:44,404 --> 00:15:48,470
this has caused considerable consternation
and heartache for customers.

255
00:15:48,470 --> 00:15:51,716
There are a lot of dramatic complaints and
stories and

256
00:15:51,716 --> 00:15:55,467
tales of woe of people who spent
good money on a BitCoin ASIC and

257
00:15:55,467 --> 00:15:59,600
were hoping to really strike it rich
when the thing came in the mail.

258
00:15:59,600 --> 00:16:02,220
Only it came in the mail later
than they were expected.

259
00:16:05,020 --> 00:16:06,620
Like I said, these are special purpose.

260
00:16:06,620 --> 00:16:09,980
They're designed to be run at full speed,
constantly, for life,

261
00:16:09,980 --> 00:16:12,950
to do nothing other than mine BitCoins.

262
00:16:12,950 --> 00:16:16,470
They require a lot of expertise and
a long lead time to design.

263
00:16:16,470 --> 00:16:19,950
So much more complicated to actually
tape out a chip than to just write

264
00:16:19,950 --> 00:16:23,890
an implementation in open CLor in Verilog.

265
00:16:23,890 --> 00:16:28,940
But the amazing thing about BitCoin ASICs
is that, as hard as they were to design,

266
00:16:28,940 --> 00:16:33,700
analysts have looked at this and said
this may be the fastest turn around time

267
00:16:33,700 --> 00:16:38,250
essentially in the history of integrated
circuits for specifying a problem, which

268
00:16:38,250 --> 00:16:43,420
was mining BitCoins, and turning it around
to have a working chip in people's hands.

269
00:16:44,630 --> 00:16:46,120
So, this was really a rush job.

270
00:16:46,120 --> 00:16:49,300
People realized the need to
have BitCoin mining ASICs and

271
00:16:49,300 --> 00:16:51,630
the fact that they could sell them for
a lot of money.

272
00:16:51,630 --> 00:16:56,530
They designed them extremely quickly and
started shipping them to consumers.

273
00:16:56,530 --> 00:16:59,690
And as a result, you can probably expect
there were a lot of bugs in the first few

274
00:16:59,690 --> 00:17:01,430
generations of these things.

275
00:17:01,430 --> 00:17:03,120
Some of them didn't deliver.

276
00:17:03,120 --> 00:17:06,490
In fact, most of them probably didn't
deliver quite the performance that they

277
00:17:06,490 --> 00:17:07,880
were promising.

278
00:17:07,880 --> 00:17:10,230
Some of them, in fact, are quite buggy.

279
00:17:10,230 --> 00:17:13,424
But it's evolved a lot
over the past year and

280
00:17:13,424 --> 00:17:17,235
they're now fairly reliable
ASICs being shipped.

281
00:17:17,235 --> 00:17:20,079
So what does it look like if you actually
want to buy one of these things?

282
00:17:21,090 --> 00:17:23,620
So here's just a case study of
something that's been available for

283
00:17:23,620 --> 00:17:27,220
about six months now, so
it's already a little bit out of date, but

284
00:17:27,220 --> 00:17:31,550
this TerraMiner IV is this nice,
big, fancy box you see here.

285
00:17:31,550 --> 00:17:35,960
And this hashes at about two terahertz, so

286
00:17:35,960 --> 00:17:39,410
it's 1,000 times faster than that
hypothetical array of 100 really good

287
00:17:39,410 --> 00:17:42,059
FPGAs that we were
talking about previously.

288
00:17:43,190 --> 00:17:46,730
So you have to pay about $6,000 for this.

289
00:17:46,730 --> 00:17:51,330
And even with this incredible performance,
it would still take 14 months,

290
00:17:51,330 --> 00:17:52,630
on average, to find a block.

291
00:17:53,840 --> 00:17:57,820
So even if you think that you're investing
in a fairly nice piece of hardware,

292
00:17:57,820 --> 00:18:00,368
it's still extremely
difficult to mine a block.

293
00:18:02,851 --> 00:18:05,380
And the market dynamics
are really interesting here.

294
00:18:06,560 --> 00:18:09,950
So most boards that have been
coming on the market since

295
00:18:09,950 --> 00:18:14,550
ASICs came out have been effectively
obsolete in maybe six months.

296
00:18:15,750 --> 00:18:20,830
And on top of being obsolete in six months
the bulk of the profits are made up front,

297
00:18:20,830 --> 00:18:23,960
often in the first six weeks is
when you'll make half of expected

298
00:18:23,960 --> 00:18:26,430
profits in the lifetime of a mining rig.

299
00:18:26,430 --> 00:18:30,780
The fact that such a high proportion of
the profits are made in the first six

300
00:18:30,780 --> 00:18:34,570
months means that there's an incredible
premium on shipping speed.

301
00:18:34,570 --> 00:18:41,370
If your thing ships a week late, you may
have lost one sixth of that optimum time.

302
00:18:41,370 --> 00:18:46,060
In fact you have lost the most valuable
week in the lifetime of the ASIC because

303
00:18:46,060 --> 00:18:50,210
its value's only going to down over time
as mining gets more and more difficult.

304
00:18:51,720 --> 00:18:56,353
And this is really the motivation for
why so many companies require preorders,

305
00:18:56,353 --> 00:19:00,240
the fact that there's so
much competition to get the ASICs first.

306
00:19:00,240 --> 00:19:04,180
And there's a lot of speculation that
some companies have actually manufactured

307
00:19:04,180 --> 00:19:06,290
the ASICs,
tried to run them themselves for

308
00:19:06,290 --> 00:19:10,020
a couple of weeks before shipping them,
and then ship them off to consumers.

309
00:19:11,550 --> 00:19:15,330
So the dynamics of this are still very
unfavorable to the small miner who wants

310
00:19:15,330 --> 00:19:17,820
to go online, order an ASIC,
and start making money.

311
00:19:17,820 --> 00:19:23,600
And in fact, in almost all cases, people
who have placed orders for mining hardware

312
00:19:23,600 --> 00:19:26,550
should have lost money based on the
calculation that they made at the time.

313
00:19:28,070 --> 00:19:31,140
Except for one thing,
which is that the price of BitCoin

314
00:19:32,540 --> 00:19:35,650
has been rising for
most of the history of BitCoin.

315
00:19:35,650 --> 00:19:39,760
It has leveled off a lot in
the last six months or so.

316
00:19:39,760 --> 00:19:44,117
But during the period when prices were
rising, the rising prices often bailed out

317
00:19:44,117 --> 00:19:47,543
miners who would have lost money
if prices had stayed constant.

318
00:19:49,725 --> 00:19:53,266
So in effect buying BitCoin ASICs
has been an expensive and

319
00:19:53,266 --> 00:19:58,250
convoluted way to simply bet that
the price of BitCoin would rise.

320
00:19:58,250 --> 00:20:01,200
And a lot of miners even though
they've made money mining BitCoins

321
00:20:01,200 --> 00:20:04,580
would have been better off if they had
just taken the money that they were going

322
00:20:04,580 --> 00:20:08,700
to spend on mining equipment
invested it in BitCoins,

323
00:20:08,700 --> 00:20:12,270
held them while they appreciated in value,
and then sold the BitCoins at the end.

324
00:20:15,020 --> 00:20:17,670
And now we're firmly in the era
of professional mining.

325
00:20:19,080 --> 00:20:21,020
So the details there
are often pretty scant,

326
00:20:21,020 --> 00:20:25,830
because companies doing this don't want to
share exactly what their setup is.

327
00:20:25,830 --> 00:20:28,830
But it is known that there are some
professional mining centers popping up

328
00:20:28,830 --> 00:20:30,750
around the world now.

329
00:20:30,750 --> 00:20:32,970
And here's just one picture
that's been made available,

330
00:20:32,970 --> 00:20:36,380
one that came online in the last couple
of months in the Republic of Georgia.

331
00:20:38,760 --> 00:20:42,770
So if you want to open a professional
BitCoin mining center,

332
00:20:42,770 --> 00:20:44,000
where should you go?

333
00:20:44,000 --> 00:20:45,760
You basically need three things.

334
00:20:45,760 --> 00:20:47,840
You need cheap electricity.

335
00:20:47,840 --> 00:20:50,050
You need good network connectivity so

336
00:20:50,050 --> 00:20:53,410
that you can hear about new boxes
they're announced and not miss out.

337
00:20:54,730 --> 00:20:59,096
Ideally, you like a cool climate so that
you don't have to pay too much in your

338
00:20:59,096 --> 00:21:01,798
cooling bills to cool
all this equipment down.

339
00:21:01,798 --> 00:21:05,790
In addition to Georgia, places like
Iceland have been popular destinations for

340
00:21:05,790 --> 00:21:08,909
people to try to [COUGH] start
their BitCoin mining data center.

341
00:21:12,540 --> 00:21:16,010
So if we zoom out a little bit, and
we think about the evolution of mining,

342
00:21:16,010 --> 00:21:19,590
we can see really interesting
parallels between Bitcoin mining and

343
00:21:19,590 --> 00:21:23,070
gold mining, or
really any other kind of mining, but

344
00:21:23,070 --> 00:21:27,350
especially gold mining because it's led
to the same kind of gold rush mentality,

345
00:21:27,350 --> 00:21:32,082
when initially a lot of young, amateur
folks wanted to get into the business.

346
00:21:32,082 --> 00:21:37,370
So, whereas with Bitcoin mining,
we've seen this slow evolution from CPUs,

347
00:21:37,370 --> 00:21:42,340
to GPUs, to FPGAs, to now ASICs,
with gold mining we saw the evolution

348
00:21:42,340 --> 00:21:47,000
form individual people with a gold pan, to
maybe a small team of people with a sluice

349
00:21:47,000 --> 00:21:51,750
box, to placer mining which
was a big group of people

350
00:21:51,750 --> 00:21:56,080
blowing away hillsides with water,
to modern gold mining

351
00:21:56,080 --> 00:22:00,730
which is a giant open pit extracting tons
and tons of raw materials from the Earth.

352
00:22:02,600 --> 00:22:03,800
And in both cases,

353
00:22:03,800 --> 00:22:08,510
the friendliness to small people trying to
jump into this has gone down, and there's

354
00:22:08,510 --> 00:22:12,030
been a consolidation with large companies
owning most of the action over time.

355
00:22:15,560 --> 00:22:16,740
So a couple of questions for

356
00:22:16,740 --> 00:22:21,300
the future are, are small miners
out of BitCoin mining forever?

357
00:22:21,300 --> 00:22:23,820
Is there any way to make it as
a small miner in this game?

358
00:22:26,780 --> 00:22:29,320
And does that violate
the original spirit of BitCoin?

359
00:22:29,320 --> 00:22:33,240
Does the existence of these ASICs and
these large mining centers go against

360
00:22:33,240 --> 00:22:36,830
the original vision of Satoshi Nakamoto,
which was to have

361
00:22:36,830 --> 00:22:40,500
every individual in the network being
a miner, running on their own computer?

362
00:22:43,090 --> 00:22:47,270
So some people who think that this has
been a violation of the original vision

363
00:22:47,270 --> 00:22:50,500
wonder wouldn't it be better off
if there were no mining ASICs,

364
00:22:50,500 --> 00:22:55,560
if the only way to mine BitCoin was using
your CPU like in the good old days.

365
00:22:58,050 --> 00:23:00,620
Well we're going to have
a lecture later on in this series,

366
00:23:00,620 --> 00:23:04,320
which I'll point forward to
a number of times in this lecture,

367
00:23:04,320 --> 00:23:08,110
when we look at alternative formulations
of mining that might be possible.

368
00:23:08,110 --> 00:23:11,195
So I won't say anything more about
how we could design mining to be less

369
00:23:11,195 --> 00:23:12,503
friendly for ASICs here, but

370
00:23:12,503 --> 00:23:16,131
that will be a topic that will come up in
the future that will be quite interesting.

