\def\hs{\hspace{0.4 cm}} \documentclass[aspectratio=169,usenames,dvipsnames]{beamer} \usetheme{lined} \usecolortheme{beaver} \setbeamertemplate{footline}[default] \beamertemplatenavigationsymbolsempty \title{ \makebox[0.525\textwidth][s]{\huge\textbf{M I N I S C R I P T}}\\ \makebox[0.525\textwidth][s]{Custody. Computable. Composeable.} } \author{ Andrew Poelstra\\ \small Director of Research, Blockstream } \date{November 6, 2021} \usepackage{colortbl} \usepackage{multirow} \usepackage{tikz} \tikzset{ every node/.style = { shape=rectangle, rounded corners, draw, top color = white, label distance=-0.5ex, }, comb/.style = { bottom color = blue!20 }, term/.style = { bottom color = red!50 }, F/.style = { label = {below:\tiny F} }, Q/.style = { label = {below:\tiny Q} }, B/.style = { label = {below:\tiny B} }, V/.style = { label = {below:\tiny V} }, W/.style = { label = {below:\tiny W} }, } \newcommand{\outpoint}[3]{ \framebox{ \texttt{\hash{#1}#2\color{black!60}:#3} } } \newcommand{\txout}[3]{ \framebox{\parbox{10em}{ #1 BTC\\ \texttt{\hash{#2}#3} }} } \newcommand{\hash}[9]{\texttt{\color{black!60}#1\color{black!55}#2\color{black!50}#3\color{black!45}#4\color{black!35}#5\color{black!25}#6\color{black!15}#7\color{black!10}#8\color{black!5}#9}} \newcommand{\witstack}[4]{ \framebox{\parbox{10em}{ \texttt{\hash{#1}#2} }} \framebox{\parbox[t][8em]{10em}{\texttt{ ~\\ \alert{#3}\\ #4 }}} } \setlength{\fboxsep}{1ex} \begin{document} \frame{ \maketitle } \frame { \frametitle{Issues with Bitcoin Script} \begin{itemize} \item Difficult to argue \alert{correctness} (or other properties) \item Difficult to argue \alert{security} (or malleability freeness) \item Difficult to estimate satisfaction cost \item Difficult to determine which signatures are needed \item Difficult to assemble a witness, even given signatures \end{itemize} } \frame { \frametitle{Issues with Bitcoin Script} \begin{itemize} \item Not \alert{interoperable} between wallet implementations \item Not \alert{composeable} within wallets \end{itemize} } \frame { \frametitle{Miniscript} \begin{itemize} \item Idea: create script templates for signature checks, hash-locks and time-locks \item Idea: create \alert{composable} script templates for AND, OR and thresholds \end{itemize} } \frame { \frametitle{Miniscript} % todo figure out this \indent black magic \begin{minipage}[c]{0.5\textwidth} \texttt{2 pk$_1$ pk$_2$ pk$_3$ 3 CHECKMULTISIG\\ \alert{IFDUP NOTIF}\\ \indent ~~~~pk\textsubscript{emergency} CHECKSIGVERIFY\\ \indent ~~~~1000 CSV\\ \alert{ENDIF}} \end{minipage} \begin{minipage}[c]{0.45\textwidth} \begin{tikzpicture}[ level 1/.style = {sibling distance=8em}, level 2/.style = {sibling distance=8em}, ] \node[comb,B] {OR\textsubscript{c}} child { node[term,B] {thresh\_m(2,pk$_1$,pk$_2$,pk$_3$)} } child { node[comb,B] {AND\textsubscript{v}} child { node[term,V] {vc:pk\textsubscript{emergency}} } child { node[term,B] {after(1000)} } }; \end{tikzpicture} \end{minipage} } \frame { \frametitle{Miniscript} % todo figure out this \indent black magic \begin{minipage}[c]{0.5\textwidth} \texttt{2 pk$_1$ pk$_2$ pk$_3$ 3 CHECKMULTISIG\\ \alert{IFDUP NOTIF}\\ \indent ~~~~pk\textsubscript{emergency} CHECKSIGVERIFY\\ \indent ~~~~1000 CSV\\ \alert{ENDIF}} \end{minipage} \begin{minipage}[c]{0.45\textwidth} \begin{tikzpicture}[ level 1/.style = {sibling distance=8em}, level 2/.style = {sibling distance=8em}, ] \node[comb] {OR} child { node[term] {thresh\_m(2,pk$_1$,pk$_2$,pk$_3$)} } child { node[comb] {AND} child { node[term] {pk\textsubscript{emergency}} } child { node[term] {after(1000)} } }; \end{tikzpicture} \end{minipage} } \frame { \frametitle{Script and Miniscript} \begin{itemize} \item In a technical sense, Miniscript is a subset of Script. \item In a non-technical sense, Miniscript works in a \alert{different paradigm} than Script \item Miniscript describes \alert{conditions to satisfy}, not \alert{instructions to execute} \end{itemize} } \frame { \frametitle{Miniscript} % todo figure out this \indent black magic \begin{minipage}[c]{0.5\textwidth} [some totally different language] \end{minipage} \begin{minipage}[c]{0.45\textwidth} \begin{tikzpicture}[ level 1/.style = {sibling distance=8em}, level 2/.style = {sibling distance=8em}, ] \node[comb] {OR} child { node[term] {thresh\_m(2,pk$_1$,pk$_2$,pk$_3$)} } child { node[comb] {AND} child { node[term] {pk\textsubscript{emergency}} } child { node[term] {after(1000)} } }; \end{tikzpicture} \end{minipage} } \frame { \frametitle{Future Work} \begin{itemize} \item Further Integration with PSBT \item Library development (\texttt{rust-bitcoin}, \texttt{bdk}) \item Taproot support! \item Connections to other languages (Script+\texttt{CTV}, Simplicity) \end{itemize} } %% end \frame { \frametitle{Thank You} \begin{center} Andrew Poelstra\\ \texttt{miniscript@wpsoftware.net}\\~\\~\\ \texttt{\huge https://bitcoin.sipa.be/miniscript} \end{center} } \end{document}