
diff -r 4a0bff167159 -r 6d13b8da019e slides/slides08.tex
--- a/slides/slides08.tex	Fri Nov 06 08:51:53 2015 +0000
+++ b/slides/slides08.tex	Tue Nov 10 22:28:03 2015 +0000
@@ -2,6 +2,7 @@
 \usepackage{../slides}
 \usepackage{../graphics}
 \usepackage{../langs}
+\usepackage{../data}
 
 \usetikzlibrary{shapes}
 
@@ -38,7 +39,7 @@
 
   \normalsize
   \begin{center}
-  \begin{tabular}{ll}Ch
+  \begin{tabular}{ll}
   Email:  & christian.urban at kcl.ac.uk\\
   Office: & S1.27 (1st floor Strand Building)\\
   Slides: & KEATS (also homework is there)\\
@@ -49,49 +50,6 @@
 %%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%     
 
 %%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%
-\begin{frame}
-\frametitle{Interlock Protocol}
-
-invented by  Ron Rivest and Adi Shamir (198X?)
-
-\begin{center}
-\begin{tabular}{ll@{\hspace{2mm}}l}
-1. & $A \to B :$ & $K^{pub}_A$\smallskip\\
-2. & $B \to A :$ & $K^{pub}_B$\smallskip\\
-3. & & $\{A,m\}_{K^{pub}_B} \;\mapsto\; H_1,H_2$\\
-   & & $\{B,m'\}_{K^{pub}_A} \;\mapsto\; M_1,M_2$\\
-4. & $A \to B :$ & $H_1$\smallskip\\
-5. & $B \to A :$ & $\{H_1, M_1\}_{K^{pub}_A}$\smallskip\\
-6. & $A \to B :$ & $\{H_2, M_1\}_{K^{pub}_B}$\smallskip\\
-7. & $B \to A :$ & $M_2$
-\end{tabular}
-\end{center}
-
-\end{frame}
-%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%% 
-
-%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%
-\begin{frame}
-\frametitle{Car \& Transponder}
-
-\begin{enumerate}
-\item $C$ generates a random number $N$
-\item $C$ calculates $\{N\}_K \mapsto F,G$
-\item $C \to T$: $N, F$
-\item $T$ calculates $\{N\}_K \mapsto F',G'$
-\item $T$ checks that $F = F'$
-\item $T \to C$: $N, G'$
-\item $C$ checks that $G = G'$
-\end{enumerate}
-
-Does the car authenticate the transponder? Does the
-transponder authenticate the car?
-
-\end{frame}
-%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%% 
-
-
-%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%
 % student prticipation
 %\begin{frame}
 %\frametitle{Bitcoins}
@@ -117,7 +75,7 @@
   of bitcoins 
 \item can be stolen and also lost
 \item anonymous?\pause
-\item surely a ponzi scheme!
+\item surely a scam/ponzi scheme!
 \end{itemize}
 
 \begin{textblock}{7}(11.5,10)
@@ -141,9 +99,9 @@
 \end{itemize}
 and contains only the public-private key
 
-\item Bitcoins can be stolen and lost
+\item Bitcoins can be stolen or lost
 \item Mt.~Gox: hacked $\Rightarrow$ insolvent
-\item no form of dispute resolution (against current
+\item no form of dispute resolution\\ (against current
 consumer laws)
 \end{itemize}
 
@@ -151,7 +109,7 @@
 %%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%% 
 
 %%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%
-\begin{frame}
+\begin{frame}[c]
 \frametitle{Underlying Ideas}
 
 It establishing trust in a completely 
@@ -172,8 +130,8 @@
 %%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%% 
 
 %%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%
-\begin{frame}[t]
-\frametitle{Lets Start with Infocoins}
+\begin{frame}[c]
+\frametitle{Lets Start with ``Infocoins''}
 
 \begin{center}
 \bl{$\{\text{I, Alice, am giving Bob one infocoin.}\}_{K^{priv}_{Alice}}$}
@@ -217,7 +175,7 @@
 %%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%% 
 
 %%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%
-\begin{frame}[t]
+\begin{frame}[c]
 \frametitle{No Banks Please}
 
 With banks we could implement:
@@ -244,9 +202,9 @@
 \begin{itemize}
 \item make everybody the bank, everybody has the entire
       transaction history --- will be called
-      \alert{blockchain}\medskip
-\item Bob checks whether infocoin belongs to Alice and then
-      broadcasts the message to anybody else 
+      \alert{\bf blockchain}\medskip
+\item Bob checks whether the infocoin belongs to Alice and then
+      broadcasts the message to everybody else\\[-10mm]\mbox{}
 \end{itemize}
 
 \begin{center}
@@ -288,31 +246,25 @@
 %%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%% 
 
 %%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%
-\begin{frame}[t]
+\begin{frame}[squeeze]
 \frametitle{Double Spend Again}
 
-\begin{bubble}[10cm]\addtolength{\leftmargini}{5mm}
+\begin{bubble}[10cm]
 \begin{itemize}
 \item I , Alice, am giving Bob one infocoin, with serial
-      number 1234567.
+      number 1234567. 
 \item I, Alice, am giving \alt<2->{\alert{Alice}}{Charlie} 
       one infocoin with number 1234567.
 \end{itemize}
-\end{bubble}\bigskip
+\end{bubble}
 
 How should other people update their blockchain (public
-register)?\pause
-
+register)?\\[-10mm]\mbox{}\pause
 
 \begin{center}
-\includegraphics[scale=0.3]{../pics/bitcoindisagreement.png}
+\hspace{15mm}\includegraphics[scale=0.35]{../pics/bitcoindisagreement.png}
 \end{center}
 
-
-Once enough people have broadcast that message, everyone
-updates their block chain to show that infocoin 1234567 now
-belongs to Bob, and the transaction is complete.
-
 \end{frame}
 %%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%% 
 
@@ -324,7 +276,7 @@
 Once \alert{enough} people have broadcast that message, 
 everyone updates their block chain to show that infocoin 
 1234567 now belongs to Bob, and the transaction is accepted.
-\end{bubble}\bigskip\bigskip
+\end{bubble}\bigskip
 \pause
 
 \small
@@ -342,10 +294,9 @@
 \frametitle{!! Proof-of-Work !!}
 
 The idea is counterintuitive and involves a combination of two
-ideas:\bigskip
+ideas:
 
 \begin{bubble}[10cm]
-\addtolength{\leftmargini}{5mm}
 \begin{itemize}
 
 \item to (artificially) make it computationally costly for
@@ -353,7 +304,7 @@
 
 \item to reward them for trying to help validate transactions
 \end{itemize}
-\end{bubble}\pause\bigskip
+\end{bubble}\pause
 
 \small
 this is called mining: whoever validates a transaction will be awarded with
@@ -401,19 +352,60 @@
 \includegraphics[scale=0.37]{../pics/blockchainsolving.png}
 \end{center}
 
-%\begin{textblock}{7}(7,10)
-%10 mins
-%\end{textblock}
+\end{frame}
+%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%% 
+
+%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%
+\begin{frame}[t]
+\frametitle{Controlling the Hardness}
+
+\begin{itemize}
+\item every 210000 blocks the amount of bitcoins to be 
+  mined halves (``reward era'')
+\item every 2016 blocks the hardness is adjusted\\ (app 2 weeks)
+\end{itemize}
+
+\begin{center}
+\begin{tikzpicture}
+\begin{axis}[
+    xlabel={\footnotesize year},
+    ylabel={\footnotesize \% of total bitcoins},
+    ylabel style={yshift=0.0em},
+    enlargelimits=false,
+    xtick={2009,2011,...,2025},
+    xmin=2009,
+    xmax=2026,
+    ymax=105,
+    ymin=0,
+    ytick={0,20,...,100},
+    scaled ticks=false,
+    axis lines=left,
+    width=9cm,
+    height=6cm,
+    legend entries={\footnotesize plan,\footnotesize in reality 2\% ahead},  
+    legend pos=south east,
+    legend cell align=left,  
+    y tick label style={font=\footnotesize}, 
+    x tick label style={font=\footnotesize,/pgf/number format/1000 sep={}} 
+    ]
+\addplot
+  table {bitcoinestimate.data};
+\only<2>{\addplot[red] 
+  table {bitcoinactual.data};}
+\end{axis}
+\end{tikzpicture}
+\end{center}
 
 \end{frame}
 %%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%% 
 
+
 %%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%
 \begin{frame}[t]
 \frametitle{Order of Transactions}
 
 If we don’t have such an ordering at any given moment 
-then it may not be clear who owns which infocoins.
+then it may not be clear who owns which Bitcoins.
 
 \begin{center}
 \includegraphics[scale=0.38]{../pics/bitcoin_unconfirmed.png}
@@ -506,7 +498,7 @@
 %%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%% 
 
 %%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%
-\begin{frame}[t]
+\begin{frame}[c]
 \frametitle{Mining Pools}
 
 \begin{bubble}[10cm]
@@ -514,7 +506,7 @@
 to solve a block, so an individual’s chance of ever solving
 one before the rest of the network, which typically takes 10
 minutes, is negligibly low.
-\end{bubble}\bigskip\pause
+\end{bubble}\pause
 
 \small
 Many people join groups called mining pools that collectively
@@ -525,7 +517,7 @@
 network.\medskip
 
 \footnotesize
-BTC, the largest mining pool, has limited its members to 
+BTCC, the largest mining pool, has limited its members to 
 not solve more than 6 blocks in a row.
 
 \end{frame}
@@ -558,18 +550,18 @@
                  numbersep=3pt, 
                  xleftmargin=-6mm]{msg}
 
-\DOWNarrow{2}{3.5}{1.6}
-\LEFTarrow{3}{3.5}{3}
-\LEFTarrow{4}{4.7}{4}
-\LEFTarrow{4}{5.4}{4.8}
-\LEFTarrow{5}{5.4}{5.6}
-\LEFTarrow{6}{5}{6.4}
-\DOWNarrow{7}{6}{8.2}
-\LEFTarrow{8}{5}{9.7}
-\DOWNarrow{9}{7}{9.7}
-\DOWNarrow{9}{10}{9.7}
-\LEFTarrow{10}{9}{12}
-\DOWNarrow{11}{12.5}{12}
+\DOWNarrow{2}{3.5}{1.4}
+\LEFTarrow{3}{3.5}{2.8}
+\LEFTarrow{4}{4.7}{3.8}
+\LEFTarrow{4}{5.4}{4.6}
+\LEFTarrow{5}{5.4}{5.4}
+\LEFTarrow{6}{5.0}{6.2}
+\DOWNarrow{7}{6.0}{8.0}
+\LEFTarrow{8}{5.0}{9.5}
+\DOWNarrow{9}{7.0}{9.5}
+\DOWNarrow{9}{10.0}{9.5}
+\LEFTarrow{10}{9.0}{11.8}
+\DOWNarrow{11}{12.5}{11.9}
 
 
 \begin{textblock}{0}(7,3)%




