-
Notifications
You must be signed in to change notification settings - Fork 1
/
Copy pathindex.html
412 lines (317 loc) · 20.1 KB
/
index.html
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
97
98
99
100
101
102
103
104
105
106
107
108
109
110
111
112
113
114
115
116
117
118
119
120
121
122
123
124
125
126
127
128
129
130
131
132
133
134
135
136
137
138
139
140
141
142
143
144
145
146
147
148
149
150
151
152
153
154
155
156
157
158
159
160
161
162
163
164
165
166
167
168
169
170
171
172
173
174
175
176
177
178
179
180
181
182
183
184
185
186
187
188
189
190
191
192
193
194
195
196
197
198
199
200
201
202
203
204
205
206
207
208
209
210
211
212
213
214
215
216
217
218
219
220
221
222
223
224
225
226
227
228
229
230
231
232
233
234
235
236
237
238
239
240
241
242
243
244
245
246
247
248
249
250
251
252
253
254
255
256
257
258
259
260
261
262
263
264
265
266
267
268
269
270
271
272
273
274
275
276
277
278
279
280
281
282
283
284
285
286
287
288
289
290
291
292
293
294
295
296
297
298
299
300
301
302
303
304
305
306
307
308
309
310
311
312
313
314
315
316
317
318
319
320
321
322
323
324
325
326
327
328
329
330
331
332
333
334
335
336
337
338
339
340
341
342
343
344
345
346
347
348
349
350
351
352
353
354
355
356
357
358
359
360
361
362
363
364
365
366
367
368
369
370
371
372
373
374
375
376
377
378
379
380
381
382
383
384
385
386
387
388
389
390
391
392
393
394
395
396
397
398
399
400
401
402
403
404
405
406
407
408
409
410
411
412
<!doctype html>
<html>
<head>
<meta charset="utf-8">
<meta name="viewport" content="width=device-width, initial-scale=1.0, maximum-scale=1.0, user-scalable=no">
<title>Teach Bitcoin Overview</title>
<link rel="stylesheet" href="css/reveal.css">
<link rel="stylesheet" href="css/theme/simple.css">
<!-- Theme override for teachbitcoin -->
<link rel="stylesheet" href="css/teachbitcoin.css">
<!-- Google Fonts -->
<link href="https://fonts.googleapis.com/css?family=Open+Sans:250,250,400,400,700i,700" rel="stylesheet">
</head>
<body>
<div class="reveal">
<div class="slides">
<!-- Title Page -->
<section class ="box">
<img src="images/index/background_image.jpg" class = "image" style = "z-index: -1;">
<div style = "margin-left:50px">
<div style = "width: 100%; overflow: hidden; font-size:70px; font-weight:700;
margin-top:410px;">
<span style = "float:left;">TeachBitcoin</span>
<span style = "float:left; font-weight:300;">.github.io</span>
</div>
<div style = "width:100%; overflow: hidden;font-size: 47px; font-weight:300;
margin-top: 15px">
<span style ="float:left;">Spread the Knowledge of Bitcoin</span>
<br>
<span style ="float:left;">with the Versatility of Libbitcoin</span>
</div>
<div style = "width: 100%; overflow: hidden;font-size:30px;font-weight:600;
font-style:italic; margin-top: 40px">
<a href="index.html#/1" class = "orange_link" style="float:left;"
>See training chapters on following pages</a>
</div>
</div>
</section>
<!-- End of Title Page -->
<!-- Overview Page 1 -->
<section class ="box">
<!-- EC Math Section -->
<div style= "width:100%; margin: auto; display: flex; justify-content: space-between;">
<div style = "width: 65%; font-size: 20px; text-align: left;">
<span style = "font-size: 25px; font-weight:700">Elliptic Curve Math</span>
<div style="width: 80%; margin: 5px 0 0 0;">
This chapter covers prime fields, elliptic curves operations over real numbers and prime fields.
These are the basic mathematical concepts that ECDSA signing is based on.
</div>
</div>
<div style = "width: 35%; font-size: 20px; text-align: left;">
<a style = "font-weight: 700;" href="ec_math.html" target="_blank" class ="orange_link">Chapter Slides</a>
<br><a style = "font-weight: 700;" href="https://github.com/teachbitcoin/code-demos/tree/master/00_ec_math" target="_blank" class ="orange_link">Chapter Code Repository</a>
</div>
</div>
<!-- End of EC Math Section -->
<hr style = "height:3px; border: 0; height: 0px; border-top: 2px solid rgba(0, 0, 0, 0.1);
border-bottom: 1px solid rgba(255, 255, 255, 0.3); margin: 12px 0 12px 0; padding:0px">
<!-- DER Signatures Section -->
<div style= "width:100%; margin: auto; display: flex; justify-content: space-between;">
<div style = "width: 65%; font-size: 20px; text-align: left;">
<span style = "font-size: 25px; font-weight:700">ECDSA</span>
<div style="width: 80%; margin: 5px 0 0 0;">
<span>Bitcoin signatures use the Elliptic Curve Digital Signing Algorithm to secure unspent outputs and are encoded in the DER serialisation format.</span>
</div>
</div>
<div style = "width: 35%; font-size: 20px; text-align: left;">
<a style = "font-weight: 700;" href="ecdsa.html" target="_blank" class ="orange_link">Chapter Slides</a>
</div>
</div>
<!-- End of DER Signatures Section -->
<hr style = "height:3px; border: 0; height: 0px; border-top: 2px solid rgba(0, 0, 0, 0.1);
border-bottom: 1px solid rgba(255, 255, 255, 0.3); margin: 12px 0 12px 0; padding:0px">
<!-- Addresses & HD Wallets -->
<div style= "width:100%; margin: auto; display: flex; justify-content: space-between;">
<div style = "width: 65%; font-size: 20px; text-align: left;">
<span style = "font-size: 25px; font-weight:700">Addresses and HD Wallets</span>
<div style="width: 80%; margin: 5px 0 0 0;">
Bitcoin addresses encode the information required for a wallet to spend to the correct key.
Hierarchical Deterministic wallets use a child-key derivation algorithm to safely derive new addresses from the same root.
</div>
</div>
<div style = "width: 35%; font-size: 20px; text-align: left;">
<a style = "font-weight: 700;" href="wallets.html" target="_blank" class ="orange_link">Chapter Slides</a>
<br><a style = "font-weight: 700;" href="https://github.com/teachbitcoin/code-demos/tree/master/02_addresses_hd_wallets" target="_blank" class ="orange_link">Chapter Code Repository</a>
</div>
</div>
<!-- End of Addresses & HD Wallets -->
<hr style = "height:3px; border: 0; height: 0px; border-top: 2px solid rgba(0, 0, 0, 0.1);
border-bottom: 1px solid rgba(255, 255, 255, 0.3); margin: 12px 0 12px 0; padding:0px">
<!-- Introduction to Transactions -->
<div style= "width:100%; margin: auto; display: flex; justify-content: space-between;">
<div style = "width: 65%; font-size: 20px; text-align: left;">
<span style = "font-size: 25px; font-weight:700">Introduction to Transactions </span>
<div style="width: 80%; margin: 5px 0 0 0;">
An introduction to building and signing your first transaction which spends to Pay-to-Public-Key-Hash outputs.
</div>
</div>
<div style = "width: 35%; font-size: 20px; text-align: left;">
<a style = "font-weight: 700;" href="transaction_build.html" target="_blank" class ="orange_link">Chapter Slides</a>
<br><a style = "font-weight: 700;" href="https://github.com/teachbitcoin/code-demos/tree/master/03_transactions_introduction" target="_blank" class ="orange_link">Chapter Code Repository</a>
</div>
</div>
<!-- End of Introduction to Transactions -->
<hr style = "height:3px; border: 0; height: 0px; border-top: 2px solid rgba(0, 0, 0, 0.1);
border-bottom: 1px solid rgba(255, 255, 255, 0.3); margin: 12px 0 12px 0; padding:0px">
<!-- Sighash Modifiers -->
<div style= "width:100%; margin: auto; display: flex; justify-content: space-between;">
<div style = "width: 65%; font-size: 20px; text-align: left;">
<span style = "font-size: 25px; font-weight:700">Signature Hash Modifiers</span>
<div style="width: 80%; margin: 5px 0 0 0;">
Signatures can commit to specific input and outputs, allowing other parts of the transaction to be modified by other parties.
</div>
</div>
<div style = "width: 35%; font-size: 20px; text-align: left;">
<a style = "font-weight: 700;" href="transaction_sighash.html" target="_blank" class ="orange_link">Chapter Slides</a>
<br><a style = "font-weight: 700;" href="https://github.com/teachbitcoin/code-demos/tree/master/04_transactions_sighash_modifiers" target="_blank" class ="orange_link">Chapter Code Repository</a>
</div>
</div>
<!-- End of Sighash Modifiers -->
<hr style = "height:3px; border: 0; height: 0px; border-top: 2px solid rgba(0, 0, 0, 0.1);
border-bottom: 1px solid rgba(255, 255, 255, 0.3); margin: 12px 0 12px 0; padding:0px">
<!-- Link to next page -->
<div style= "width:100%; margin: auto; display: flex; justify-content: space-between;">
<span style="font-size:22px; font-weight:700;"><a href="index.html#/2" class ="orange_link">Next Chapters >></a></span>
</div>
</section>
<!-- End of Overview Page 1 -->
<!-- Overview Page 2 -->
<section class ="box">
<!-- Multisig Section -->
<div style= "width:100%; margin: auto; display: flex; justify-content: space-between;">
<div style = "width: 65%; font-size: 20px; text-align: left;">
<span style = "font-size: 25px; font-weight:700">Multisignature Scripts</span>
<div style="width: 80%; margin: 5px 0 0 0;">
An output script which can be spent by n-of-m signatures.
</div>
</div>
<div style = "width: 35%; font-size: 20px; text-align: left;">
<a style = "font-weight: 700;" href="transaction_multisig.html" target="_blank" class ="orange_link">Chapter Slides</a>
<br><a style = "font-weight: 700;" href="https://github.com/teachbitcoin/code-demos/tree/master/05_transactions_p2sh_multisig" target="_blank" class ="orange_link">Chapter Code Repository</a>
</div>
</div>
<!-- End of Multisig Section -->
<hr style = "height:3px; border: 0; height: 0px; border-top: 2px solid rgba(0, 0, 0, 0.1);
border-bottom: 1px solid rgba(255, 255, 255, 0.3); margin: 12px 0 12px 0; padding:0px">
<!-- P2SH Section -->
<div style= "width:100%; margin: auto; display: flex; justify-content: space-between;">
<div style = "width: 65%; font-size: 20px; text-align: left;">
<span style = "font-size: 25px; font-weight:700">Pay-to-Script-Hash Scripts</span>
<div style="width: 80%; margin: 5px 0 0 0;">
P2SH output scripts commit to a hashed locking script.
The locking script preimage must be provided together with the unlocking script for such a P2SH output to be spent.
</div>
</div>
<div style = "width: 35%; font-size: 20px; text-align: left;">
<a style = "font-weight: 700;" href="transaction_p2sh.html" target="_blank" class ="orange_link">Chapter Slides</a>
<br><a style = "font-weight: 700;" href="https://github.com/teachbitcoin/code-demos/tree/master/05_transactions_p2sh_multisig" target="_blank" class ="orange_link">Chapter Code Repository</a>
</div>
</div>
<!-- End of P2SH Section -->
<hr style = "height:3px; border: 0; height: 0px; border-top: 2px solid rgba(0, 0, 0, 0.1);
border-bottom: 1px solid rgba(255, 255, 255, 0.3); margin: 12px 0 12px 0; padding:0px">
<!-- Transaction Timelocks -->
<div style= "width:100%; margin: auto; display: flex; justify-content: space-between;">
<div style = "width: 65%; font-size: 20px; text-align: left;">
<span style = "font-size: 25px; font-weight:700">Transaction Timelocks</span>
<div style="width: 80%; margin: 5px 0 0 0;">
Absolute and relative timelocks prevent transactions from being broadcast before a certain time or blockheight.
A timelock may be commited to by the transaction signature, or can be enforced by the previous output script.
</div>
</div>
<div style = "width: 35%; font-size: 20px; text-align: left;">
<a style = "font-weight: 700;" href="transaction_timelocks.html" target="_blank" class ="orange_link">Chapter Slides</a>
<br><a style = "font-weight: 700;" href="https://github.com/teachbitcoin/code-demos/tree/master/06_transactions_timelocks" target="_blank" class ="orange_link">Chapter Code Repository</a>
</div>
</div>
<!-- Transaction Timelocks -->
<hr style = "height:3px; border: 0; height: 0px; border-top: 2px solid rgba(0, 0, 0, 0.1);
border-bottom: 1px solid rgba(255, 255, 255, 0.3); margin: 12px 0 12px 0; padding:0px">
<!-- Witness Transactions -->
<div style= "width:100%; margin: auto; display: flex; justify-content: space-between;">
<div style = "width: 65%; font-size: 20px; text-align: left;">
<span style = "font-size: 25px; font-weight:700">Witness Transactions </span>
<div style="width: 80%; margin: 5px 0 0 0;">
Pay-to-witness output scripts are be spent with transactions with valid witnesses.
Wallets which do not support native P2W transactions may send to outputs which wrap P2W scripts in P2SH outputs.
</div>
</div>
<div style = "width: 35%; font-size: 20px; text-align: left;">
<a style = "font-weight: 700;" href="transaction_witness.html" target="_blank" class ="orange_link">Chapter Slides</a>
<br><a style = "font-weight: 700;" href="https://github.com/teachbitcoin/code-demos/tree/master/08_transactions_witness" target="_blank" class ="orange_link">Chapter Code Repository</a>
</div>
</div>
<!-- End of Witness Transactions -->
<hr style = "height:3px; border: 0; height: 0px; border-top: 2px solid rgba(0, 0, 0, 0.1);
border-bottom: 1px solid rgba(255, 255, 255, 0.3); margin: 12px 0 12px 0; padding:0px">
<!-- Block Parsing -->
<div style= "width:100%; margin: auto; display: flex; justify-content: space-between;">
<div style = "width: 65%; font-size: 20px; text-align: left;">
<span style = "font-size: 25px; font-weight:700">Block Chain</span>
<div style="width: 80%; margin: 5px 0 0 0;">
A closer lock at blocks and block headers, and their validation by nodes.
</div>
</div>
<div style = "width: 35%; font-size: 20px; text-align: left;">
<a style = "font-weight: 700;" href="blockchain.html" target="_blank" class ="orange_link">Chapter Slides</a>
<br><a style = "font-weight: 700;" href="https://github.com/teachbitcoin/code-demos/tree/master/09_block_parsing" target="_blank" class ="orange_link">Chapter Code Repository</a>
</div>
</div>
<!-- End of Block Parsing -->
<hr style = "height:3px; border: 0; height: 0px; border-top: 2px solid rgba(0, 0, 0, 0.1);
border-bottom: 1px solid rgba(255, 255, 255, 0.3); margin: 12px 0 12px 0; padding:0px">
<!-- Link to next page -->
<div style= "width:100%; margin: auto; display: flex; justify-content: space-between;">
<span style="font-size:22px; font-weight:700;"><a href="index.html#/3" class ="orange_link">Next Chapters >></a></span>
</div>
</section>
<!-- End of Overview Page 2 -->
<!-- Overview Page 3 -->
<section class ="box">
<!-- P2P Network -->
<div style= "width:100%; margin: auto; display: flex; justify-content: space-between;">
<div style = "width: 65%; font-size: 20px; text-align: left;">
<span style = "font-size: 25px; font-weight:700">P2P Network</span>
<div style="width: 80%; margin: 5px 0 0 0;">
An introduction to the P2P messaging protocol between Bitcoin nodes on the network.
</div>
</div>
<div style = "width: 35%; font-size: 20px; text-align: left;">
<a style = "font-weight: 700;" href="p2p.html" target="_blank" class ="orange_link">Chapter Slides</a>
<br><a style = "font-weight: 700;" href="https://github.com/teachbitcoin/code-demos/tree/master/10_p2p" target="_blank" class ="orange_link">Chapter Code Repository</a>
</div>
</div>
<!-- End of P2P Network -->
<hr style = "height:3px; border: 0; height: 0px; border-top: 2px solid rgba(0, 0, 0, 0.1);
border-bottom: 1px solid rgba(255, 255, 255, 0.3); margin: 12px 0 12px 0; padding:0px">
<!-- SPV Section -->
<div style= "width:100%; margin: auto; display: flex; justify-content: space-between;">
<div style = "width: 65%; font-size: 20px; text-align: left;">
<span style = "font-size: 25px; font-weight:700">Simplified Payment Verification</span>
<div style="width: 80%; margin: 5px 0 0 0;">
SPV clients follow the longest header chain with the most proof-of-work.
They rely on specific transaction updates from full Bitcoin nodes,
and perform merkle proofs to validate confirmation of these transactions.
</div>
</div>
<div style = "width: 35%; font-size: 20px; text-align: left;">
<a style = "font-weight: 700;" href="spv.html" target="_blank" class ="orange_link">Chapter Slides</a>
<br><a style = "font-weight: 700;" href="https://github.com/teachbitcoin/code-demos/tree/master/11_simplified_payment_verification" target="_blank" class ="orange_link">Chapter Code Repository</a>
</div>
</div>
<!-- End of SPV Section -->
<hr style = "height:3px; border: 0; height: 0px; border-top: 2px solid rgba(0, 0, 0, 0.1);
border-bottom: 1px solid rgba(255, 255, 255, 0.3); margin: 12px 0 12px 0; padding:0px">
<!-- Lightning -->
<div style= "width:100%; margin: auto; display: flex; justify-content: space-between;">
<div style = "width: 65%; font-size: 20px; text-align: left;">
<span style = "font-size: 25px; font-weight:700">Payment Channels and Lightning Network</span>
<div style="width: 80%; margin: 5px 0 0 0;">
We demonstrate a basic payment channel between two nodes which is enabled by revocable output scripts (RSMC's).
Payment routing across multiple payment channels is made possible by hashed time-locked contracts (HTLC's).
</div>
</div>
<div style = "width: 35%; font-size: 20px; text-align: left;">
<a style = "font-weight: 700;" href="payment_channels.html" target="_blank" class ="orange_link">Chapter Slides</a>
<br><a style = "font-weight: 700;" href="https://github.com/teachbitcoin/code-demos/tree/master/12_payment_channels" target="_blank" class ="orange_link">Chapter Code Repository</a>
</div>
</div>
<!-- End of Lightning -->
<hr style = "height:3px; border: 0; height: 0px; border-top: 2px solid rgba(0, 0, 0, 0.1);
border-bottom: 1px solid rgba(255, 255, 255, 0.3); margin: 12px 0 12px 0; padding:0px">
</section>
<!-- End of Overview Page 3 -->
</div><!-- END: Lecture Materials Div -->
</div><!-- END: Reveal Div -->
<script src="lib/js/head.min.js"></script>
<script src="js/reveal.js"></script>
<script>
// More info about config & dependencies:
// - https://github.com/hakimel/reveal.js#configuration
// - https://github.com/hakimel/reveal.js#dependencies
Reveal.initialize({
dependencies: [
{ src: 'plugin/markdown/marked.js' },
{ src: 'plugin/markdown/markdown.js' },
{ src: 'plugin/notes/notes.js', async: true },
{ src: 'plugin/highlight/highlight.js', async: true, callback: function() { hljs.initHighlightingOnLoad(); } }
// { src: 'plugin/math/math.js', async: true }
],
// math: {
// mathjax: 'https://cdnjs.cloudflare.com/ajax/libs/mathjax/2.7.0/MathJax.js',
// config: 'TeX-AMS_HTML-full' // See http://docs.mathjax.org/en/latest/config-files.html
// },
previewLinks: false,
// Push each slide change to the browser history
history: true,
// Enable keyboard shortcuts for navigation
keyboard: true,
// Enables touch navigation on devices with touch input
overview: false,
touch: false,
// The "normal" size of the presentation, aspect ratio will be preserved
// when the presentation is scaled to fit different resolutions. Can be
// specified using percentage units.
width: 1366,
height: 768,
// Factor of the display size that should remain empty around the content
margin: 0.05,
// Bounds for smallest/largest possible scale to apply to content
minScale: 0.2,
maxScale: 1.5
});
Reveal.configure({ slideNumber: false });
</script>
</body>
</html>