Browse Source

doc: simplify anchor output script, fix users.

It's slightly clearer to do the "2" outside the branch.

Also, spending it requires the extra 0 due to OP_CHECKMULTISIG bug.

Signed-off-by: Rusty Russell <rusty@rustcorp.com.au>
ppa-0.6.1
Rusty Russell 10 years ago
parent
commit
da503c1ee1
  1. 44
      doc/deployable-lightning.lyx
  2. BIN
      doc/deployable-lightning.pdf

44
doc/deployable-lightning.lyx

@ -1362,10 +1362,6 @@ OP_IF
\begin_deeper
\begin_layout Description
2
\begin_inset space ~
\end_inset
<KEY-B'> Should be signed by B's escape key.
\end_layout
@ -1376,10 +1372,6 @@ OP_ELSE
\begin_deeper
\begin_layout Description
2
\begin_inset space ~
\end_inset
<KEY-B> Should be signed by B's commitment key.
\end_layout
@ -1388,6 +1380,14 @@ OP_ELSE
OP_ENDIF
\end_layout
\begin_layout Description
2
\begin_inset space ~
\end_inset
OP_SWAP Put 2 before B's key on the stack.
\end_layout
\begin_layout Description
<KEY-A>
\begin_inset space ~
@ -1413,20 +1413,24 @@ The escape transaction for A spends A's anchor output and reveals A's secret.
Escape Input Script
\end_layout
\begin_layout Standard
The extra 0 at the start is due to the OP_CHECKMULTISIG out-by-one-bug.
\end_layout
\begin_layout Description
<SIG-A>
0
\begin_inset space ~
\end_inset
<SIG-B'>
<SIG-A>
\begin_inset space ~
\end_inset
SECRET
<SIG-B'>
\begin_inset space ~
\end_inset
1
<SECRET-A>
\begin_inset space ~
\end_inset
@ -1544,19 +1548,19 @@ This is identical to the normal escape input script.
\end_layout
\begin_layout Description
<SIG-A>
0
\begin_inset space ~
\end_inset
<SIG-B'>
<SIG-A>
\begin_inset space ~
\end_inset
SECRET
<SIG-B'>
\begin_inset space ~
\end_inset
1
<SECRET-A>
\begin_inset space ~
\end_inset
@ -1685,19 +1689,19 @@ Commitment Input Script
\begin_layout Standard
The commitment transaction has two inputs; one which spends each anchor
output.
The two zeroes indicate it is not revealing the secret:
The zero after the signature indicates it is not revealing the secret:
\end_layout
\begin_layout Description
<SIG-A>
0
\begin_inset space ~
\end_inset
<SIG-B>
<SIG-A>
\begin_inset space ~
\end_inset
0
<SIG-B>
\begin_inset space ~
\end_inset

BIN
doc/deployable-lightning.pdf

Binary file not shown.
Loading…
Cancel
Save