Skip to content

Commit 0a1574f

Browse files
committed
BIP 174 workflow graphics
1 parent cb426bf commit 0a1574f

7 files changed

+1712
-2
lines changed

bip-0174.mediawiki

+2-2
Original file line numberDiff line numberDiff line change
@@ -360,11 +360,11 @@ able to be unserialized by an unserializer for the PSBT format.
360360

361361
===Manual CoinJoin Workflow===
362362

363-
<img src="bip-0174/coinjoin-workflow.png" align="middle"></img>
363+
<img src="bip-0174/coinjoin-workflow.svg" align="middle"></img>
364364

365365
===2-of-3 Multisig Workflow===
366366

367-
<img src="bip-0174/multisig-workflow.png" align="middle"></img>
367+
<img src="bip-0174/multisig-workflow.svg" align="middle"></img>
368368

369369
==Test Vectors==
370370

bip-0174/coinjoin-workflow.png

-44.9 KB
Binary file not shown.

bip-0174/coinjoin-workflow.svg

+655
Loading

bip-0174/coinjoin-workflow.tex

+59
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,59 @@
1+
% using the PGF/TikZ package with pdflatex
2+
\documentclass{standalone}
3+
\usepackage[utf8]{inputenc}
4+
\usepackage[T1]{fontenc}
5+
%~ \usepackage[english]{babel}
6+
\usepackage[none]{hyphenat}% prevent hyphenation
7+
\usepackage{lmodern}
8+
\renewcommand*\familydefault{\sfdefault}
9+
\usepackage{tikz}
10+
\usetikzlibrary{shapes,arrows}
11+
\tikzset{>=latex}
12+
\begin{document}
13+
% \sffamily{}
14+
\tikzstyle{block_center} =
15+
[rectangle, draw=black, thick, fill=white,
16+
text width=12em, text centered,
17+
minimum height=5em]
18+
\tikzstyle{block_rounded} = [rectangle,
19+
draw=black, thick, fill=white,
20+
text width=8em, text centered,
21+
minimum height=5em,
22+
rounded corners]
23+
\begin{tikzpicture}[auto]
24+
% outlining the flowchart on a grid
25+
\matrix[column sep=3ex,row sep=2ex]{
26+
\node [block_center] (0alice1)
27+
{Alice creates a PSBT with only her inputs
28+
with UTXOs filled in.\\Sends it to Bob.};
29+
&
30+
\node [block_center] (1bob1)
31+
{Bob adds his inputs and fills in his
32+
UTXOs.};
33+
&
34+
\node [block_center] (2carol1)
35+
{Carol adds her inputs, fills in her
36+
UTXOs, adds signatures, and finalizes her inputs.};
37+
\\
38+
\node [block_rounded] (5alice2)
39+
{Alice extracts the network serialized
40+
transaction and broadcasts it.};
41+
&
42+
\node [block_center] (4alice1)
43+
{Alice signs the transaction, adds her
44+
signatures, and finalizes her inputs.};
45+
&
46+
\node [block_center] (3bob2)
47+
{Bob signs the transaction, adds his
48+
signatures, and finalizes his inputs.};
49+
\\
50+
};% end matrix
51+
% connecting nodes with paths
52+
\draw[line width = 1pt, ->]
53+
(0alice1) edge (1bob1)
54+
(1bob1) edge (2carol1)
55+
(2carol1) edge (3bob2)
56+
(3bob2) edge (4alice1)
57+
(4alice1) edge (5alice2);
58+
\end{tikzpicture}
59+
\end{document}

bip-0174/multisig-workflow.png

-74.2 KB
Binary file not shown.

bip-0174/multisig-workflow.svg

+894
Loading

bip-0174/multisig-workflow.tex

+102
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,102 @@
1+
% using the PGF/TikZ package with pdflatex
2+
\documentclass{standalone}
3+
\usepackage[utf8]{inputenc}
4+
\usepackage[T1]{fontenc}
5+
%~ \usepackage[english]{babel}
6+
\usepackage[none]{hyphenat}% prevent hyphenation
7+
\usepackage{lmodern}
8+
\renewcommand*\familydefault{\sfdefault}
9+
\usepackage{tikz}
10+
\usetikzlibrary{shapes,arrows}
11+
\tikzset{>=latex}
12+
%\pgfdeclarelayer{bg} % declare background layer
13+
%\pgfsetlayers{bg,main} % set order of layers
14+
\newcommand{\h}{\hspace{1em}}
15+
\begin{document}
16+
% \sffamily{}
17+
\tikzstyle{block_center} =
18+
[rectangle, draw=black, thick, fill=white,
19+
text width=10.5em, text centered,
20+
minimum height=1em]
21+
\tikzstyle{block_rounded} = [rectangle,
22+
draw=black, thick, fill=white,
23+
text width=8em, text centered,
24+
minimum height=5em,
25+
rounded corners]
26+
\begin{tikzpicture}[auto]
27+
% outlining the flowchart on a grid
28+
\matrix[column sep=3ex,row sep=2.5ex]{
29+
\h &
30+
\node [block_center] (R1)
31+
{Alice, Bob and Carol
32+
wish to spend from a
33+
2-of-3 Multisig.};
34+
& \h \\
35+
\h &
36+
\node [block_center] (R2)
37+
{Alice uses a full node
38+
to create a PSBT with
39+
all input UTXOs filled in.};
40+
& \h \\
41+
\h &
42+
\node [block_center] (R3)
43+
{PSBT distributed.};
44+
& \h \\
45+
\node [block_center] (R4C1)
46+
{Alice signs the
47+
PSBT with her wallet.};
48+
&
49+
\node [block_center] (R4C2)
50+
{Bob signs the PSBT
51+
with his SPV wallet.};
52+
&
53+
\node [block_center] (R4C3)
54+
{Carol signs the PSBT
55+
with a completely
56+
offline signing machine.};
57+
\\
58+
%~ \h & \node (blind) & \h \\
59+
\h &
60+
\node [block_center] (R5)
61+
{PSBTs are returned
62+
to Alice.};
63+
& \h \\
64+
\h &
65+
\node [block_center] (R6)
66+
{Alices combines the
67+
PSBTs. All inputs now
68+
have 3 signatures.};
69+
& \h \\
70+
\h &
71+
\node [block_center] (R7)
72+
{Alice finalizes the PSBT
73+
by creating each input's
74+
final scriptSig. One signature
75+
for each input is dropped.};
76+
& \h \\
77+
\h &
78+
\node [block_rounded] (stop)
79+
{Alice extracts the network
80+
serialized transaction and
81+
broadcasts it to the network.};
82+
& \h \\
83+
};% end matrix
84+
% connecting nodes with paths
85+
% \begin{pgfonlayer}{bg}
86+
\draw[line width = 1pt, ->]
87+
(R1) edge (R2)
88+
(R2) edge (R3)
89+
(R3) -| (R4C1)
90+
(R3) edge (R4C2)
91+
(R5) edge (R6)
92+
(R6) edge (R7)
93+
(R7) edge (stop);
94+
% circumvent missing arrow
95+
\draw[line width = 1pt, ->]
96+
(R4C1) |-+(0,-2.2em)-| (R5)
97+
(R4C2) edge (R5)
98+
(R4C3) |-+(0,-2.2em)-| (R5)
99+
(R3) -| (R4C3);
100+
% \end{pgfonlayer}
101+
\end{tikzpicture}
102+
\end{document}

0 commit comments

Comments
 (0)